diff options
332 files changed, 25244 insertions, 0 deletions
diff --git a/themes/tabi-lean/.gitignore b/themes/tabi-lean/.gitignore new file mode 100644 index 0000000..d70ebaa --- /dev/null +++ b/themes/tabi-lean/.gitignore @@ -0,0 +1 @@ +public
\ No newline at end of file diff --git a/themes/tabi-lean/LICENSE b/themes/tabi-lean/LICENSE new file mode 100644 index 0000000..b09859c --- /dev/null +++ b/themes/tabi-lean/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Óscar Fernández + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/themes/tabi-lean/config.toml b/themes/tabi-lean/config.toml new file mode 100644 index 0000000..a54f0f4 --- /dev/null +++ b/themes/tabi-lean/config.toml @@ -0,0 +1,517 @@ +base_url = "https://welpo.github.io/tabi" +title = "~/tabi" +description = "tabi is an accessible Zola theme with search, multi-language support, optional JavaScript, a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs." +author = "welpo" +generate_feeds = true +compile_sass = true +minify_html = true +build_search_index = true + +# To translate the entire theme, there must be a file with the same language code +# in the `i18n` folder of your site or the tabi theme. +# For example, "i18n/fr.toml" for French or "i18n/zh-Hans.toml" for Simplified Chinese. +# Otherwise the theme will be in English. +# See https://welpo.github.io/tabi/blog/faq-languages/ for more details. +default_language = "en" + +taxonomies = [{name = "tags", feed = true}] + +[search] +# Whether to include the title of the page/section in the index. +include_title = true +# Whether to include the description of the page/section in the index. +include_description = true +# Whether to include the path of the page/section in the index. +include_path = true +# Whether to include the rendered content of the page/section in the index. +include_content = true +# At which character to truncate the content to. Useful if you have a lot of pages and the index would +# become too big to load on the site. Defaults to not being set. +# truncate_content_length = 100 +# Whether to produce the search index as a javascript file or as a JSON file. +# Accepted value "elasticlunr_javascript" or "elasticlunr_json". +index_format = "elasticlunr_json" + +[markdown] +highlight_code = true +bottom_footnotes = true +# To use a Zola built-in theme, CSP needs to allow unsafe-inline for style-src. +highlight_theme = "css" +smart_punctuation = true +# Set to 'external' to add an indicator next to external links. +external_links_class = "external" + +[link_checker] +internal_level = "warn" +skip_prefixes = [ + "https://www.vultr.com/", +] +skip_anchor_prefixes = [ + "https://github.com/", +] + +[languages.es] +title = "~/tabi" +description = "tabi es un tema accesible para Zola con búsqueda, soporte multilingüe, JavaScript opcional, una puntuación perfecta en Lighthouse y documentación exhaustiva. Diseñado para sitios web y blogs personales." +generate_feeds = true +taxonomies = [{name = "tags", feed = true}] +build_search_index = true + +[languages.ca] +title = "~/tabi" +description = "tabi és un tema accessible per a Zola amb cerca, suport multilingüe, JavaScript opcional, una puntuació perfecta a Lighthouse i documentació exhaustiva. Dissenyat per a llocs web i blogs personals." +generate_feeds = true +taxonomies = [{name = "tags", feed = true}] + +[languages.ar] +title = "~/تابي" +description = "تابي هو قالب Zola سريع وحديث مع دعم متعدد اللغات و JavaScript اختياري ودرجة Lighthouse مثالية." +generate_feeds = true +taxonomies = [{name = "tags", feed = true}] +build_search_index = false + +[extra] +# Check out the documentation (or the comments below) to learn how to customise tabi: +# https://welpo.github.io/tabi/blog/mastering-tabi-settings/ + +# Search index format. +# For Zola 0.17.X users only. +# This MUST MATCH the setting in [search].index_format. +# Example: If [search].index_format is "elasticlunr_javascript", set: +# index_format = "elasticlunr_javascript" +# index_format = "" + +# Use sans-serif font everywhere. +# By default, the serif font is only used in articles. +override_serif_with_sans = false + +# Enable JavaScript theme toggler to allow users to switch between dark/light mode. +# If disabled, your site will use the theme specified in the `default_theme` variable. +theme_switcher = true + +# This setting determines the default theme on load ("light" or "dark"). +# To follow the user's OS theme, leave it empty or unset. +default_theme = "" + +# Choose the colourscheme (skin) for the theme. Default is "teal". +# Skin available: blue, lavender, mint, red, sakura, teal, monochrome, lowcontrast_orange, lowcontrast_peach, lowcontrast_pink, indigo_ingot, evangelion +# See them live and learn how to create your own: https://welpo.github.io/tabi/blog/customise-tabi/#skins +# WARNING! "lowcontrast" skins, while aesthetically pleasing, may not provide optimal +# contrast (in light theme) for readability and might not be suitable for all users. +# Furthermore, low contrasting elements will affect your Google Lighthouse rating. +# All other skins have optimal contrast. +skin = "" + +# Set browser theme colour. Can be a single colour or [light, dark]. +# Note: Bright colors may be ignored in dark mode. +# More details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color +browser_theme_color = "#087e96" +# browser_theme_color = ["#ffffff", "#000000"] # Example of light/dark colours. + +# List additional stylesheets to load site-wide. +# These stylesheets should be located in your site's `static` directory. +# Example: stylesheets = ["extra1.css", "path/extra2.css"] +# You can load a stylesheet for a single post by adding it to the [extra] section of the post's front matter, following this same format. +stylesheets = [] + +# Sets the default canonical URL for all pages. +# Individual pages can override this in the [extra] section using canonical_url. +# Example: "$base_url/blog/post1" will get the canonical URL "https://example.com/blog/post1". +# Note: To ensure accuracy in terms of matching content, consider setting 'canonical_url' individually per page. +# base_canonical_url = "https://example.com" + +# Remote repository for your Zola site. +# Used for `show_remote_changes` and `show_remote_source` (see below). +# Supports GitHub, GitLab, Gitea, and Codeberg. +remote_repository_url = "https://github.com/welpo/tabi" +# Set this to "auto" to try and auto-detect the platform based on the repository URL. +# Accepted values are "github", "gitlab", "gitea", and "codeberg". +remote_repository_git_platform = "auto" # Defaults to "auto". +# Branch in the repo hosting the Zola site. +remote_repository_branch = "main" # Defaults to "main". +# Show a link to the commit history of updated posts, right next to the last updated date. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_remote_changes = true # Defaults to true. +# Show a link to the repository of the site, right next to the "Powered by Zola & tabi" text. +show_remote_source = true # Defaults to true. + +# Add a "copy" button to code blocks (loads ~700 bytes of JavaScript). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +copy_button = true + +# Make code block names clickable if they are URLs (loads ~400 bytes of JavaScript). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +code_block_name_links = false + +# Force left-to-right (LTR) direction for code blocks. +# Set to false to allow code to follow the document's natural direction. +# Can be set at page or section levels. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +force_codeblock_ltr = true + +# Show the author(s) of a page. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_author = false + +# Show the reading time of a page. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_reading_time = true + +# Show the date of a page below its title. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_date = true + +# Determines how dates are displayed in the post listing (e.g. front page or /blog). Options: +# "date" - Show only the original date of the post (default if unset). +# "updated" - Show only the last updated date of the post. If there is no last updated date, it shows the original date. +# "both" - Show both the original date and the last updated date. +post_listing_date = "date" + +# Enable iine like buttons on all posts: https://iine.to/ +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +iine = true +iine_icon = "thumbs_up" # See https://iine.to/#customise +# Unify like counts across all language versions of the same page. +# When enabled, likes on /es/blog/hello/ will count towards /blog/hello/ (default language). +iine_unified_languages = true + +# Show "Jump to posts" link next to series' title. +# By default, the link appears automatically when a series description exceeds 2000 characters. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# show_jump_to_posts = true + +# Determines if indexes should be increasing (false) or decreasing (true) in series' posts list. +# It has only effect if the section uses indexes metadata (which is only the case for series as of now). +# Can be set at section levels, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +post_listing_index_reversed = false # Defaults to false. + +# DEPRECATED! +# Use Zola's built-in `bottom_footnotes = true` in the [markdown] section instead. (Available since v0.19.0) +# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +footnote_backlinks = false + +# Enable KaTeX for all posts. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +katex = false + +# Enable Mermaid diagrams for all posts. +# Loads ~2.5MB of JavaScript. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +mermaid = false + +# Serve Mermaid JavaScript locally. Version bundled with tabi. +# If set to false, it will load the latest version from JSDelivr. +# Only relevant when `mermaid = true`. +serve_local_mermaid = true + +# Show links to previous and next articles at the bottom of posts. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_previous_next_article_links = false + +# Invert order of the links to previous and next articles at the bottom of posts. +# By default, next articles are on the left side of the page and previous articles are on the right side. +# To reverse the order (next articles on the right and previous articles on the left), set it to true. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +invert_previous_next_article_links = false + +# Whether the navigation for previous/next article should match the full width of the site (same as the navigation bar at the top) or the article width. +# To match the navigation bar at the top, set it to true. +previous_next_article_links_full_width = true + +# Quick navigation buttons. +# Adds "go up" and "go to comments" buttons on the bottom right (hidden for mobile). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +quick_navigation_buttons = false + +# Add a Table of Contents to posts, right below the title and metadata. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +toc = false + +# Date format used when listing posts (main page, /blog section, tag posts list…) +# Default is "6th July 2049" in English and "%d %B %Y" in other languages. +long_date_format = "%d %B %Y" + +# Date format used for blog posts. +# Default is "6th July 2049" in English and "%-d %B %Y" in other languages. +short_date_format = "" + +# Date format used for the archive page. +# Default is "06 July" in English and "%d %b" in other languages. +archive_date_format = "" + +# Per-language date format overrides. +# Examples: Spanish uses "3 de febrero de 2024", German uses "3. Februar 2024" +date_formats = [ + { lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y" }, + { lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" }, +] + +# Custom separator used in title tag and posts metadata (between date, time to read, and tags). +separator = "•" + +# Use a shorter layout for All tags listing. +# Default: tag_name – n post[s] +# Compact: tag_name^n (superscript number) +compact_tags = false + +# How tags are sorted in a Tags listing based on templates/tags/list.html. +# "name" for alphabetical, "frequency" for descending count of posts. +# Default: "name". +tag_sorting = "name" + +# Show clickable tags above cards.html template (e.g. projects/) to filter the displayed items. +# Loads JS to filter. If JS is disabled, the buttons are links to the tag's page. +# Can be set at the section or config.toml level, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# Default: true +enable_cards_tag_filtering = true + +# Invert the order of the site title and page title in the browser tab. +# Example: true => "Blog • ~/tabi", false => "~/tabi • Blog" +invert_title_order = false + +# Full path after the base URL required. So if you were to place it in "static" it would be "/favicon.png" +favicon = "img/seedling.png" + +# Add an emoji here to use it as favicon. +# Compatibility: https://caniuse.com/link-icon-svg +favicon_emoji = "🌱" + +# Path to the fallback image for social media cards (the preview image shown when sharing a link on WhatsApp, LinkedIn…). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# Learn how to create these images in batch and automatically: +# https://osc.garden/blog/automating-social-media-cards-zola/ +social_media_card = "index.jpg" + +menu = [ + { name = "blog", url = "blog", trailing_slash = true }, + { name = "archive", url = "archive", trailing_slash = true }, + { name = "tags", url = "tags", trailing_slash = true }, + { name = "projects", url = "projects", trailing_slash = true }, +] + +# The RSS icon will be shown if (1) it's enabled and (2) the following variable is set to true. +# Note for Zola 0.19.X users: when `feed_filenames` has two filenames, only the first one will be linked in the footer. +feed_icon = true + +# Show the full post content in the Atom feed. +# If it's set to false, only the description or summary will be shown. +full_content_in_feed = false + +# Email address for footer's social section. +# Protect against spambots: +# 1. Use base64 for email (convert at https://www.base64encode.org/ or `printf 'your@email.com' | base64`). +# 2. Or, set 'encode_plaintext_email' to true for auto-encoding (only protects on site, not in public repos). +email = "dGFiaUBvc2MuZ2FyZGVu" +# Decoding requires ~400 bytes of JavaScript. If JS is disabled, the email won't be displayed. +encode_plaintext_email = true # Setting is ignored if email is already encoded. + +# Social media links for the footer. +# Built-in icons: https://github.com/welpo/tabi/tree/main/static/social_icons +# To use a custom icon, add it to your site's `static/social_icons` directory. +socials = [ + { name = "github", url = "https://github.com/welpo/", icon = "github" }, + { name = "soundcloud", url = "https://soundcloud.com/oskerwyld", icon = "soundcloud" }, + { name = "instagram", url = "https://instagram.com/oskerwyld", icon = "instagram" }, + { name = "youtube", url = "https://youtube.com/@oskerwyld", icon = "youtube" }, + { name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" }, +] + +# Fediverse profile. +# Adds metadata to feature the author's profile in Mastodon link previews. +# Example: for @username@example.com, use: +# fediverse_creator = { handle = "username", domain = "example.com" } + +# Extra menu to show on the footer, below socials section. +footer_menu = [ + {url = "about", name = "about", trailing_slash = true}, + {url = "privacy", name = "privacy", trailing_slash = true}, + {url = "https://tabi-stats.osc.garden", name = "site_statistics", trailing_slash = true}, + {url = "sitemap.xml", name = "sitemap", trailing_slash = false}, +] + +# Enable a copyright notice for the footer, shown between socials and the "Powered by" text. +# $TITLE will be replaced by the website's title. +# $CURRENT_YEAR will be replaced by the current year. +# $AUTHOR will be replaced by the `author` variable. +# $SEPARATOR will be replaced by the `separator` variable. +# Markdown is supported (links, emphasis, etc). +# copyright = "$TITLE © $CURRENT_YEAR $AUTHOR $SEPARATOR Unless otherwise noted, the content in this website is available under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) license." + +# For multi-language sites, you can set a different copyright for each language. +# The old way of setting `translated_copyright = true` and using i18n files is deprecated. +# If a translation is missing for language, the `copyright` value will be used. +# copyright_translations.es = "$TITLE © $CURRENT_YEAR $AUTHOR $SEPARATOR A menos que se indique lo contrario, el contenido de esta web está disponible bajo la licencia [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)." + +# Custom security headers. What urls should your website be able to connect to? +# You need to specify the CSP and the URLs associated with the directive. +# Useful if you want to load remote content safely (embed YouTube videos, which needs frame-src, for example). +# Default directive is self. +# Default config, allows for https remote images and embedding YouTube and Vimeo content. +# This configuration (along with the right webserver settings) gets an A+ in Mozilla's Observatory: https://observatory.mozilla.org +# Note: to use a Zola built-in syntax highlighting theme, allow unsafe-inline for style-src. +allowed_domains = [ + { directive = "font-src", domains = ["'self'", "data:"] }, + { directive = "img-src", domains = ["'self'", "https://*", "data:"] }, + { directive = "media-src", domains = ["'self'", "https://cdn.jsdelivr.net/"] }, + { directive = "script-src", domains = ["'self'"] }, + { directive = "style-src", domains = ["'self'"] }, + { directive = "frame-src", domains = ["player.vimeo.com", "https://www.youtube-nocookie.com"] }, +] + +# Enable the CSP directives configured (or default). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +enable_csp = true + +# Font subsetting configuration. +# This feature helps prevent text flashing in Firefox when using custom fonts. +# See: https://welpo.github.io/tabi/blog/custom-font-subset/ +# Enable or disable font subsetting completely, both built-in and custom subsets. +enable_subset = true +# Use a custom subset of characters for the header. +# If true, tabi will load the `static/custom_subset.css` file. +# If false, tabi will use the default language-specific subset (English or Spanish). +custom_subset = true + +[extra.analytics] +# Specify which analytics service you want to use. +# Supported options: ["goatcounter", "umami", "plausible"] +service = "goatcounter" + +# Unique identifier for tracking. +# For GoatCounter, this is the code you choose during signup. +# For Umami, this is the website ID. +# For Plausible, this is the domain name (e.g. "example.com"). +# Note: Leave this field empty if you're self-hosting GoatCounter. +# id = "yourID" + +# Optional: Specify the URL for self-hosted analytics instances. +# For GoatCounter: Base URL like "https://stats.example.com" +# For Umami: Base URL like "https://umami.example.com" +# For Plausible: Base URL like "https://plausible.example.com" +# Leave this field empty if you're using the service's default hosting. +self_hosted_url = "https://tabi-stats.osc.garden" + +# Optional: For Umami, enable this option to respect users' Do Not Track (DNT) settings. The default is true. +do_not_track = true + +# giscus support for comments. https://giscus.app +# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup +[extra.giscus] +enabled_for_all_posts = false # Enables giscus on all posts. It can be enabled on individual posts by setting `giscus = true` in the [extra] section of a post's front matter. +automatic_loading = true # If set to false, a "Load comments" button will be shown. +repo = "welpo/tabi-comments" +repo_id = "R_kgDOJ59Urw" # Find this value in https://giscus.app/ +category = "Announcements" +category_id = "DIC_kwDOJ59Ur84CX0QG" # Find this value in https://giscus.app/ +mapping = "slug" # Available: pathname; url; title; slug. "slug" will use the post's filename (slug); this is the only way to share comments between languages. +strict_title_matching = 1 # 1 to enable, 0 to disable. https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md#data-strict +enable_reactions = 1 # 1 to enable, 0 to disable. +comment_box_above_comments = false +light_theme = "noborder_light" +dark_theme = "noborder_dark" +lang = "" # Leave blank to match the page's language. +lazy_loading = true + +# utterances support for comments. https://utteranc.es +# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup +[extra.utterances] +enabled_for_all_posts = false # Enables utterances on all posts. It can be enabled on individual posts by setting `utterances = true` in the [extra] section of a post's front matter. +automatic_loading = true # If set to false, a "Load comments" button will be shown. +repo = "yourGithubUsername/yourRepo" # https://utteranc.es/#heading-repository +issue_term = "slug" # Available: pathname; url; title; slug. "slug" will use the post's filename (slug); this is the only way to share comments between languages. https://utteranc.es/#heading-mapping +label = "💬" # https://utteranc.es/#heading-issue-label +light_theme = "github-light" # https://utteranc.es/#heading-theme +dark_theme = "photon-dark" # https://utteranc.es/#heading-theme +lazy_loading = true + +# Hyvor Talk support for comments. https://talk.hyvor.com +[extra.hyvortalk] +enabled_for_all_posts = false # Enables hyvortalk on all posts. It can be enabled on individual posts by setting `hyvortalk = true` in the [extra] section of a post's front matter. +automatic_loading = true # If set to false, a "Load comments" button will be shown. +website_id = "1234" +page_id_is_slug = true # If true, it will use the post's filename (slug) as id; this is the only way to share comments between languages. If false, it will use the entire url as id. +lang = "" # Leave blank to match the page's language. +page_author = "" # Email (or base64 encoded email) of the author. +lazy_loading = true + +# Isso support for comments. https://isso-comments.de/ +# You need to self-host the backend first: https://blog.phusion.nl/2018/08/16/isso-simple-self-hosted-commenting-system/ +# More info on some settings: https://isso-comments.de/docs/reference/client-config/ +[extra.isso] +enabled_for_all_posts = false # Enables Isso on all posts. It can be enabled on individual posts by setting `isso = true` in the [extra] section of a post's front matter. +automatic_loading = true # If set to false, a "Load comments" button will be shown. +endpoint_url = "" # Accepts relative paths like "/comments/" or "/isso/", as well as full urls like "https://example.com/comments/". Include the trailing slash. +page_id_is_slug = true # If true, it will use the relative path for the default language as id; this is the only way to share comments between languages. If false, it will use the entire url as id. +lang = "" # Leave blank to match the page's language. +max_comments_top = "inf" # Number of top level comments to show by default. If some comments are not shown, an “X Hidden” link is shown. +max_comments_nested = "5" # Number of nested comments to show by default. If some comments are not shown, an “X Hidden” link is shown. +avatar = true +voting = true +page_author_hashes = "" # hash (or list of hashes) of the author. +lazy_loading = true # Loads when the comments are in the viewport (using the Intersection Observer API). + +[extra.webmentions] +# To disable for a specific section or page, set webmentions = false in that page/section's front matter's [extra] section. +enable = false +# Specify the domain registered with webmention.io. +domain = "" + +# The HTML ID for the object to fill in with the webmention data. +# Defaults to "webmentions" +# id = "webmentions" + +# data configuration for the webmention.min.js script +# The base URL to use for this page. Defaults to window.location +# page_url = + +# Additional URLs to check, separated by |s +# add_urls + +# The maximum number of words to render in reply mentions. +# wordcount = 20 + +# The maximum number of mentions to retrieve. Defaults to 30. +# max_webmentions = 30 + +# By default, Webmentions render using the mf2 'url' element, which plays +# nicely with webmention bridges (such as brid.gy and telegraph) +# but allows certain spoofing attacks. If you would like to prevent +# spoofing, set this to a non-empty string (e.g. "true"). +# prevent_spoofing + +# What to order the responses by; defaults to 'published'. See +# https://github.com/aaronpk/webmention.io#api +# sort_by + +# The order to sort the responses by; defaults to 'up' (i.e. oldest +# first). See https://github.com/aaronpk/webmention.io#api +# sort_dir + +# If set to a non-empty string (e.g. "true"), will display comment-type responses +# (replies/mentions/etc.) as being part of the reactions +# (favorites/bookmarks/etc.) instead of in a separate comment list. +# comments_are_reactions = "true" + +# h-card configuration +# Will identify you on the indieweb (see https://microformats.org/wiki/h-card) +[extra.hcard] +# Enable home page h-card. +# enable = true +# Add your email to the card if extra.email is set and not encoded. +# with_mail = true +# Add your social links ('socials' config) to the card. +# with_social_links = true +# Homepage url. Defaults to the value of 'base_url'. +# homepage = "https://myhomepage.net" +# avatar = "img/profile.webp" +# Display name, default to the value of 'author'. +# full_name = "John Doe" +# Small bio, as shown on social media profiles. +# biography = "Fond of the indieweb" +# +# You can add any property from https://microformats.org/wiki/h-card#Properties +# Make sure to replace all '-' characters by '_' +# Examples: +# p_nickname = "nickname" +# p_locality = "Bordeaux" +# p_country_name = "France" diff --git a/themes/tabi-lean/i18n/ar.toml b/themes/tabi-lean/i18n/ar.toml new file mode 100644 index 0000000..eccaa7c --- /dev/null +++ b/themes/tabi-lean/i18n/ar.toml @@ -0,0 +1,113 @@ +# Hello, the Arabic language has many pronouns and words, and each word indicates a different meaning, +# unlike the English language, in which, on the other hand, the word can refer to a person and a group. +# This translation is for individual use, if you are a company or organization, I have put a comment in +# front of each translation that refers to the person and the other word that refers to the organization + +language_name = "العربية" # Shown in language picker for multi-language sites. +date_locale = "ar_SA" # The locale code for time and date formatting. +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "التدوينات" +archive = "الأرشيف" +tags = "الوسوم" +projects = "مشاريعي" #Change this to "المشاريع" if the site is for an organization. +about = "عني" #Change this to "عنا" or "من نحن" if the site is for an organization. +contact = "تواصل معي" #Change this to "تواصل معنا" if the site is for an organization. +privacy = "الخصوصية" +site_statistics = "إحصائيات المدونة" +sitemap = "خريطة المدونة" + +# Search. +search = "بحث" +search_icon_title = "أنقر هنا أو اضغط $SHORTCUT لفتح البحث" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "مسح البحث" +zero_results = "لم يتم العثور على نتائج" #No search results. +one_results = "تم العثور على نتيجة واحدة" # One search result. +two_results = "تم العثور على نتيجتين" # Two search results. +few_results = "تم العثور على $NUMBER نتائج" # for 3 to 10 search results. +many_results = "تم العثور على $NUMBER نتيجة" # 11 or more search results. + +# Navigation. +pinned = "مثبتة" +jump_to_posts = "الإنتقال إلى التدوينات" +read_more = "إقرأ المزيد" +one_posts = "تدوينة واحدة" #One blog post. +two_posts = "تدوينتين" #Two blog posts. +few_posts = "$NUMBER تدوينات" #3 to 10 blog posts. +many_posts = "$NUMBER تدوينة" #11 or more blog posts. +prev = "السابق" # As in "Previous" page. +next = "التالي" # As in "Next" page. +of = "من" # E.g. Page 1 "of" 3 +all_posts = "جميع التدوينات" +all_tags = "جميع الوسوم" +all_projects = "جميع المشاريع" +featured_projects = "المشاريع المميزة" +language_selection = "تحديد اللغة" +toggle_mode = "تبديل الاوضاع $MODE" # $MODE will be replaced by a value (or both) below. +dark = "داكن" +light = "فاتح" +reset_mode = "إعادة تعيين الوضع" + +# Quick navigation buttons. +toggle_toc = "إظهار / إخفاء جدول المحتويات" +go_to_top = "انتقل إلى أعلى الصفحة" +go_to_comments = "انتقل إلى التعليقات" + +# Post metadata. +by_author = "بقلم $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = "، " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " و " # For multiple authors. Ensure spacing where necessary. +draft = "مسودة" +zero_min_read = "الوقت المتوقع للقراءة: أقل من دقيقة" #Less than one minute read. +one_min_read = "الوقت المتوقع للقراءة: دقيقة واحدة" #One minute read. +two_min_read = "الوقت المتوقع للقراءة: دقيقتان" #Two minutes read. +few_min_read = "الوقت المتوقع للقراءة: $NUMBER دقائق" #3 to 10 minutes read. +many_min_read = "الوقت المتوقع للقراءة: $NUMBER دقيقة" #11 or more minutes read. + +zero_words = "لا توجد كلمات" # No words. +one_words = "كلمة واحدة" # One word. +two_words = "كلمتين" # Two words. +few_words = "$NUMBER كلمات" # 3 to 10 words. +many_words = "$NUMBER كلمة" # 11 or more words. + +last_updated_on = "تم التحديث في $DATE" +see_changes = "الإطلاع على التغييرات" + +# Post body. +table_of_contents = "جدول المحتويات" +load_comments = "إظهار التعليقات" + +# Copy code block button. +copied = "تم النسخ!" +copy_code_to_clipboard = "نسخ الشِفرة إلى الحافظة" + +# iine appreciation button. +like_this_post = "أعجبني" + +# Footer: Powered by Zola and tabi. +powered_by = "مُشَغل بواسطة" +and = "و" +site_source = "شِفرة الموقع" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "الصفحة غير موجودة" +translation_missing = "أو لم يتم ترجمتها إلى اللغة التي تطلبها" +check_url = "تحقق من أن الرابط صحيح أو" +go_home = "انتقل إلى الصفحة الرئيسية" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "إظهار الإقتباس الأصلي" +show_translation = "إظهار الترجمة" +open_quotation_mark = '"' +close_quotation_mark = '"' + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "الخلاصة تجدها هنا، تُسمى أيضًا Atom. اشترك عبر نسخ الرابط إلى برنامج قارئ الخُلاصات الذي تستخدمه. قم بزيارة About Feeds لمعرفة المزيد والبدء. انه مجانا." +visit_the_site = "زيارة الموقع" +recent_posts = "المنشورات الأخيرة" diff --git a/themes/tabi-lean/i18n/ca.toml b/themes/tabi-lean/i18n/ca.toml new file mode 100644 index 0000000..0191c24 --- /dev/null +++ b/themes/tabi-lean/i18n/ca.toml @@ -0,0 +1,98 @@ +language_name = "Català" # Shown in language picker for multi-language sites. +date_locale = "ca_ES" +full_stop ="." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blog" +archive = "arxiu" +tags = "etiquetes" +projects = "projectes" +about = "sobre mi" +contact = "contacte" +privacy = "política de privadesa" +site_statistics = "estadístiques del lloc" +sitemap = "mapa del lloc" + +# Search. +search = "Cercar" +search_icon_title = "Fes clic o prem $SHORTCUT per obrir la cerca" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Esborrar cerca" # Title of the X icon next to search input. +zero_results = "No s'han trobat resultats" +one_results = "$NUMBER resultat" # "1 result" +many_results = "$NUMBER resultats" # "3 results" + +# Navigation. +pinned = "Fixada" +jump_to_posts = "Saltar als articles" +read_more = "Llegir més" +one_posts = "$NUMBER entrada" +many_posts = "$NUMBER entrades" +prev = "Anterior" # As in "Previous" page. +next = "Següent" # As in "Next" page. +of = "de" # E.g. Page 1 "of" 3 +all_posts = "Totes les entrades" +all_tags = "Totes les etiquetes" +all_projects = "Tots els projectes" +featured_projects = "Projectes destacats" +language_selection = "Selecció d'idioma" +toggle_mode = "Canvia el mode $MODE" # $MODE will be replaced by a value (or both) below. +dark = "obscur" +light = "clar" +reset_mode = "Restableix el mode al valor predeterminat" + +# Quick navigation buttons. +toggle_toc = "Mostrar/ocultar la taula de continguts" +go_to_top = "Vés a l'inici de la pàgina" +go_to_comments = "Vés a la secció de comentaris" + +# Post metadata. +by_author = "Per $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " i " # For multiple authors. Ensure spacing where necessary. +draft = "ESBORRANY" +zero_min_read = "<1 min de lectura" +one_min_read = "$NUMBER min de lectura" +many_min_read = "$NUMBER mins de lectura" +zero_words = "Cap paraula" +one_words = "$NUMBER paraula" +many_words = "$NUMBER paraules" +last_updated_on = "Actualitzat el $DATE" +see_changes = "Veure canvis" + +# Post body. +table_of_contents = "Taula de contingut" +load_comments = "Carregar comentaris" + +# Copy code block button. +copied = "Copiat!" +copy_code_to_clipboard = "Copia el codi al porta-retalls" + +# iine appreciation button. +like_this_post = "M'agrada aquesta publicació" + +# Footer: Powered by Zola and tabi. +powered_by = "Propulsat per" +and = "i" +site_source = "Codi del lloc" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "La pàgina que has sol·licitat sembla que no existeix" +translation_missing = "o encara no s'ha traduït al teu idioma" +check_url = "Comprova l'URL per detectar errors o" +go_home = "torna a la pàgina d'inici" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Mostra la cita original" +show_translation = "Mostra la traducció" +open_quotation_mark = "«" +close_quotation_mark = "»" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Aquest és un canal web, també conegut com a canal Atom. Subscriu-te copiant l'URL de la barra d'adreces al teu lector de notícies. Visita About Feeds per aprendre més i començar. És gratuït." +visit_the_site = "Visita la web" +recent_posts = "Publicacions recents" diff --git a/themes/tabi-lean/i18n/de.toml b/themes/tabi-lean/i18n/de.toml new file mode 100644 index 0000000..7255f9d --- /dev/null +++ b/themes/tabi-lean/i18n/de.toml @@ -0,0 +1,102 @@ +# This has been machine translated. +# If you would like to help correct errors or improve the translation, +# please open an issue or submit a pull request. +# https://github.com/welpo/tabi +language_name = "Deutsch" # Shown in language picker for multi-language sites. +date_locale = "de_DE" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blog" +archive = "archiv" +tags = "tags" +projects = "projekte" +about = "über" +contact = "kontakt" +privacy = "datenschutzrichtlinie" +site_statistics = "seitenstatistiken" +sitemap = "seitenübersicht" + +# Search. +search = "Suchen" +search_icon_title = "Klicken oder $SHORTCUT drücken, um die Suche zu öffnen" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Suche löschen" # Title of the X icon next to search input. +zero_results = "Keine Ergebnisse gefunden" +one_results = "$NUMBER Ergebnis" # "1 result" +many_results = "$NUMBER Ergebnisse" # "3 results" + +# Navigation. +pinned = "Angeheftet" +jump_to_posts = "Zu den Beiträgen springen" +read_more = "Weiterlesen" +one_posts = "$NUMBER Beitrag" +many_posts = "$NUMBER Beiträge" +prev = "Vorherig" # As in "Previous" page. +next = "Nächst" # As in "Next" page. +of = "von" # E.g. Page 1 "of" 3 +all_posts = "Alle Beiträge" +all_tags = "Alle Tags" +all_projects = "Alle Projekte" +featured_projects = "Empfohlene Projekte" +language_selection = "Sprachauswahl" +toggle_mode = "Wechsle in den $MODE Modus" # $MODE will be replaced by a value (or both) below. +dark = "dunkel" +light = "hell" +reset_mode = "Modus auf Standard zurücksetzen" + +# Quick navigation buttons. +toggle_toc = "Inhaltsverzeichnis ein-/ausblenden" +go_to_top = "Zum Seitenanfang" +go_to_comments = "Zum Kommentarbereich" + +# Post metadata. +by_author = "Von $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " und " # For multiple authors. Ensure spacing where necessary. +draft = "ENTWURF" +zero_min_read = "weniger als 1 Min. Lesezeit" +one_min_read = "$NUMBER Min. Lesezeit" +many_min_read = "$NUMBER Min. Lesezeit" +zero_words = "Keine Wörter" +one_words = "$NUMBER Wort" +many_words = "$NUMBER Wörter" +last_updated_on = "Aktualisiert am $DATE" +see_changes = "Änderungen anzeigen" + +# Post body. +table_of_contents = "Inhaltsverzeichnis" +load_comments = "Kommentare laden" + +# Copy code block button. +copied = "Kopiert!" +copy_code_to_clipboard = "Code in die Zwischenablage kopieren" + +# iine appreciation button. +like_this_post = "Dieser Beitrag gefällt mir" + +# Footer. +powered_by = "Angetrieben von" +and = "und" +site_source = "Quellcode der Seite" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "Die Seite, die du angefordert hast, scheint nicht zu existieren" +translation_missing = "oder wurde noch nicht in deine Sprache übersetzt" +check_url = "Überprüfe die URL auf Fehler oder" +go_home = "zurück zur Startseite gehen" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Originalzitat anzeigen" +show_translation = "Übersetzung anzeigen" +open_quotation_mark = "„" +close_quotation_mark = "“" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Dies ist ein Web-Feed, auch bekannt als Atom-Feed. Abonnieren Sie, indem Sie die URL aus der Adressleiste in Ihren Nachrichtenleser kopieren. Besuchen Sie About Feeds, um mehr zu erfahren und loszulegen. Es ist kostenlos." +visit_the_site = "Besuchen Sie die Webseite" +recent_posts = "Aktuelle Beiträge" diff --git a/themes/tabi-lean/i18n/en.toml b/themes/tabi-lean/i18n/en.toml new file mode 100644 index 0000000..4184298 --- /dev/null +++ b/themes/tabi-lean/i18n/en.toml @@ -0,0 +1,98 @@ +language_name = "English" # Shown in language picker for multi-language sites. +date_locale = "en_GB" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blog" +archive = "archive" +tags = "tags" +projects = "projects" +about = "about" +contact = "contact" +privacy = "privacy policy" +site_statistics = "site statistics" +sitemap = "sitemap" + +# Search. +search = "Search" +search_icon_title = "Click or press $SHORTCUT to open search" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Clear search" # Title of the X icon next to search input. +zero_results = "No results" +one_results = "$NUMBER result" # "1 result" +many_results = "$NUMBER results" # "3 results" + +# Navigation. +pinned = "Pinned" +jump_to_posts = "Jump to posts" +read_more = "Read more" +one_posts = "$NUMBER post" +many_posts = "$NUMBER posts" # "3 posts" +prev = "Prev" # As in "Previous" page. +next = "Next" # As in "Next" page. +of = "of" # E.g. Page 1 "of" 3 +all_posts = "All posts" +all_tags = "All tags" +all_projects = "All projects" +featured_projects = "Featured projects" +language_selection = "Language selection" +toggle_mode = "Toggle $MODE mode" # $MODE will be replaced by a value (or both) below. +dark = "dark" +light = "light" +reset_mode = "Reset mode to default" + +# Quick navigation buttons. +toggle_toc = "Toggle Table of Contents" +go_to_top = "Go to the top of the page" +go_to_comments = "Go to the comments section" + +# Post metadata. +by_author = "By $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " and " # For multiple authors. Ensure spacing where necessary. +draft = "DRAFT" +zero_min_read = "<1 min read" +one_min_read = "$NUMBER min read" +many_min_read = "$NUMBER min read" +zero_words = "No words" +one_words = "$NUMBER word" +many_words = "$NUMBER words" +last_updated_on = "Updated on $DATE" +see_changes = "See changes" + +# Post body. +table_of_contents = "Table of Contents" +load_comments = "Load comments" + +# Copy code block button. +copied = "Copied!" +copy_code_to_clipboard = "Copy code to clipboard" + +# iine appreciation button. +like_this_post = "Like this post" + +# Footer: Powered by Zola and tabi. +powered_by = "Powered by" +and = "&" +site_source = "Site source" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "The page you've requested seems to be missing" +translation_missing = "or hasn't been translated into your language yet" +check_url = "Check the URL for errors or" +go_home = "go back to the homepage" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Show original quote" +show_translation = "Show translation" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader. Visit About Feeds to learn more and get started. It's free." +visit_the_site = "Visit website" +recent_posts = "Recent posts" diff --git a/themes/tabi-lean/i18n/es.toml b/themes/tabi-lean/i18n/es.toml new file mode 100644 index 0000000..a39478b --- /dev/null +++ b/themes/tabi-lean/i18n/es.toml @@ -0,0 +1,98 @@ +language_name = "Español" # Shown in language picker for multi-language sites. +date_locale = "es_ES" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blog" +archive = "archivo" +tags = "etiquetas" +projects = "proyectos" +about = "sobre mí" +contact = "contacto" +privacy = "política de privacidad" +site_statistics = "estadísticas del sitio" +sitemap = "mapa del sitio" + +# Search. +search = "Buscar" +search_icon_title = "Haz clic o usa $SHORTCUT para abrir la búsqueda" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Borrar búsqueda" # Title of the X icon next to search input. +zero_results = "No hay resultados" +one_results = "$NUMBER resultado" +many_results = "$NUMBER resultados" + +# Navigation. +pinned = "Fijada" +jump_to_posts = "Saltar a las entradas" +read_more = "Leer más" +one_posts = "$NUMBER entrada" +many_posts = "$NUMBER entradas" +prev = "Anterior" # As in "Previous" page. +next = "Siguiente" # As in "Next" page. +of = "de" # E.g. Page 1 "of" 3 +all_posts = "Todas las entradas" +all_tags = "Todas las etiquetas" +all_projects = "Todos los proyectos" +featured_projects = "Proyectos destacados" +language_selection = "Selección de idioma" +toggle_mode = "Cambiar a modo $MODE" # $MODE will be replaced by a value (or both) below. +dark = "oscuro" +light = "claro" +reset_mode = "Restablecer modo a configuración predeterminada" + +# Quick navigation buttons. +toggle_toc = "Mostrar/ocultar la tabla de contenidos" +go_to_top = "Ir al inicio de la página" +go_to_comments = "Ir a la sección de comentarios" + +# Post metadata. +by_author = "Por $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " y " # For multiple authors. Ensure spacing where necessary. +draft = "BORRADOR" +zero_min_read = "<1 min de lectura" +one_min_read = "$NUMBER min de lectura" +many_min_read = "$NUMBER mins de lectura" +zero_words = "Cero palabras" +one_words = "$NUMBER palabra" +many_words = "$NUMBER palabras" +last_updated_on = "Actualizado el $DATE" +see_changes = "Ver cambios" + +# Post body. +table_of_contents = "Tabla de contenido" +load_comments = "Cargar comentarios" + +# Copy code block button. +copied = "Copiado!" +copy_code_to_clipboard = "Copiar código al portapapeles" + +# iine appreciation button. +like_this_post = "Me gusta esta publicación" + +# Footer: Powered by Zola and tabi. +powered_by = "Impulsado por" +and = "y" +site_source = "Código del sitio" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "La página que has solicitado parece no existir" +translation_missing = "o aún no se ha traducido a tu idioma" +check_url = "Revisa la URL en busca de errores o" +go_home = "regresa a la página de inicio" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Mostrar cita original" +show_translation = "Mostrar traducción" +open_quotation_mark = "«" +close_quotation_mark = "»" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Esta es una fuente web, también conocida como fuente Atom. Suscríbete copiando la URL de la barra de direcciones en tu lector de noticias. Visita About Feeds para aprender más y empezar. Es gratis. " +visit_the_site = "Visita la web" +recent_posts = "Publicaciones recientes" diff --git a/themes/tabi-lean/i18n/et.toml b/themes/tabi-lean/i18n/et.toml new file mode 100644 index 0000000..7f71604 --- /dev/null +++ b/themes/tabi-lean/i18n/et.toml @@ -0,0 +1,98 @@ +language_name = "Eesti" # Shown in language picker for multi-language sites. +date_locale = "et_EE" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blogi" +archive = "arhiiv" +tags = "sildid" +projects = "projektid" +about = "minust" +contact = "kontakt" +privacy = "privaatsuspoliitika" +site_statistics = "saidi statistika" +sitemap = "saidikaart" + +# Search. +search = "Otsing" +search_icon_title = "Otsingu avamiseks klõpsake või vajutage $SHORTCUT" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Tühjenda otsing" # Title of the X icon next to search input. +zero_results = "Tulemusi pole" +one_results = "$NUMBER tulemus" # "1 result" +many_results = "$NUMBER tulemust" # "3 results" + +# Navigation. +pinned = "Kinnitatud" +jump_to_posts = "Hüppa postitusteni" +read_more = "Loe edasi" +one_posts = "$NUMBER postitus" +many_posts = "$NUMBER postitust" # "3 posts" +prev = "Eelmine" # As in "Previous" page. +next = "Järgmine" # As in "Next" page. +of = "/" # E.g. Page 1 "of" 3 +all_posts = "Kõik postitused" +all_tags = "Kõik sildid" +all_projects = "Kõik projektid" +featured_projects = "Esiletõstetud projektid" +language_selection = "Keele valik" +toggle_mode = "Lülita $MODE režiim" # $MODE will be replaced by a value (or both) below. +dark = "tume" +light = "hele" +reset_mode = "Lähtesta vaikerežiim" + +# Quick navigation buttons. +toggle_toc = "Sisukorra kuvamine/peitmine" +go_to_top = "Mine lehe ülaossa" +go_to_comments = "Mine kommentaaride juurde" + +# Post metadata. +by_author = "Autor: $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " ja " # For multiple authors. Ensure spacing where necessary. +draft = "MUSTAND" +zero_min_read = "Lugemisaeg <1 min" +one_min_read = "Lugemisaeg $NUMBER min" +many_min_read = "Lugemisaeg $NUMBER min" +zero_words = "Sõnu pole" +one_words = "$NUMBER sõna" +many_words = "$NUMBER sõna" +last_updated_on = "Uuendatud $DATE" +see_changes = "Vaata muudatusi" + +# Post body. +table_of_contents = "Sisukord" +load_comments = "Lae kommentaarid" + +# Copy code block button. +copied = "Kopeeritud!" +copy_code_to_clipboard = "Kopeeri kood lõikelauale" + +# iine appreciation button. +like_this_post = "Mulle meeldib see postitus" + +# Footer: Powered by Zola and tabi. +powered_by = "Toetab" +and = "ja" +site_source = "Saidi lähtekood" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "Tundub, et otsitud lehte ei leitud" +translation_missing = "või pole seda veel teie keelde tõlgitud" +check_url = "Kontrollige URL-i vigade suhtes või" +go_home = "minge tagasi avalehele" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Näita originaaltsitaati" +show_translation = "Näita tõlget" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "See on veebivoog, tuntud ka kui Atom-voog. Tellimiseks kopeerige URL aadressiribalt oma uudistelugerisse. Külastage About Feeds lehte, et õppida ja alustada. See on tasuta." +visit_the_site = "Külasta veebisaiti" +recent_posts = "Viimased postitused" diff --git a/themes/tabi-lean/i18n/fa.toml b/themes/tabi-lean/i18n/fa.toml new file mode 100644 index 0000000..b609409 --- /dev/null +++ b/themes/tabi-lean/i18n/fa.toml @@ -0,0 +1,99 @@ +language_name = "فارسی" # Shown in language picker for multi-language sites. +date_locale = "fa_IR" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "وبلاگ" +archive = "آرشیو" +tags = "برچسبها" +projects = "پروژهها" +about = "درباره" +contact = "تماس" +privacy = "سیاست حفظ حریم خصوصی" +site_statistics = "آمار سایت" +sitemap = "نقشه سایت" + +# Search. +search = "جستجو" +search_icon_title = "برای باز کردن جستجو کلیک کنید یا $SHORTCUT را فشار دهید" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "پاک کردن جستجو" # Title of the X icon next to search input. +zero_results = "بدون نتیجه" +one_results = "$NUMBER نتیجه" # "1 result" +many_results = "$NUMBER نتیجه" # "3 results" + +# Navigation. +pinned = "سنجاقشده" +jump_to_posts = "پرش به نوشتهها" +read_more = "ادامه مطلب" +one_posts = "$NUMBER مطلب" +many_posts = "$NUMBER مطلب" # "3 posts" +prev = "قبلی" # As in "Previous" page. +next = "بعدی" # As in "Next" page. +of = "از" # E.g. Page 1 "of" 3 +all_posts = "همه مطالب" +all_tags = "همه برچسبها" +all_projects = "همه پروژهها" +featured_projects = "پروژههای برجسته" +language_selection = "انتخاب زبان" +toggle_mode = "تغییر حالت $MODE" # $MODE will be replaced by a value (or both) below. +dark = "تیره" +light = "روشن" +reset_mode = "بازنشانی حالت به حالت پیشفرض" + + +# Quick navigation buttons. +toggle_toc = "تغییر جدول محتوا" +go_to_top = "رفتن به بالای صفحه" +go_to_comments = "رفتن به بخش نظرات" + +# Post metadata. +by_author = "توسط $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = "، " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " و " # For multiple authors. Ensure spacing where necessary. +draft = "پیشنویس" +zero_min_read = "خواندن کمتر از ۱ دقیقه" +one_min_read = "خواندن $NUMBER دقیقه" +many_min_read = "خواندن $NUMBER دقیقه" +zero_words = "هیچ کلمهای" +one_words = "$NUMBER کلمه" +many_words = "$NUMBER کلمه" +last_updated_on = "آخرین بهروزرسانی در $DATE" +see_changes = "مشاهده تغییرات" + +# Post body. +table_of_contents = "فهرست مطالب" +load_comments = "بارگذاری نظرات" + +# Copy code block button. +copied = "کپی شد!" +copy_code_to_clipboard = "کپی کد به کلیپبورد" + +# iine appreciation button. +like_this_post = "این مقاله را دوست دارم" + +# Footer: Powered by Zola and tabi. +powered_by = "قدرت گرفته از" +and = "و" +site_source = "منبع سایت" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "صفحهای که درخواست کردهاید به نظر میرسد از دست رفته است" +translation_missing = "یا هنوز به زبان شما ترجمه نشده است" +check_url = "آدرس اینترنتی را بررسی کنید و یا" +go_home = "به صفحه اصلی برگردید" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "نقل قول اصلی را نشان بده" +show_translation = "ترجمه را نشان بده" +open_quotation_mark = "«" +close_quotation_mark = "»" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "این یک فید وب است، همچنین به عنوان یک فید Atom شناخته میشود. با کپی کردن URL از نوار آدرس به خواننده اخباری خود مشترک شوید. برای یادگیری بیشتر و شروع به کار بروید به About Feeds. این رایگان است." +visit_the_site = "بازدید از وبسایت" +recent_posts = "مطالب اخیر" diff --git a/themes/tabi-lean/i18n/fi.toml b/themes/tabi-lean/i18n/fi.toml new file mode 100644 index 0000000..bf820e9 --- /dev/null +++ b/themes/tabi-lean/i18n/fi.toml @@ -0,0 +1,102 @@ +language_name = "suomi" # Shown in language picker for multi-language sites. +date_locale = "fi_FI" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blogi" +archive = "arkisto" +tags = "tunnisteet" +projects = "projektit" +diagrams = "kaaviot" +about = "minusta" +contact = "yhteystiedot" +privacy = "tietosuojakäytäntö" +site_statistics = "tilastot" +sitemap = "sivustokartta" + +# Search. +search = "Hae" +search_icon_title = "Paina $SHORTCUT avataksesi haun" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Tyhjennä haku" # Title of the X icon next to search input. +zero_results = "Ei tuloksia" +one_results = "$NUMBER tulos" # "1 result" +many_results = "$NUMBER tulosta" # "3 results" + +# Navigation. +# Some will prefer artikkeli (=article) instead of julkaisu (=publication), but this is more general +pinned = "Kiinnitetty" +jump_to_posts = "Siirry julkaisuihin" +read_more = "Lue lisää" +one_posts = "$NUMBER julkaisu" +many_posts = "$NUMBER julkaisua" # "3 posts" +prev = "Edellinen" # As in "Previous" page. +next = "Seuraava" # As in "Next" page. +of = "/" # E.g. Page 1 "of" 3 +all_posts = "Kaikki julkaisut" +all_tags = "Kaikki tunnisteet" +all_projects = "Kaikki projektit" +featured_projects = "Esittelyprojektit" +language_selection = "Kielivalinta" +toggle_mode = "Vaihda $MODE" # $MODE will be replaced by a value (or both) below. Literally "Change $MODE" +# The declension assumes that both values are used. e.g. "Change dark mode" wouldn't work and would need the "to" preposition +# It also omits the "mode" word: "Change dark/light mode" instead of "Change dark mode/light mode" +dark = "tumma" +light = "vaalea tila" +reset_mode = "Palauta oletustilaan" + +# Quick navigation buttons. +toggle_toc = "Sisällysluettelo päälle/pois" +go_to_top = "Siirry sivun alkuun" +go_to_comments = "Siirry kommenttiosioon" + +# Post metadata. +by_author = "Kirjoittanut $AUTHOR" # $AUTHOR will be replaced by the author(s). Literally "Written by $AUTHOR" +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " ja " # For multiple authors. Ensure spacing where necessary. +draft = "LUONNOS" +zero_min_read = "<1 min. lukuaika" +one_min_read = "$NUMBER min. lukuaika" +many_min_read = "$NUMBER min. lukuaika" +zero_words = "Ei sanoja" +one_words = "$NUMBER sana" +many_words = "$NUMBER sanaa" +last_updated_on = "Päivitetty $DATE" +see_changes = "Katso muutokset" + +# Post body. +table_of_contents = "Sisällysluettelo" +load_comments = "Lataa kommentit" + +# Copy code block button. +copied = "Kopioitu!" +copy_code_to_clipboard = "Kopioi koodi leikepöydälle" + +# iine appreciation button. +like_this_post = "Pidän tästä kirjoituksesta" + +# Footer: Powered by Zola and tabi. +powered_by = "Pyörii ohjelmilla" # "Works using the software" +and = "&" +site_source = "Sivuston lähdekoodi" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "Pyytämääsi sivua ei löydy" +translation_missing = "tai sitä ei ole vielä käännetty kielellesi" +check_url = "Tarkista URL-osoitteesta mahdolliset virheet tai" +go_home = "palaa etusivulle" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Näytä alkuperäinen lainaus" +show_translation = "Näytä käännös" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Tämä on verkkosyöte, joka tunnetaan myös nimellä Atom-syöte. Tilaa kopioimalla URL-osoite osoitepalkista uutislukijaasi. Käy sivulla About Feeds saadaksesi lisätietoja ja aloittaakeksi. Se on ilmaista." +visit_the_site = "Vieraile sivustolla" +recent_posts = "Viimeisimmät julkaisut" diff --git a/themes/tabi-lean/i18n/fr.toml b/themes/tabi-lean/i18n/fr.toml new file mode 100644 index 0000000..54c8666 --- /dev/null +++ b/themes/tabi-lean/i18n/fr.toml @@ -0,0 +1,98 @@ +language_name = "Français" # Shown in language picker for multi-language sites. +date_locale = "fr_FR" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blog" +archive = "archives" +tags = "étiquettes" +projects = "projets" +about = "à propos" +contact = "contact" +privacy = "politique de confidentialité" +site_statistics = "statistiques du site" +sitemap = "plan du site" + +# Search. +search = "Rechercher" +search_icon_title = "Cliquez ou appuyez sur $SHORTCUT pour ouvrir la recherche" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Effacer la recherche" # Title of the X icon next to search input. +zero_results = "Aucun résultat trouvé" +one_results = "$NUMBER résultat" # "1 result" +many_results = "$NUMBER résultats" # "3 results" + +# Navigation. +pinned = "Épinglé" +jump_to_posts = "Aller aux articles" +read_more = "Lire plus" +one_posts = "$NUMBER article" +many_posts = "$NUMBER articles" +prev = "Précédent" # As in "Previous" page. +next = "Suivant" # As in "Next" page. +of = "sur" # E.g. Page 1 "of" 3 +all_posts = "Tous les articles" +all_tags = "Toutes les étiquettes" +all_projects = "Tous les projets" +featured_projects = "Projets à la une" +language_selection = "Sélection de la langue" +toggle_mode = "Basculer en mode $MODE" # $MODE will be replaced by a value (or both) below. +dark = "sombre" +light = "clair" +reset_mode = "Réinitialiser le mode aux valeurs par défaut" + +# Quick navigation buttons. +toggle_toc = "Afficher/Masquer la table des matières" +go_to_top = "Aller en haut de la page" +go_to_comments = "Aller à la section des commentaires" + +# Post metadata. +by_author = "Par $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " et " # For multiple authors. Ensure spacing where necessary. +draft = "BROUILLON" +zero_min_read = "<1 min de lecture" +one_min_read = "$NUMBER min de lecture" +many_min_read = "$NUMBER min de lecture" +zero_words = "aucun mot" +one_words = "$NUMBER mot" +many_words = "$NUMBER mots" +last_updated_on = "Mis à jour le $DATE" +see_changes = "Voir les modifications" + +# Post body. +table_of_contents = "Table des matières" +load_comments = "Afficher les commentaires" + +# Copy code block button. +copied = "Copié !" +copy_code_to_clipboard = "Copier le code dans le presse-papier" + +# iine appreciation button. +like_this_post = "J'aime cet article" + +# Footer: Powered by Zola and tabi. +powered_by = "Propulsé par" +and = "et" +site_source = "Code du site" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "La page que vous avez demandée semble être manquante" +translation_missing = "ou n'a pas encore été traduite dans votre langue" +check_url = "Vérifiez que l'URL ne contient pas d'erreur ou" +go_home = "retournez à la page d'accueil" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Afficher la citation originale" +show_translation = "Afficher la traduction" +open_quotation_mark = "«" +close_quotation_mark = "»" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Ceci est un flux web, également connu sous le nom de flux Atom. Abonnez-vous en copiant l'URL de la barre d'adresse dans votre lecteur de nouvelles. Visitez About Feeds pour en savoir plus et commencez. C'est gratuit." +visit_the_site = "Visitez le site web" +recent_posts = "Articles récents" diff --git a/themes/tabi-lean/i18n/hi.toml b/themes/tabi-lean/i18n/hi.toml new file mode 100644 index 0000000..2ac79ba --- /dev/null +++ b/themes/tabi-lean/i18n/hi.toml @@ -0,0 +1,100 @@ +# This has been machine translated. +# If you would like to help correct errors or improve the translation, please open an issue or submit a pull request. +language_name = "हिंदी" # Shown in language picker for multi-language sites. +date_locale = "hi_IN" +full_stop ="।" # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "ब्लॉग" +archive = "संग्रह" +tags = "टैग" +projects = "परियोजनाएं" +about = "बारे में" +contact = "संपर्क" +privacy = "गोपनीयता नीति" +site_statistics = "साइट सांख्यिकी" +sitemap = "साइटमैप" + +# Search. +search = "खोजें" +search_icon_title = "$SHORTCUT दबाएँ या क्लिक करें खोज खोलने के लिए" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "खोज साफ करें" # Title of the X icon next to search input. +zero_results = "कोई परिणाम नहीं मिला" +one_results = "$NUMBER परिणाम" # "1 result" +many_results = "$NUMBER परिणाम" # "3 results" + +# Navigation. +pinned = "पिन किया गया" +jump_to_posts = "पोस्ट पर जाएं" +read_more = "और पढ़ें" +one_posts = "$NUMBER पोस्ट" +many_posts = "$NUMBER पोस्ट्स" +prev = "पिछला" # As in "Previous" page. +next = "अगला" # As in "Next" page. +of = "का" # E.g. Page 1 "of" 3 +all_posts = "सभी पोस्ट्स" +all_tags = "सभी टैग्स" +all_projects = "सभी प्रोजेक्ट" +featured_projects = "विशेष प्रोजेक्ट" +language_selection = "भाषा चयन" +toggle_mode = "$MODE मोड में टॉगल करें" # $MODE will be replaced by a value (or both) below. +dark = "अंधेरा" +light = "रोशनी" +reset_mode = "मोड को साइट डिफ़ॉल्ट पर रीसेट करें" + +# Quick navigation buttons. +toggle_toc = "विषय-सूची टॉगल करें" +go_to_top = "पृष्ठ के शीर्ष पर जाएं" +go_to_comments = "टिप्पणी अनुभाग में जाएं" + +# Post metadata. +by_author = "$AUTHOR द्वारा" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " और " # For multiple authors. Ensure spacing where necessary. +draft = "मसौदा" +zero_min_read = "कम से कम 1 मिनट पठन समय" +one_min_read = "$NUMBER मिनट पठन समय" +many_min_read = "$NUMBER मिनट पठन समय" +zero_words = "कोई शब्द नहीं" +one_words = "$NUMBER शब्द" +many_words = "$NUMBER शब्द" +last_updated_on = "$DATE को अपडेट किया गया" +see_changes = "बदलाव देखें" + +# Post body. +table_of_contents = "विषय सूची" +load_comments = "कमेंट्स लोड करें" + +# Copy code block button. +copied = "कॉपी किया गया!" +copy_code_to_clipboard = "कोड क्लिपबोर्ड में कॉपी करें" + +# iine appreciation button. +like_this_post = "मुझे यह पोस्ट पसंद है" + +# Footer: Powered by Zola and tabi. +powered_by = "चालित द्वारा" +and = "और" +site_source = "साइट का स्रोत" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "आपके द्वारा अनुरोधित पृष्ठ मौजूद नहीं है" +translation_missing = "या फिर आपकी भाषा में अनुवाद नहीं किया गया है" +check_url = "URL में त्रुटियों की जांच करें या" +go_home = "मुख्य पृष्ठ पर वापस जाएं" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "मौलिक उद्धरण दिखाएं" +show_translation = "अनुवाद दिखाएं" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "यह एक वेब फ़ीड है, जिसे एटम फ़ीड भी कहा जाता है। अपने न्यूज़रीडर में एड्रेस बार से URL कॉपी करके सब्सक्राइब करें। About Feeds पर जाकर और अधिक जानकारी प्राप्त करें और शुरू करें। यह सेवा मुफ़्त है।" +visit_the_site = "वेबसाइट पर जाएं" +recent_posts = "हाल की पोस्ट्स" diff --git a/themes/tabi-lean/i18n/it.toml b/themes/tabi-lean/i18n/it.toml new file mode 100644 index 0000000..4b558c9 --- /dev/null +++ b/themes/tabi-lean/i18n/it.toml @@ -0,0 +1,97 @@ +language_name = "Italiano" # Shown in language picker for multi-language sites. +date_locale = "it_IT" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blog" +archive = "archivio" +tags = "tag" +projects = "progetti" +about = "chi sono" +contact = "contatto" +privacy = "politica sulla privacy" +site_statistics = "statistiche del sito" +sitemap = "mappa del sito" + +# Search. +search = "Cerca" +search_icon_title = "Clicca o premi $SHORTCUT per aprire la ricerca" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Cancella ricerca" # Title of the X icon next to search input. +zero_results = "Nessun risultato trovato" +one_results = "$NUMBER risultato" +many_results = "$NUMBER risultati" + +# Navigation. +pinned = "In evidenza" +jump_to_posts = "Vai ai post" +read_more = "Leggi di più" +one_posts = "$NUMBER post" +many_posts = "$NUMBER post" +prev = "Precedente" # As in "Previous" page. +next = "Successivo" # As in "Next" page. +of = "di" # E.g. Page 1 "of" 3 +all_posts = "Tutti i post" +all_tags = "Tutti i tag" +all_projects = "Tutti i progetti" +featured_projects = "Progetti in evidenza" +language_selection = "Selezione della lingua" +toggle_mode = "Passa alla modalità $MODE" # $MODE will be replaced by a value (or both) below. +dark = "scuro" +light = "chiaro" +reset_mode = "Reimposta la modalità alle impostazioni predefinite" + +# Quick navigation buttons. +toggle_toc = "Attiva/Disattiva indice" +go_to_top = "Vai in cima alla pagina" +go_to_comments = "Vai alla sezione commenti" + +# Post metadata. +by_author = "Di $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " e " # For multiple authors. Ensure spacing where necessary. +draft = "BOZZA" +zero_min_read = "<1 min di lettura" +one_min_read = "$NUMBER min di lettura" +many_min_read = "$NUMBER min di lettura" +zero_words = "Nessuna parola" +one_words = "$NUMBER parola" +many_words = "$NUMBER parole" +last_updated_on = "Aggiornato il $DATE" +see_changes = "Vedi modifiche" + +# Post body. +table_of_contents = "Indice" +load_comments = "Carica commenti" + +# Copy code block button. +copied = "Copiato!" +copy_code_to_clipboard = "Copia codice negli appunti" + +# iine appreciation button. +like_this_post = "Mi piace questo post" + +# Footer: Powered by Zola and tabi. +powered_by = "Alimentato da" +and = "e" +site_source = "Codice del sito" + +# 404 error. +page_missing = "La pagina che hai richiesto sembra non esistere" +translation_missing = "o non è ancora stata tradotta nella tua lingua" +check_url = "Controlla l'URL per errori o" +go_home = "torna alla homepage" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Mostra citazione originale" +show_translation = "Mostra traduzione" +open_quotation_mark = "«" +close_quotation_mark = "»" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Questo è un feed web, noto anche come feed Atom. Iscriviti copiando l'URL dalla barra degli indirizzi nel tuo lettore di notizie. Visita About Feeds per saperne di più e iniziare. È gratuito." +visit_the_site = "Visita il sito web" +recent_posts = "Post recenti" diff --git a/themes/tabi-lean/i18n/ja.toml b/themes/tabi-lean/i18n/ja.toml new file mode 100644 index 0000000..c1a7533 --- /dev/null +++ b/themes/tabi-lean/i18n/ja.toml @@ -0,0 +1,102 @@ +# This has been machine translated. +# If you would like to help correct errors or improve the translation, +# please open an issue or submit a pull request. +# https://github.com/welpo/tabi +language_name = "日本語" # Shown in language picker for multi-language sites. +date_locale = "ja_JP" +full_stop = "。" # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "ブログ" +archive = "アーカイブ" +tags = "タグ" +projects = "プロジェクト" +about = "自己紹介" +contact = "お問い合わせ" +privacy = "プライバシーポリシー" +site_statistics = "サイト統計" +sitemap = "サイトマップ" + +# Search. +search = "検索" +search_icon_title = "$SHORTCUTを押すか、クリックして検索を開く" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "検索をクリア" # Title of the X icon next to search input. +zero_results = "結果が見つかりません" +one_results = "$NUMBER 結果" # "1 result" +many_results = "$NUMBER 結果" # "3 results" + +# Navigation. +pinned = "固定" +jump_to_posts = "投稿へジャンプ" +read_more = "続きを読む" +one_posts = "$NUMBER 投稿" +many_posts = "$NUMBER 投稿" +prev = "前" # As in "Previous" page. +next = "次" # As in "Next" page. +of = "中" # E.g. Page 1 "of" 3 +all_posts = "すべての投稿" +all_tags = "すべてのタグ" +all_projects = "全てのプロジェクト" +featured_projects = "注目のプロジェクト" +language_selection = "言語選択" +toggle_mode = "$MODE モードに切り替え" # $MODE will be replaced by a value (or both) below. +dark = "暗い" +light = "明るい" +reset_mode = "モードをサイトのデフォルトにリセット" + +# Quick navigation buttons. +toggle_toc = "目次を切り替え" +go_to_top = "ページの先頭へ" +go_to_comments = "コメントセクションへ" + +# Post metadata. +by_author = "$AUTHOR によって" # $AUTHOR will be replaced by the author(s). +author_separator = "、" # For multiple authors. Ensure spacing where necessary. +author_conjunction = "と" # For multiple authors. Ensure spacing where necessary. +draft = "ドラフト" +zero_min_read = "1分未満の読了時間" +one_min_read = "$NUMBER 分の読了時間" +many_min_read = "$NUMBER 分の読了時間" +zero_words = "単語数ゼロ" +one_words = "$NUMBER 単語" +many_words = "$NUMBER 単語" +last_updated_on = "$DATE に更新" +see_changes = "変更を見る" + +# Post body. +table_of_contents = "目次" +load_comments = "コメントを読む" + +# Copy code block button. +copied = "コピーしました!" +copy_code_to_clipboard = "コードをクリップボードにコピー" + +# iine appreciation button. +like_this_post = "いいね!" + +# Footer: Powered by Zola and tabi. +powered_by = "Powered by" +and = "と" +site_source = "サイトのソースコード" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "お探しのページは存在しません" +translation_missing = "または、まだあなたの言語に翻訳されていません" +check_url = "URLが正しいか確認してください、または" +go_home = "ホームページに戻る" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "オリジナルの引用を見る" +show_translation = "翻訳を見る" +open_quotation_mark = "「" +close_quotation_mark = "」" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "これはウェブフィードです、また、Atomフィードとしても知られています。URLをアドレスバーからニュースリーダーにコピーして登録してください。About Feedsを訪れて、詳細を知り、始めてください。無料です。" +visit_the_site = "ウェブサイトを訪れる" +recent_posts = "最近の投稿" diff --git a/themes/tabi-lean/i18n/ko.toml b/themes/tabi-lean/i18n/ko.toml new file mode 100644 index 0000000..f4e177e --- /dev/null +++ b/themes/tabi-lean/i18n/ko.toml @@ -0,0 +1,102 @@ +# This has been machine translated. +# If you would like to help correct errors or improve the translation, +# please open an issue or submit a pull request. +# https://github.com/welpo/tabi +language_name = "한국어" # Shown in language picker for multi-language sites. +date_locale = "ko_KR" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "블로그" +archive = "아카이브" +tags = "태그" +projects = "프로젝트" +about = "소개" +contact = "연락처" +privacy = "개인정보 처리방침" +site_statistics = "사이트 통계" +sitemap = "사이트맵" + +# Search. +search = "검색" +search_icon_title = "클릭하거나 $SHORTCUT을 눌러 검색 열기" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "검색 지우기" # Title of the X icon next to search input. +zero_results = "결과 없음" +one_results = "$NUMBER 결과" # "1 result" +many_results = "$NUMBER 결과" # "3 results" + +# Navigation. +pinned = "고정됨" +jump_to_posts = "게시물로 이동" +read_more = "더 읽기" +one_posts = "$NUMBER 게시물" +many_posts = "$NUMBER 게시물" +prev = "이전" # As in "Previous" page. +next = "다음" # As in "Next" page. +of = "중" # E.g. Page 1 "of" 3 +all_posts = "모든 게시물" +all_tags = "모든 태그" +all_projects = "모든 프로젝트" +featured_projects = "추천 프로젝트" +language_selection = "언어 선택" +toggle_mode = "$MODE 모드로 전환" # $MODE will be replaced by a value (or both) below. +dark = "어두운" +light = "밝은" +reset_mode = "모드를 사이트 기본값으로 재설정" + +# Quick navigation buttons. +toggle_toc = "목차 토글" +go_to_top = "페이지 상단으로" +go_to_comments = "댓글 섹션으로" + +# Post metadata. +by_author = "$AUTHOR 작성" # $AUTHOR will be replaced by the author(s). +author_separator = "、" # For multiple authors. Ensure spacing where necessary. +author_conjunction = "와" # For multiple authors. Ensure spacing where necessary. +draft = "임시 저장" +zero_min_read = "1분 미만 읽기" +one_min_read = "$NUMBER 분 읽기" +many_min_read = "$NUMBER 분 읽기" +zero_words = "단어 없음" +one_words = "$NUMBER 단어" +many_words = "$NUMBER 단어" +last_updated_on = "$DATE에 업데이트됨" +see_changes = "변경사항 보기" + +# Post body. +table_of_contents = "목차" +load_comments = "댓글 불러오기" + +# Copy code block button. +copied = "복사됨!" +copy_code_to_clipboard = "코드를 클립보드에 복사" + +# iine appreciation button. +like_this_post = "이 글이 좋아요" + +# Footer: Powered by Zola and tabi. +powered_by = "제공됨" +and = "&" +site_source = "사이트 소스" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "요청하신 페이지가 없습니다" +translation_missing = "또는 아직 해당 언어로 번역되지 않았습니다" +check_url = "URL을 확인하거나" +go_home = "홈페이지로 돌아가기" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "원문 인용 보기" +show_translation = "번역 보기" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "이것은 웹 피드이며, Atom 피드로도 알려져 있습니다. 주소 표시 줄의 URL을 뉴스 리더로 복사하여 구독하세요. About Feeds를 방문하여 자세히 알아보고 시작하세요. 무료입니다." +visit_the_site = "웹사이트 방문하기" +recent_posts = "최근 게시물" diff --git a/themes/tabi-lean/i18n/nl.toml b/themes/tabi-lean/i18n/nl.toml new file mode 100644 index 0000000..a300339 --- /dev/null +++ b/themes/tabi-lean/i18n/nl.toml @@ -0,0 +1,98 @@ +language_name = "Dutch" # Shown in language picker for multi-language sites. +date_locale = "nl_NL" #nl_BE can also be used for Flemish +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blog" +archive = "archief" +tags = "labels" +projects = "projecten" +about = "over ons" +contact = "contact" +privacy = "privacybeleid" +site_statistics = "website statistieken" +sitemap = "sitemap" + +# Search. +search = "Zoeken" +search_icon_title = "Klik of druk op $SHORTCUT om de zoekopdracht te openen" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Verwijder zoekopdracht" # Title of the X icon next to search input. +zero_results = "Geen resultaten" +one_results = "$NUMBER resultaat" # "1 result" +many_results = "$NUMBER resultaten" # "3 results" + +# Navigation. +pinned = "Vastgezet" +jump_to_posts = "Naar berichten springen" +read_more = "Lees meer" +one_posts = "$NUMBER bericht" # "1 post" +many_posts = "$NUMBER berichten" # "3 posts" +prev = "Vorige" # As in "Previous" page. - Vorige pagina +next = "Volgende" # As in "Next" page. - Volgende pagina +of = "van" # E.g. Page 1 "of" 3 +all_posts = "Alle berichten" +all_tags = "Alle labels" +all_projects = "Alle projecten" +featured_projects = "Aanbevolen projecten" +language_selection = "Selecteer taal" +toggle_mode = "Schakel de $MODE-modus in" # $MODE will be replaced by a value (or both) below. +dark = "donker" +light = "licht" +reset_mode = "Reset de modus naar de standaardwaarde" + +# Quick navigation buttons. +toggle_toc = "Schakel inhoudsopgave in of uit" +go_to_top = "Ga naar de bovenkant van de pagina" +go_to_comments = "Ga naar opmerkingen" + +# Post metadata. +by_author = "Door $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " en " # For multiple authors. Ensure spacing where necessary. +draft = "VOORLOPIGE VERSIE" +zero_min_read = "<1 minuut lezen" +one_min_read = "$NUMBER minuut lezen" +many_min_read = "$NUMBER minuten lezen" +zero_words = "Geen woorden" +one_words = "$NUMBER woord" +many_words = "$NUMBER woorden" +last_updated_on = "Bijgewerkt op $DATE" +see_changes = "Zie wijzigingen" + +# Post body. +table_of_contents = "Inhoudsopgave" +load_comments = "Laad opmerkingen" + +# Copy code block button. +copied = "Gekopieerd!" +copy_code_to_clipboard = "Kopieer code naar klembord" + +# iine appreciation button. +like_this_post = "Vind ik leuk" + +# Footer: Powered by Zola and tabi. +powered_by = "Aangedreven door" +and = "&" +site_source = "Sitebron" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "Het lijkt erop dat de door u opgevraagde pagina ontbreekt" +translation_missing = "of het is nog niet in jouw taal vertaald" +check_url = "Controleer de URL op fouten of" +go_home = "ga terug naar de startpagina" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Toon origineel citaat" +show_translation = "Vertaling tonen" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Dit is een webfeed, ook wel Atom-feed genoemd. Abonneer u door de URL uit de adresbalk naar uw nieuwslezer te kopiëren. Ga naar About Feeds voor meer informatie en om aan de slag te gaan. Het is gratis." +visit_the_site = "Bezoek website" +recent_posts = "Recente berichten" diff --git a/themes/tabi-lean/i18n/or.toml b/themes/tabi-lean/i18n/or.toml new file mode 100644 index 0000000..e431309 --- /dev/null +++ b/themes/tabi-lean/i18n/or.toml @@ -0,0 +1,98 @@ +language_name = "ଓଡ଼ିଆ" # Shown in language picker for multi-language sites. +date_locale = "or_IN" +full_stop = "।" # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "ବ୍ଲଗ" +archive = "ଆର୍କାଇଭ" +tags = "ଟ୍ୟାଗଗୁଡ଼ିକ" +projects = "ପ୍ରକଳ୍ପଗୁଡ଼ିକ" +about = "ବାବଦରେ" +contact = "ଯୋଗାଯୋଗ" +privacy = "ଗୋପନୀୟତା ନୀତି" +site_statistics = "ସାଇଟ ପରିସଂଖ୍ୟାନ" +sitemap = "ସାଇଟମ୍ୟାପ" + +# Search. +search = "ଖୋଜନ୍ତୁ" +search_icon_title = "ଖୋଜିବାକୁ $SHORTCUT କୁ ଚିପନ୍ତୁ କିମ୍ବା କ୍ଲିକ କରନ୍ତୁ" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "ଖୋଜା ସଫା କରନ୍ତୁ" # Title of the X icon next to search input. +zero_results = "କିଛି ମିଳିଲା ନାହିଁ" +one_results = "$NUMBER ପରିଣାମ" # "1 result" +many_results = "$NUMBER ପରିଣାମଗୁଡ଼ିକ" # "3 results" + +# Navigation. +pinned = "ପିନ୍ କରାଯାଇଛି" +jump_to_posts = "ପୋଷ୍ଟକୁ ଯାଆନ୍ତୁ" +read_more = "ଆହୁରି ପଢ଼ନ୍ତୁ" +one_posts = "$NUMBER ପୋଷ୍ଟ" +many_posts = "$NUMBER ପୋଷ୍ଟଗୁଡ଼ିକ" # "3 posts" +prev = "ପୂର୍ବ" # As in "Previous" page. +next = "ପର" # As in "Next" page. +of = "ର" # E.g. Page 1 "of" 3 +all_posts = "ସମସ୍ତ ପୋଷ୍ଟଗୁଡ଼ିକ" +all_tags = "ସମସ୍ତ ଟ୍ୟାଗଗୁଡ଼ିକ" +all_projects = "ସମସ୍ତ ପ୍ରକଳ୍ପଗୁଡ଼ିକ" +featured_projects = "ବିଶେଷ ପ୍ରକଳ୍ପଗୁଡ଼ିକ" +language_selection = "ଭାଷା ଚୟନ" +toggle_mode = "$MODE ଟଗଲ କରନ୍ତୁ" # $MODE will be replaced by a value (or both) below. +dark = "ଅନ୍ଧାର" +light = "ଆଲୋକ" +reset_mode = "ସାଇଟର ମୂଳ ମୋଡକୁ ଆଣନ୍ତୁ" + +# Quick navigation buttons. +toggle_toc = "ସୂଚୀପତ୍ର ଟଗଲ କରନ୍ତୁ" +go_to_top = "ପୃଷ୍ଠାର ଶୀର୍ଷକୁ ଯାଆନ୍ତୁ" +go_to_comments = "ମତାମତ ବିଭାଗକୁ ଯାଆନ୍ତୁ" + +# Post metadata. +by_author = "$AUTHOR ଙ୍କ ଦ୍ୱାରା" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " ଏବଂ " # For multiple authors. Ensure spacing where necessary. +draft = "ଡ୍ରାଫ୍ଟ" +zero_min_read = "<୧ ମିନିଟ ପଢ଼ିବା ସମୟ" +one_min_read = "$NUMBER ମିନିଟ ପଢ଼ିବା ସମୟ" +many_min_read = "$NUMBER ମିନିଟ ପଢ଼ିବା ସମୟ" +zero_words = "କୌଣସି ଶବ୍ଦ ନାହିଁ " +one_words = "$NUMBER ଶବ୍ଦ" +many_words = "$NUMBER ଶବ୍ଦଗୁଡ଼ିକ" +last_updated_on = "$DATE ଦିନ ଅଦ୍ୟତନ ହୋଇଥିଲା" +see_changes = "ପରିବର୍ତ୍ତନଗୁଡ଼ିକୁ ଦେଖନ୍ତୁ" + +# Post body. +table_of_contents = "ସୂଚୀପତ୍ର" +load_comments = "ମତାମତ ଲୋଡ କରନ୍ତୁ" + +# Copy code block button. +copied = "କପି ହେଲା!" +copy_code_to_clipboard = "କ୍ଲିପବୋର୍ଡକୁ କପି କରନ୍ତୁ" + +# iine appreciation button. +like_this_post = "ମୋର ଏହି ପୋସ୍ଟ ଭଲ ଲାଗେ" + +# Footer: Powered by Zola and tabi. +powered_by = "ଚାଳିତ ଦ୍ୱାରା" +and = "ଏବଂ" +site_source = "ସାଇଟ ଉତ୍ସ" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "ଆପଣ ଯେଉଁ ପୃଷ୍ଠାଟିକୁ ଅନୁରୋଧ କରିଥିଲେ ତାହା ନାହିଁ" +translation_missing = "କିମ୍ବା ଆପଣଙ୍କର ଭାଷାକୁ ଏପର୍ଯ୍ୟନ୍ତ ଅନୁବାଦିତ ହୋଇନାହିଁ" +check_url = "ତୃଟିଗୁଡ଼ିକ ପାଇଁ URL କୁ ଦେଖନ୍ତୁ କିମ୍ବା" +go_home = "ମୂଳ ପୃଷ୍ଠାକୁ ଫେରିଯାଆନ୍ତୁ" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "ମୂଳ ଉଦ୍ଧୃତ ଦେଖାନ୍ତୁ" +show_translation = "ଅନୁବାଦ ଦେଖାନ୍ତୁ" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "ଏହା ଏକ ୱେବ୍ ଫିଡ୍, ଯାହାକୁ ଆଟମ୍ ଫିଡ୍ ମଧ୍ୟ କୁହାଯାଏ। ଠିକଣା ବାରରୁ URL କୁ ଆପଣଙ୍କ ନ୍ୟୁଜ୍ ରିଡରରେ କପି କରି ସବ୍ସ୍କ୍ରାଇବ୍ କରନ୍ତୁ। ଅଧିକ ଜାଣିବା ଏବଂ ଆରମ୍ଭ କରିବାକୁ About Feeds ଯାଆନ୍ତୁ। ଏହା ମାଗଣା ଅଟେ ।" +visit_the_site = "ୱେବସାଇଟକୁ ଯାଆନ୍ତୁ" +recent_posts = "ସାମ୍ପ୍ରତିକ ପୋଷ୍ଟଗୁଡିକ" diff --git a/themes/tabi-lean/i18n/pt-PT.toml b/themes/tabi-lean/i18n/pt-PT.toml new file mode 100644 index 0000000..fa79380 --- /dev/null +++ b/themes/tabi-lean/i18n/pt-PT.toml @@ -0,0 +1,98 @@ +language_name = "Português" # Shown in language picker for multi-language sites. +date_locale = "pt_PT" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blog" +archive = "arquivo" +tags = "etiquetas" +projects = "projetos" +about = "sobre" +contact = "contacto" +privacy = "política de privacidade" +site_statistics = "estatísticas do site" +sitemap = "mapa do site" + +# Search. +search = "Pesquisar" +search_icon_title = "Clique ou pressione $SHORTCUT para abrir a pesquisa" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Limpar pesquisa" # Title of the X icon next to search input. +zero_results = "Nenhum resultado encontrado" +one_results = "$NUMBER resultado" # "1 result" +many_results = "$NUMBER resultados" # "3 results" + +# Navigation. +pinned = "Fixado" +jump_to_posts = "Ir para as publicações" +read_more = "Ler mais" +one_posts = "$NUMBER publicação" +many_posts = "$NUMBER publicações" +prev = "Anterior" # As in "Previous" page. +next = "Seguinte" # As in "Next" page. +of = "de" # E.g. Page 1 "of" 3 +all_posts = "Todas as publicações" +all_tags = "Todas as etiquetas" +all_projects = "Todos os projetos" +featured_projects = "Projetos em destaque" +language_selection = "Seleção de idioma" +toggle_mode = "Alternar para o modo $MODE" # $MODE will be replaced by a value (or both) below. +dark = "escuro" +light = "claro" +reset_mode = "Repor o modo para o padrão" + +# Quick navigation buttons. +toggle_toc = "Alternar Índice" +go_to_top = "Ir para o topo da página" +go_to_comments = "Ir para a seção de comentários" + +# Post metadata. +by_author = "Por $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " e " # For multiple authors. Ensure spacing where necessary. +draft = "RASCUNHO" +zero_min_read = "<1 min de leitura" +one_min_read = "$NUMBER min de leitura" +many_min_read = "$NUMBER mins de leitura" +zero_words = "Nenhuma palavra" +one_words = "$NUMBER palavra" +many_words = "$NUMBER palavras" +last_updated_on = "Atualizado em $DATE" +see_changes = "Ver alterações" + +# Post body. +table_of_contents = "Índice de conteúdo" +load_comments = "Carregar comentários" + +# Copy code block button. +copied = "Copiado!" +copy_code_to_clipboard = "Copiar código para a área de transferência" + +# iine appreciation button. +like_this_post = "Gosto desta publicação" + +# Footer: Powered by Zola and tabi. +powered_by = "Impulsionado por" +and = "e" +site_source = "Código do site" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "A página que solicitou não existe" +translation_missing = "ou ainda não foi traduzida para o seu idioma" +check_url = "Verifique se o URL está correto ou" +go_home = "volte à página inicial" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Mostrar citação original" +show_translation = "Mostrar tradução" +open_quotation_mark = "«" +close_quotation_mark = "»" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Isto é um feed web, também conhecido como feed Atom. Subscreva copiando o URL da barra de endereços para o seu leitor de notícias. Visite About Feeds para aprender mais e começar. É grátis." +visit_the_site = "Visite o website" +recent_posts = "Publicações recentes" diff --git a/themes/tabi-lean/i18n/ru.toml b/themes/tabi-lean/i18n/ru.toml new file mode 100644 index 0000000..16765e3 --- /dev/null +++ b/themes/tabi-lean/i18n/ru.toml @@ -0,0 +1,107 @@ +language_name = "Русский" # Shown in language picker for multi-language sites. +date_locale = "ru_RU" +full-stop = "." # Used at the end of a sentence. + +# Note on pluralization prefixes: +# - few_: for numbers ending in 2-4, except 12-14, in genitive singular. +# - many_: for all others, including 5-9, 0, and teens (11-14), in genitive plural. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "блог" +archive = "архив" +tags = "теги" +projects = "проекты" +about = "обо мне" +contact = "контакт" +privacy = "политика конфиденциальности" +site_statistics = "статистика сайта" +sitemap = "карта сайта" + +# Search. +search = "Поиск" +search_icon_title = "Нажмите или используйте $SHORTCUT для открытия поиска" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Очистить поиск" # Title of the X icon next to search input. +zero_results = "Нет результатов" +one_results = "$NUMBER результат" +few_results = "$NUMBER результата" # 2, 3, 4 but not 12-14 +many_results = "$NUMBER результатов" # 5-9, 0, 11-14, and others + +# Navigation. +pinned = "Закреплено" +jump_to_posts = "Перейти к записям" +read_more = "Читать далее" +post = "пост" +one_posts = "$NUMBER пост" +few_posts = "$NUMBER поста" # 2, 3, 4 but not 12-14 +many_posts = "$NUMBER постов" # 5-9, 0, 11-14, and others +prev = "Пред." # As in "Previous" page. +next = "След." # As in "Next" page. +of = "из" # E.g. Page 1 "of" 3 +all_posts = "Все посты" +all_tags = "Все теги" +all_projects = "Все проекты" +featured_projects = "Избранные проекты" +language_selection = "Выбор языка" +toggle_mode = "Переключить на режим $MODE" # $MODE will be replaced by a value (or both) below. +dark = "тёмный" +light = "светлый" +reset_mode = "Сбросить режим к стандартным настройкам сайта" + +# Quick navigation buttons. +toggle_toc = "Показать/Скрыть оглавление" +go_to_top = "Перейти в начало страницы" +go_to_comments = "Перейти к комментариям" + +# Post metadata. +by_author = "От $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " и " # For multiple authors. Ensure spacing where necessary. +draft = "ЧЕРНОВИК" +zero_min_read = "<1 мин чтения" +one_min_read = "$NUMBER мин чтения" +few_min_read = "$NUMBER мин чтения" # 2, 3, 4 but not 12-14 +many_min_read = "$NUMBER мин чтения" # 5-9, 0, 11-14, and others +zero_words = "Нет слов" +one_words = "$NUMBER слово" +few_words = "$NUMBER слова" # 2, 3, 4 but not 12-14 +many_words = "$NUMBER слов" # 5-9, 0, 11-14, and others +last_updated_on = "Обновлено $DATE" +see_changes = "Смотреть изменения" + +# Post body. +table_of_contents = "Содержание" +load_comments = "Загрузить комментарии" + +# Copy code block button. +copied = "Скопировано!" +copy_code_to_clipboard = "Скопировать код в буфер обмена" + +# iine appreciation button. +like_this_post = "Мне нравится эта статья" + +# Footer: Powered by Zola and tabi. +powered_by = "Под управлением" +and = "&" +site_source = "Исходный код сайта" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "Запрашиваемая вами страница отсутствует" +translation_missing = "или еще не переведена на ваш язык" +check_url = "Проверьте URL на ошибки или" +go_home = "вернитесь на главную страницу" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Показать оригинальную цитату" +show_translation = "Показать перевод" +open_quotation_mark = "«" +close_quotation_mark = "»" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Это веб-фид, известный также как Atom-фид. Чтобы подписаться, скопируйте URL из адресной строки в ваш RSS-ридер. Посетите About Feeds для дополнительной информации и начала использования." +visit_the_site = "Посетить веб-сайт" +recent_posts = "Последние посты" diff --git a/themes/tabi-lean/i18n/uk.toml b/themes/tabi-lean/i18n/uk.toml new file mode 100644 index 0000000..d20cb8e --- /dev/null +++ b/themes/tabi-lean/i18n/uk.toml @@ -0,0 +1,111 @@ +# This has been machine translated. +# If you would like to help correct errors or improve the translation, +# please open an issue or submit a pull request. +# https://github.com/welpo/tabi + +# Note on pluralization prefixes: +# - few_: for numbers ending in 2-4, except 12-14, in genitive singular. +# - many_: for all others, including 5-9, 0, and teens (11-14), in genitive plural. + +language_name = "Українська" # Shown in language picker for multi-language sites. +date_locale = "uk_UA" +full-stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "блог" +archive = "архів" +tags = "теги" +projects = "проєкти" +about = "про мене" +contact = "контакт" +privacy = "політика конфіденційності" +site_statistics = "статистика сайту" +sitemap = "карта сайту" + +# Search. +search = "Пошук" +search_icon_title = "Натисніть або використовуйте $SHORTCUT, щоб відкрити пошук" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Очистити пошук" # Title of the X icon next to search input. +zero_results = "Немає результатів" +one_results = "$NUMBER результат" +few_results = "$NUMBER результати" +many_results = "$NUMBER результатів" + +# Navigation. +pinned = "Закріплено" +jump_to_posts = "Перейти до дописів" +read_more = "Читати далі" +one_posts = "$NUMBER пост" +few_posts = "$NUMBER пости" # 2, 3, 4 but not 12-14 +many_posts = "$NUMBER постів" # 5-9, 0, 11-14, and others +prev = "Попер." # As in "Previous" page. +next = "Наст." # As in "Next" page. +of = "з" # E.g. Page 1 "of" 3 +all_posts = "Всі пости" +all_tags = "Всі теги" +all_projects = "Усі проекти" +featured_projects = "Обрані проекти" +language_selection = "Вибір мови" +toggle_mode = "Перемкнути в режим $MODE" # $MODE will be replaced by a value (or both) below. +dark = "темний" +light = "світлий" +reset_mode = "Скинути режим до типових налаштувань сайту" + +# Quick navigation buttons. +toggle_toc = "Показати/Сховати зміст" +go_to_top = "Перейти на початок сторінки" +go_to_comments = "Перейти до коментарів" + +# Post metadata. +by_author = "Від $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " і " # For multiple authors. Ensure spacing where necessary. +draft = "ЧЕРНЕТКА" +zero_min_read = "<1 хв. читання" +one_min_read = "$NUMBER хв. читання" +few_min_read = "$NUMBER хв. читання" # 2, 3, 4 but not 12-14 +many_min_read = "$NUMBER хв. читання" # 5-9, 0, 11-14, and others +zero_words = "Без слів" +one_words = "$NUMBER слово" +few_words = "$NUMBER слова" # 2, 3, 4 but not 12-14 +many_words = "$NUMBER слів" # 5-9, 0, 11-14, and others +last_updated_on = "Оновлено $DATE" +see_changes = "Переглянути зміни" + +# Post body. +table_of_contents = "Зміст" +load_comments = "Завантажити коментарі" + +# Copy code block button. +copied = "Скопійовано!" +copy_code_to_clipboard = "Копіювати код у буфер обміну" + +# iine appreciation button. +like_this_post = "Мені подобається ця стаття" + +# Footer: Powered by Zola and tabi. +powered_by = "Під управлінням" +and = "та" +site_source = "Вихідний код сайту" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "Сторінка, яку ви запитуєте, відсутня" +translation_missing = "або ще не перекладена на вашу мову" +check_url = "Перевірте URL на помилки або" +go_home = "поверніться на головну сторінку" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Показати оригінальну цитату" +show_translation = "Показати переклад" +open_quotation_mark = "«" +close_quotation_mark = "»" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Це веб-канал, також відомий як Atom-канал. Щоб підписатися, скопіюйте URL з адресного рядка у ваш RSS-читач. Відвідайте About Feeds для додаткової інформації та початку використання." +visit_the_site = "Відвідати веб-сайт" +recent_posts = "Останні пости" diff --git a/themes/tabi-lean/i18n/zh-Hans.toml b/themes/tabi-lean/i18n/zh-Hans.toml new file mode 100644 index 0000000..f4f181b --- /dev/null +++ b/themes/tabi-lean/i18n/zh-Hans.toml @@ -0,0 +1,98 @@ +language_name = "简体中文" # Shown in language picker for multi-language sites. +date_locale = "zh_CN" +full_stop = "。" # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "博客" +archive = "归档" +tags = "标签" +projects = "项目" +about = "关于" +contact = "联系方式" # Machine translated. +privacy = "隐私政策" # Machine translated. +site_statistics = "网站统计" # Machine translated. +sitemap = "站点地图" # Machine translated. + +# Search. +search = "搜索" +search_icon_title = "点击或按 $SHORTCUT 开启搜索" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "清除搜索" # Title of the X icon next to search input. +zero_results = "没有找到结果" +one_results = "$NUMBER 个结果" +many_results = "$NUMBER 个结果" + +# Navigation. +pinned = "置顶" +jump_to_posts = "跳转到文章" +read_more = "阅读全文" +one_posts = "$NUMBER 篇文章" +many_posts = "$NUMBER 篇文章" +prev = "上一页" # As in "Previous" page. +next = "下一页" # As in "Next" page. +of = "/" # E.g. Page 1 "of" 3 +all_posts = "所有文章" +all_tags = "所有标签" +all_projects = "所有项目" # Machine translated. +featured_projects = "特色项目" # Machine translated. +language_selection = "语言选择" # Machine translated. +toggle_mode = "切换到$MODE模式" # $MODE will be replaced by a value (or both) below. Machine translated. +dark = "暗" # Machine translated. +light = "亮" # Machine translated. +reset_mode = "将模式重置为网站默认值" # Machine translated. + +# Quick navigation buttons. +toggle_toc = "切换目录" # Machine translated. +go_to_top = "返回页面顶部" # Machine translated. +go_to_comments = "转到评论区" # Machine translated. + +# Post metadata. +by_author = "由$AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = "、" # For multiple authors. Ensure spacing where necessary. +author_conjunction = "和" # For multiple authors. Ensure spacing where necessary. +draft = "草稿" +zero_min_read = "少于1分钟阅读" +one_min_read = "$NUMBER 分钟阅读" +many_min_read = "$NUMBER 分钟阅读" +zero_words = "没有字" +one_words = "$NUMBER 字" +many_words = "$NUMBER 字" +last_updated_on = "更新于 $DATE" +see_changes = "修改纪录" + +# Post body. +table_of_contents = "目录" +load_comments = "载入留言" + +# Copy code block button. +copied = "已复制!" # Machine translated. +copy_code_to_clipboard = "复制代码到剪贴板" # Machine translated. + +# iine appreciation button. +like_this_post = "喜欢这篇文章" + +# Footer: Powered by Zola and tabi. +powered_by = "网站基于" +and = "和" +site_source = "查看原始码" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "您请求的页面似乎不存在" +translation_missing = "或尚未翻译成您的语言" +check_url = "请检查网址是否有误或" +go_home = "返回首页" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "显示原文" +show_translation = "显示译文" +open_quotation_mark = "「" +close_quotation_mark = "」" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "这是Web Feed,又称为Atom Feed,把现在的网址复制到新闻阅读器即可订阅本站文章。造访「About Feeds」来了解更多资讯。" +visit_the_site = "造访网站" +recent_posts = "近期文章" diff --git a/themes/tabi-lean/i18n/zh-Hant.toml b/themes/tabi-lean/i18n/zh-Hant.toml new file mode 100644 index 0000000..29d6282 --- /dev/null +++ b/themes/tabi-lean/i18n/zh-Hant.toml @@ -0,0 +1,98 @@ +language_name = "繁體中文" # Shown in language picker for multi-language sites. +date_locale = "zh_TW" +full_stop = "。" # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "網誌" +archive = "歸檔" +tags = "標籤" +projects = "專案" +about = "關於" +contact = "聯絡方式" # Machine translated. +privacy = "隱私政策" # Machine translated. +site_statistics = "網站統計" # Machine translated. +sitemap = "網站地圖" # Machine translated. + +# Search. +search = "搜尋" +search_icon_title = "點擊或按 $SHORTCUT 來開啟搜尋" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "清除搜尋" # Title of the X icon next to search input. +zero_results = "沒有找到結果" +one_results = "$NUMBER 個結果" +many_results = "$NUMBER 個結果" + +# Navigation. +pinned = "釘選" +jump_to_posts = "跳轉到文章" +read_more = "閱讀全文" +one_posts = "$NUMBER 篇文章" +many_posts = "$NUMBER 篇文章" +prev = "上一頁" # As in "Previous" page. +next = "下一頁" # As in "Next" page. +of = "/" # E.g. Page 1 "of" 3 +all_posts = "所有文章" +all_tags = "所有標籤" +all_projects = "所有項目" # Machine translated. +featured_projects = "精選項目" # Machine translated. +language_selection = "語言選擇" # Machine translated. +toggle_mode = "切換到$MODE模式" # $MODE will be replaced by a value (or both) below. Machine translated. +dark = "暗" # Machine translated. +light = "亮" # Machine translated. +reset_mode = "將模式重置為網站默認值" # Machine translated. + +# Quick navigation buttons. +toggle_toc = "切換目錄" # Machine translated. +go_to_top = "返回頁面頂部" # Machine translated. +go_to_comments = "轉到評論區" # Machine translated. + +# Post metadata. +by_author = "由$AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = "、" # For multiple authors. Ensure spacing where necessary. +author_conjunction = "和" # For multiple authors. Ensure spacing where necessary. +draft = "草稿" +zero_min_read = "少於1分鐘閱讀" +one_min_read = "$NUMBER 分鐘閱讀" +many_min_read = "$NUMBER 分鐘閱讀" +zero_words = "沒有字" +one_words = "$NUMBER 字" +many_words = "$NUMBER 字" +last_updated_on = "更新於 $DATE" +see_changes = "修改紀錄" + +# Post body. +table_of_contents = "目錄" +load_comments = "載入留言" + +# Copy code block button. +copied = "已复制!" # Machine translated. +copy_code_to_clipboard = "复制代码到剪贴板" # Machine translated. + +# iine appreciation button. +like_this_post = "喜歡這篇文章" + +# Footer: Powered by Zola and tabi. +powered_by = "網站基於" +and = "和" +site_source = "查看原始碼" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "您請求的頁面不存在" +translation_missing = "或尚未被翻譯成繁體中文" +check_url = "請檢查網址是否有誤或" +go_home = "返回首頁" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "顯示原文" +show_translation = "顯示翻譯" +open_quotation_mark = "「" +close_quotation_mark = "」" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "這是Web Feed,又稱為Atom Feed,把現在的網址複製到新聞閱讀器即可訂閱本站文章。造訪「About Feeds」來了解更多資訊。" +visit_the_site = "造訪網站" +recent_posts = "近期文章" diff --git a/themes/tabi-lean/sass/main.scss b/themes/tabi-lean/sass/main.scss new file mode 100644 index 0000000..d1470ff --- /dev/null +++ b/themes/tabi-lean/sass/main.scss @@ -0,0 +1,347 @@ +@use 'parts/_admonitions.scss'; +@use 'parts/_archive.scss'; +@use 'parts/_aside.scss'; +@use 'parts/_cards.scss'; +@use 'parts/_code.scss'; +@use 'parts/_comments.scss'; +@use 'parts/_footer.scss'; +@use 'parts/_header-anchor.scss'; +@use 'parts/_header.scss'; +@use 'parts/_home-banner.scss'; +@use 'parts/_iine.scss'; +@use 'parts/_image-hover.scss'; +@use 'parts/_image-toggler.scss'; +@use 'parts/_image.scss'; +@use 'parts/_misc.scss'; +@use 'parts/_multilingual_quote.scss'; +@use 'parts/_pagination.scss'; +@use 'parts/_posts_list.scss'; +@use 'parts/_quick_navigation_buttons.scss'; +@use 'parts/_search.scss'; +@use 'parts/_spoiler.scss'; +@use 'parts/_syntax_theme.scss'; +@use 'parts/_table.scss'; +@use 'parts/_tags.scss'; +@use 'parts/_theme-switch.scss'; +@use 'parts/_webmention.scss'; +@use 'parts/_zola-error.scss'; + +@font-face { + src: local('Inter'), + url('fonts/Inter4.woff2') format("woff2"); + /* Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter). Licensed under the SIL Open Font License, Version 1.1. More information available at: http://scripts.sil.org/OFL */ + font-family: 'Inter'; + font-display: swap; +} + +@font-face { + src: local('Source Serif'), + url('fonts/SourceSerif4Variable-Roman.ttf.woff2') format("woff2"); + /* Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’.adobe.com/). Licensed under the SIL Open Font License, Version 1.1. More information available at: http://scripts.sil.org/OFL */ + font-family: 'Source Serif'; + font-display: swap; +} + +@font-face { + src: local('Cascadia Code'), + url('fonts/CascadiaCode-SemiLight.woff2') format("woff2"); + /* Copyright 2019 - Present, Microsoft Corporation, with Reserved Font Name 'Cascadia Code'. Licensed under the SIL Open Font License, Version 1.1. More information available at: http://scripts.sil.org/OFL */ + font-family: 'Cascadia Code'; + font-display: swap; +} + +@mixin theme-variables($theme) { + @if $theme =='light' { + --background-color: white; + --bg-0: #f0f0f0; + --bg-1: #e7e7e7; + --bg-2: #fefefe; + --bg-3: #d8dcdd; + --hover-color: white; + --primary-color: #087E96; + --divider-color: #d7d7d7; + --text-color: #222226; + --text-color-high-contrast: #313333; + --meta-color: #5b5b65; + --codeblock-bg: #26232e; + --codeblock-highlight: #383444; + --theme-switcher-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z'/%3E%3C/svg%3E%0A"); + color-scheme: light; + } + + @else { + --background-color: #1f1f1f; + --bg-0: #2f2f2f; + --bg-1: #3c3c3c; + --bg-2: #171717; + --bg-3: #535555; + --hover-color: black; + --primary-color: #91e0ee; + --divider-color: #4a4a4a; + --text-color: #D4D4D4; + --text-color-high-contrast: #eceeef; + --meta-color: #B0B0B0; + --codeblock-bg: #19181e; + --codeblock-highlight: #282834; + --theme-switcher-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 96 960 960' %3E%3Cpath d='M480 776q-83 0-141.5-58.5T280 576q0-83 58.5-141.5T480 376q83 0 141.5 58.5T680 576q0 83-58.5 141.5T480 776ZM80 616q-17 0-28.5-11.5T40 576q0-17 11.5-28.5T80 536h80q17 0 28.5 11.5T200 576q0 17-11.5 28.5T160 616H80Zm720 0q-17 0-28.5-11.5T760 576q0-17 11.5-28.5T800 536h80q17 0 28.5 11.5T920 576q0 17-11.5 28.5T880 616h-80ZM480 296q-17 0-28.5-11.5T440 256v-80q0-17 11.5-28.5T480 136q17 0 28.5 11.5T520 176v80q0 17-11.5 28.5T480 296Zm0 720q-17 0-28.5-11.5T440 976v-80q0-17 11.5-28.5T480 856q17 0 28.5 11.5T520 896v80q0 17-11.5 28.5T480 1016ZM226 378l-43-42q-12-11-11.5-28t11.5-29q12-12 29-12t28 12l42 43q11 12 11 28t-11 28q-11 12-27.5 11.5T226 378Zm494 495-42-43q-11-12-11-28.5t11-27.5q11-12 27.5-11.5T734 774l43 42q12 11 11.5 28T777 873q-12 12-29 12t-28-12Zm-42-495q-12-11-11.5-27.5T678 322l42-43q11-12 28-11.5t29 11.5q12 12 12 29t-12 28l-43 42q-12 11-28 11t-28-11ZM183 873q-12-12-12-29t12-28l43-42q12-11 28.5-11t27.5 11q12 11 11.5 27.5T282 830l-42 43q-11 12-28 11.5T183 873Z'/%3E%3C/svg%3E"); + color-scheme: dark; + } +} + +:root { + @include theme-variables('light'); + + --max-layout-width: 1000px; + --normal-layout-width: 600px; + --medium-layout-width: 400px; + --small-layout-width: 200px; + --paragraph-spacing: max(2.3vmin, 24px); + + --sans-serif-font: 'Inter', Helvetica, Arial, sans-serif; + --serif-font: 'Source Serif', 'Georgia', serif; + --code-font: 'Cascadia Code'; + + scrollbar-color: var(--primary-color) transparent; + accent-color: var(--primary-color); + + line-height: 190%; + font-family: var(--sans-serif-font); +} + +[data-theme='dark'] { + @include theme-variables('dark'); + + .invertible-image { + filter: invert(.88); + } + + .dimmable-image { + filter: brightness(.8) contrast(1.2); + } +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + + .invertible-image { + filter: invert(.88); + } + + .dimmable-image { + filter: brightness(.8) contrast(1.2); + } + } +} + +html { + background-color: var(--background-color); + color: var(--text-color); + line-height: 1.6em; + text-rendering: optimizeLegibility; +} + +body { + display: flex; + flex-direction: column; + margin-inline: 5vmin; + margin-block: 0; + min-height: 100vh; +} + +.content { + word-wrap: break-word; + margin: 0 auto; + margin-top: 6vmin; + margin-block-end: 4rem; + width: 100%; + max-width: var(--max-layout-width); +} + +.use-sans-serif { + --serif-font: var(--sans-serif-font); +} + +article { + $base-margin: 6rem; + position: relative; + margin: 0 auto; + + max-width: calc(var(--max-layout-width) - 2*$base-margin); + + p, + li, + details, + summary { + font-family: var(--serif-font); + } + + strong { + font-weight: 620; + } + + .full-width { + margin-inline-start: -$base-margin; + margin-inline-end: -$base-margin; + max-width: calc(100% + 2*$base-margin); + } + + li { + p:not(:last-child) { + margin-block-end: 0; + } + + p + :last-child { + margin-block-end: var(--paragraph-spacing); + } + } +} + +.section-title { + display: flex; + margin: 0; + margin-top: -0.15em; + color: var(--text-color-high-contrast); + font-weight: 550; + font-size: 2.2em; + line-height: 1.2em; +} + +.last-updated { + margin-top: -5vmin; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + display: block; + position: relative; + margin: 0; +} + +h1 { + margin-top: 0.67em; + font-weight: 550; + font-size: 1.62rem; +} + +h2 { + margin-top: 0.5em; + font-weight: 550; + font-size: 1.4rem; +} + +h3 { + margin-top: 0.3em; + font-weight: 550; + font-size: 1.2rem; +} + +h4 { + margin-top: 0.83em; + font-weight: 550; + font-size: 1rem; +} + +h5 { + margin-top: 0.83em; + font-weight: normal; + font-size: 1rem; +} + +p { + margin-top: 0.4rem; + margin-block-end: var(--paragraph-spacing); + font-size: 1em; + line-height: 2rem; +} + +strong { + font-weight: 580; +} + +.centered-text { + text-align: center; +} + +video { + max-width: 100%; +} + +.center-content { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin: 0; + width: 100%; + height: 100vh; + text-align: center; +} + +.subheader { + margin-block-end: 2rem; +} + +.mobile-only { + display: none; +} + +@media only screen and (max-width: 1000px) { + .content { + max-width: var(--normal-layout-width); + } + + body { + margin: 0 32px; + } + + article .full-width { + display: block; + margin-inline-start: 0; + margin-inline-end: 0; + max-width: none; + overflow-x: auto; + } + + .mobile-only { + display: block; + } +} + +@media only screen and (max-width: 600px) { + .content { + margin-top: 0rem; + max-width: var(--medium-layout-width); + } + + article { + margin-top: 1.3rem; + } + + body { + margin-inline: 16px; + margin-block: 0; + } +} + +@media only screen and (max-width: 300px) { + .content { + max-width: var(--small-layout-width); + } +} + +@media all and (min-width: 600px) { + html { + font-size: 16.5px; + } +} + +@media all and (min-width: 960px) { + html { + font-size: 20px; + } +} diff --git a/themes/tabi-lean/sass/parts/_admonitions.scss b/themes/tabi-lean/sass/parts/_admonitions.scss new file mode 100644 index 0000000..6feec43 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_admonitions.scss @@ -0,0 +1,159 @@ +@mixin admonition-type($type) { + border-color: var(--admonition-#{$type}-border); + background-color: var(--admonition-#{$type}-bg); + + > .admonition-content > p > code { + background-color: var(--admonition-#{$type}-code); + } + + a { + border-bottom: 1px solid var(--admonition-#{$type}-border); + color: var(--admonition-#{$type}-border); + + &:hover { + background-color: var(--admonition-#{$type}-border); + color: var(--hover-color); + } + } + + .admonition-icon { + background-color: var(--admonition-#{$type}-border); + } +} + +:root { + /* Note */ + --admonition-note-border: #5b6167; + --admonition-note-bg: #f2f4f7; + --admonition-note-code: #e1e3ed; + + /* Tip */ + --admonition-tip-border: #03970f; + --admonition-tip-bg: #f0fdf0; + --admonition-tip-code: #d3edc5; + + /* Info */ + --admonition-info-border: #15a2b2; + --admonition-info-bg: #f5fbff; + --admonition-info-code: #d5e2f2; + + /* Warning */ + --admonition-warning-border: #eea719; + --admonition-warning-bg: #fff8e6; + --admonition-warning-code: #feee96; + + /* Danger */ + --admonition-danger-border: #d8292e; + --admonition-danger-bg: #ffebed; + --admonition-danger-code: #fcc1c5; +} + +@mixin dark-theme-variables { + /* Note */ + --admonition-note-border: #d0d1d4; + --admonition-note-bg: #3d3e40; + --admonition-note-code: #495057; + + /* Tip */ + --admonition-tip-border: #01b010; + --admonition-tip-bg: #013100; + --admonition-tip-code: #005f00; + + /* Info */ + --admonition-info-border: #50a9d5; + --admonition-info-bg: #193C47; + --admonition-info-code: #245e70; + + /* Warning */ + --admonition-warning-border: #e19d0a; + --admonition-warning-bg: #4f3a01; + --admonition-warning-code: #8c6b00; + + /* Danger */ + --admonition-danger-border: #e74f54; + --admonition-danger-bg: #4c1012; + --admonition-danger-code: #8c2e00; +} + +[data-theme='dark'] { + @include dark-theme-variables; +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include dark-theme-variables; + } +} + +.admonition { + display: flex; + align-items: flex-start; + margin-block: 1em; + border-radius: 10px; + border-inline-start: 6px solid; + padding: 0.8rem; + color: var(--text-color-high-contrast); + font-family: var(--sans-serif-font); + + p { + margin-inline-start: -1.75rem; + margin-block-end: 0; + font-family: inherit; + } + + a { + code { + color: inherit; + } + } +} + +.admonition-content { + flex: 1; + strong { + font-weight: 580; + } +} + +.admonition-icon { + display: flex; + align-items: center; + margin: 0.3rem; + background-size: contain; + background-repeat: no-repeat; + aspect-ratio: 1/1; + width: 1.5rem; +} + +.admonition-title { + opacity: 0.92; + font-weight: bold; + font-size: 0.82rem; +} + + +.admonition-icon-note { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3E%3C/svg%3E"); +} + +.admonition-icon-tip { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M480-78.258q-33.718 0-56.974-22.166-23.256-22.167-23.59-55.885h161.128q-.334 33.718-23.59 55.885Q513.718-78.258 480-78.258ZM318.257-210.515v-67.588h323.486v67.588H318.257Zm7.846-121.128q-67.692-42.487-106.896-109.134-39.205-66.648-39.205-147.479 0-123.769 88.149-211.884 88.149-88.115 211.967-88.115 123.817 0 211.849 88.115 88.031 88.115 88.031 211.884 0 80.831-38.999 147.479-39 66.647-107.102 109.134H326.103Zm21.927-67.588h264.351q46.311-32 73.17-81.681 26.859-49.68 26.859-107.144 0-96.918-68-164.765-68-67.846-164.564-67.846t-164.41 67.713q-67.846 67.712-67.846 164.725 0 57.52 26.859 107.259t73.581 81.739Zm131.97 0Z'/%3E%3C/svg%3E"); +} + +.admonition-icon-info { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M479.789-288Q495-288 505.5-298.289q10.5-10.29 10.5-25.5Q516-339 505.711-349.5q-10.29-10.5-25.5-10.5Q465-360 454.5-349.711q-10.5 10.29-10.5 25.5Q444-309 454.289-298.5q10.29 10.5 25.5 10.5ZM444-432h72v-240h-72v240Zm36.276 336Q401-96 331-126q-70-30-122.5-82.5T126-330.958q-30-69.959-30-149.5Q96-560 126-629.5t82.5-122Q261-804 330.958-834q69.959-30 149.5-30Q560-864 629.5-834t122 82.5Q804-699 834-629.276q30 69.725 30 149Q864-401 834-331q-30 70-82.5 122.5T629.276-126q-69.725 30-149 30ZM480-168q130 0 221-91t91-221q0-130-91-221t-221-91q-130 0-221 91t-91 221q0 130 91 221t221 91Zm0-312Z'/%3E%3C/svg%3E"); +} + +.admonition-icon-warning { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M109-120q-11 0-20-5.5T75-140q-5-9-5.5-19.5T75-180l370-640q6-10 15.5-15t19.5-5q10 0 19.5 5t15.5 15l370 640q6 10 5.5 20.5T885-140q-5 9-14 14.5t-20 5.5H109Zm69-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm0-120q17 0 28.5-11.5T520-400v-120q0-17-11.5-28.5T480-560q-17 0-28.5 11.5T440-520v120q0 17 11.5 28.5T480-360Zm0-100Z'/%3E%3C/svg%3E"); +} + +.admonition-icon-danger { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M239.256-400q0 58.091 27.975 108.995t76.13 81.237q-5.616-8.513-8.487-18.398-2.872-9.885-2.872-19.167 1.333-26.436 12.153-50.307 10.821-23.872 31.41-43.461L480-443.921l105.819 102.82q18.923 19.311 29.885 43.321 10.961 24.011 12.294 50.447 0 9.282-2.872 19.167-2.871 9.885-7.82 18.398 47.488-30.333 75.796-81.237Q721.41-341.909 721.41-400q0-47.622-19.258-93.169-19.259-45.547-53.998-82.549-19.951 13.41-42.202 19.859Q583.7-549.41 561-549.41q-62.448 0-105.108-38.039-42.661-38.038-51.225-98.628v-9.744q-39.385 31.949-69.898 67.68-30.513 35.73-51.987 74.166t-32.5 77.464Q239.256-437.483 239.256-400ZM480-349.539l-57.436 56.436q-12.154 11.821-17.731 26.029-5.577 14.208-5.577 29.074 0 32.769 23.498 55.757 23.497 22.987 57.246 22.987 33.432 0 57.421-22.906 23.989-22.906 23.989-55.561 0-16.162-6.116-30.162-6.116-13.999-17.454-25.154l-57.84-56.5Zm-11.002-469.022V-708q0 38.637 26.832 64.819 26.831 26.183 65.17 26.183 15.609 0 30.818-5.923 15.208-5.923 28.131-17.718l22.615-24.102q67.564 44.128 106.999 114.917 39.435 70.79 39.435 150.156 0 128.206-89.846 218.103Q609.307-91.668 480-91.668q-129.027 0-218.68-89.652-89.652-89.653-89.652-218.68 0-119.178 79.371-232.447t217.959-186.114Z'/%3E%3C/svg%3E"); +} + +.admonition.note { @include admonition-type('note'); } +.admonition.tip { @include admonition-type('tip'); } +.admonition.info { @include admonition-type('info'); } +.admonition.warning { @include admonition-type('warning'); } +.admonition.danger { @include admonition-type('danger'); } diff --git a/themes/tabi-lean/sass/parts/_archive.scss b/themes/tabi-lean/sass/parts/_archive.scss new file mode 100644 index 0000000..6df323b --- /dev/null +++ b/themes/tabi-lean/sass/parts/_archive.scss @@ -0,0 +1,37 @@ +.archive { + margin-block-start: 4vmin; + + .listing-title { + margin-block-end: 1rem; + font-size: 1.5rem; + } + + .listing-item { + display: flex; + gap: 1rem; + margin-block-end: 0.5rem; + padding-inline: 1rem; + padding-block: 0.2rem; + + .post-time { + padding-inline-start: 1vmin; + min-inline-size: 5rem; + text-align: start; + + .date { + color: var(--meta-color); + white-space: nowrap; + } + } + } + + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { + margin-bottom: 1.3rem; + } +} diff --git a/themes/tabi-lean/sass/parts/_aside.scss b/themes/tabi-lean/sass/parts/_aside.scss new file mode 100644 index 0000000..4757524 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_aside.scss @@ -0,0 +1,31 @@ +aside { + margin-block-end: var(--paragraph-spacing); + border-radius: 4px; + background: var(--bg-0); + padding-block: 0.8rem; + padding-inline: 1rem; + color: var(--meta-color); + font-size: 0.9rem; + + article & p { + margin: 0; + font-family: var(--sans-serif-font); + } + + @media only screen and (min-width: 1300px) { + position: absolute; + inset-inline-start: -14rem; + margin-block: 0; + border-radius: 0; + background: none; + padding: 0; + width: 12rem; + text-align: end; + + &[data-position="right"] { + inset-inline-start: auto; + inset-inline-end: -14rem; + text-align: start; + } + } +} diff --git a/themes/tabi-lean/sass/parts/_cards.scss b/themes/tabi-lean/sass/parts/_cards.scss new file mode 100644 index 0000000..0b6c560 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_cards.scss @@ -0,0 +1,105 @@ +.filter-controls { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: 12px; + margin-top: 1.2rem; + margin-bottom: -1rem; + padding: 0; + list-style: none; + + #all-projects-filter { + display: none; + } + + .taxonomy-item { + margin: 0; + + a { + display: inline-block; + box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; + border-radius: 1rem; + background: var(--bg-2); + padding: 0 16px; + color: var(--text-color); + font-size: 0.8rem; + text-decoration: none; + + &:hover { + background: var(--primary-color); + color: var(--hover-color); + } + + &.active { + background: var(--primary-color); + color: var(--hover-color); + } + } + } +} + +.cards { + display: grid; + grid-template-rows: auto; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: 24px; + margin-top: 4vmin; + padding-block: 12px; + + .card { + box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px; + border-radius: 1rem; + background: var(--bg-2); + min-height: 100px; + overflow: hidden; + + &:hover { + background-color: var(--primary-color); + } + + &:hover .card-description { + color: var(--hover-color); + } + + .card-info { + padding-inline: 24px; + padding-block-start: 0; + padding-block-end: 24px; + text-align: center; + } + .card-image { + $margin: 1.6rem; + margin: $margin; + margin-bottom: $margin / 1.5; + width: calc(100% - $margin * 2); + height: auto; + } + + .card-image-placeholder { + width: 100%; + height: 12px; + } + + .card-description { + margin-top: 0.5em; + overflow: hidden; + color: var(--text-color); + } + } +} + +@media all and (max-width: 720px) { + .cards { + gap: 18px; + } + + .filter-controls { + gap: 8px; + margin: 18px 0; + + .taxonomy-item a { + padding: 4px 12px; + } + } +} diff --git a/themes/tabi-lean/sass/parts/_code.scss b/themes/tabi-lean/sass/parts/_code.scss new file mode 100644 index 0000000..2623f50 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_code.scss @@ -0,0 +1,152 @@ +code { + -webkit-text-size-adjust: 100%; + border-radius: 5px; + background-color: var(--bg-1); + padding-inline: 0.2em; + padding-block: 0.1em; + font-size: 0.9rem; + font-family: var(--code-font); + + mark { + display: block; + filter: brightness(110%); + background-color: var(--codeblock-highlight); + color: inherit; + } + + table { + margin: 0rem; + border-collapse: collapse; + border-spacing: 0rem; + width: 100%; + text-align: start; + + td, + th, + tr { + border: none; + padding: 0rem; + } + + // Line number col. + tbody td:first-child { + opacity: 50%; + padding-inline-end: 0.8rem; + width: 1px; // Without this, iOS Safari centres short lines. + user-select: none; + text-align: end; + } + + tbody tr:nth-child(even) { + background-color: inherit; + } + } +} + +a:hover code { + background-color: inherit; + padding-block: 0; +} + +pre { + display: block; + position: relative; + border-radius: 5px; + padding-inline: 1rem; + padding-block-start: 2.4rem; + padding-block-end: 1rem; + overflow: hidden; + overflow-x: auto; + line-height: 1.4; + + code, + code td { + font-size: 0.8rem; // Fits ~77 characters. + } + + // Supports both native Zola way of adding src, and old shortcode-based logic. + // See: https://github.com/welpo/tabi/pull/489 + &::after, + code .source-path { + display: block; + position: absolute; + top: 0; + inset-inline-end: 1.3rem; + padding-top: 0.3rem; + padding-inline-end: 1.3rem; + max-width: calc(100% - 14em); + height: 0.9rem; + overflow: hidden; + content: attr(data-name); + color: var(--hover-color); + font-size: 0.65rem; + text-align: end; + text-overflow: ellipsis; + white-space: nowrap; + } + + code { + display: block; + border: 0rem; + border-radius: 5px; + background-color: transparent; + padding: 0rem; + overflow-x: auto; + color: inherit; + white-space: pre; + + &::before { + display: block; + position: absolute; + top: 0; + inset-inline-start: 0; + background-color: var(--primary-color); + padding: 0.3rem; + padding-inline-start: 1rem; + width: calc(100% - 1.3rem); + height: 0.9rem; + content: attr(data-lang); + color: var(--hover-color); + font-size: 0.65rem; + text-align: start; + text-transform: uppercase; + } + } +} + +// Default to LTR codeblocks. +code, pre { + direction: ltr; +} + +// Allows RTL codeblocks if `force_codeblock_ltr` is set to false. +html[data-code-direction="inherit"] { + code, pre { + direction: inherit; + } +} + +.copy-code { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M217.002-67.694q-37.732 0-64.02-26.288-26.287-26.287-26.287-64.019V-707.69h77.999v549.689q0 4.615 3.846 8.462 3.846 3.846 8.462 3.846h451.689v77.999H217.002Zm175.999-175.999q-37.733 0-64.02-26.287T302.694-334v-463.383q0-37.732 26.287-64.02 26.287-26.287 64.02-26.287h365.383q37.732 0 64.019 26.287 26.288 26.288 26.288 64.02V-334q0 37.733-26.288 64.02-26.287 26.287-64.019 26.287H393.001Zm0-77.998h365.383q4.615 0 8.462-3.847 3.846-3.846 3.846-8.462v-463.383q0-4.616-3.846-8.462-3.847-3.846-8.462-3.846H393.001q-4.616 0-8.462 3.846-3.847 3.846-3.847 8.462V-334q0 4.616 3.847 8.462 3.846 3.847 8.462 3.847Zm-12.309 0v-488V-321.691Z'/%3E%3C/svg%3E"); + position: absolute; + top: 0.3rem; + align-self: center; + z-index: 1; + cursor: pointer; + inset-inline-end: 0.7rem; + background: var(--hover-color); + background-size: contain; + width: 0.9rem; + height: 0.9rem; + color: white; +} + +.copy-code.checked { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M395-253 194-455l83-83 118 117 288-287 83 84-371 371Z'/%3E%3C/svg%3E"); + width: 1rem; + height: 1rem; +} + +.copy-code.error { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M479.386-248Q509-248 529-267.386q20-19.386 20-49T529.614-366.5q-19.386-20.5-49-20.5T431-366.886q-20 20.114-20 49.728t19.386 49.386q19.386 19.772 49 19.772ZM416-431h128v-265H416v265Zm64.276 381q-88.916 0-167.743-33.104-78.828-33.103-137.577-91.852-58.749-58.749-91.852-137.535Q50-391.277 50-480.458q0-89.438 33.162-167.491 33.163-78.053 92.175-136.942 59.011-58.889 137.533-91.999Q391.393-910 480.458-910q89.428 0 167.518 33.093T784.94-784.94q58.874 58.874 91.967 137.215Q910-569.385 910-480.192q0 89.192-33.11 167.518-33.11 78.326-91.999 137.337-58.889 59.012-137.167 92.174Q569.447-50 480.276-50Z'/%3E%3C/svg%3E"); +} diff --git a/themes/tabi-lean/sass/parts/_comments.scss b/themes/tabi-lean/sass/parts/_comments.scss new file mode 100644 index 0000000..aab54d9 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_comments.scss @@ -0,0 +1,33 @@ +.utterances-frame { + width: 100%; +} + +.comments { + margin-top: 2rem; + border-top: var(--divider-color) solid 0.5px; + border-bottom: var(--divider-color) solid 0.5px; + padding-top: 2rem; + padding-bottom: 2rem; + + iframe { + margin: 0; + border: none; + aspect-ratio: inherit; + width: 100%; + max-width: 100%; + } + + .load-comments-button { + display: block; + cursor: pointer; + margin: 0.5em auto; + border: none; + background: none; + padding-block: 0.5em; + padding-inline: 1em; + color: inherit; + font-size: 0.95rem; + font-family: var(--sans-serif-font); + text-decoration: none; + } +} diff --git a/themes/tabi-lean/sass/parts/_footer.scss b/themes/tabi-lean/sass/parts/_footer.scss new file mode 100644 index 0000000..2b49c3d --- /dev/null +++ b/themes/tabi-lean/sass/parts/_footer.scss @@ -0,0 +1,91 @@ +footer { + margin-top: auto; + margin-block-end: 1.4rem; + color: var(--meta-color); + font-size: 0.88rem; + font-family: var(--post-font-family); + text-align: center; + + .nav-links { + color: var(--primary-color); + } + + p { + margin: 0; + } +} + +footer section { + display: flex; + flex-direction: column; + align-items: center; + gap: 0rem; +} + +footer nav { + display: flex; + margin: 0 0rem; +} + +.socials { + display: flex; + flex-grow: 0; + flex-wrap: wrap; + justify-content: center; + align-items: flex-end; + + svg { + max-height: 15px; + } + + ul { + gap: 5px; + } +} + +.social { + display: flex; + justify-content: center; + align-items: center; + background-image: unset; + padding: 0.5vmin; +} + +.social > img { + aspect-ratio: 1/1; + width: 1.5rem; + height: auto; + color: #000000; +} + +.social { + &:hover { + & > img { + filter: invert(1); + } + } +} + +@mixin dark-theme-social { + .social { + &:hover { + & > img { + filter: invert(0); + } + } + + & > img { + filter: invert(1); + } + } +} + +[data-theme="dark"] { + @include dark-theme-social; +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) { + @include dark-theme-social; + } +} diff --git a/themes/tabi-lean/sass/parts/_header-anchor.scss b/themes/tabi-lean/sass/parts/_header-anchor.scss new file mode 100644 index 0000000..8a06200 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_header-anchor.scss @@ -0,0 +1,35 @@ +.header-anchor { + display: inline-flex; + position: absolute; + justify-content: center; + align-items: center; + opacity: 0; + margin-inline-start: -2rem; + padding-inline-end: 0.3rem; + width: 1.9rem; + height: 100%; + user-select: none; + + @media (max-width: 500px) { + display: none; + } +} + +.link-icon { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.78 3.653a3.936 3.936 0 1 1 5.567 5.567l-3.627 3.627a3.936 3.936 0 0 1-5.88-.353.75.75 0 0 0-1.18.928 5.436 5.436 0 0 0 8.12.486l3.628-3.628a5.436 5.436 0 1 0-7.688-7.688l-3 3a.75.75 0 0 0 1.06 1.061l3-3Z'%3E%3C/path%3E%3Cpath d='M7.28 11.153a3.936 3.936 0 0 1 5.88.353.75.75 0 0 0 1.18-.928 5.436 5.436 0 0 0-8.12-.486L2.592 13.72a5.436 5.436 0 1 0 7.688 7.688l3-3a.75.75 0 1 0-1.06-1.06l-3 3a3.936 3.936 0 0 1-5.567-5.568l3.627-3.627Z'%3E%3C/path%3E%3C/svg%3E"); + align-self: center; + cursor: pointer; + background: var(--text-color); + width: 1rem; + height: 1rem; +} + +h1, h2, h3, h4, h5, h6 { + &:hover .header-anchor { + opacity: 1; + } + + .header-anchor:hover { + background-color: transparent; + } +} diff --git a/themes/tabi-lean/sass/parts/_header.scss b/themes/tabi-lean/sass/parts/_header.scss new file mode 100644 index 0000000..414aa82 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_header.scss @@ -0,0 +1,197 @@ +header { + width: 100%; + font-family: 'Inter Subset', var(--sans-serif-font); +} + +.page-header { + margin-block: 4rem 1rem; + font-size: 3em; + line-height: 100%; + font-family: var(--header-font); +} + +.navbar { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + margin: 0 auto; + padding-block: 1em; + max-width: var(--max-layout-width); +} + +.nav-navs { + display: flex; + flex-wrap: wrap; + align-items: center; + + ul { + display: flex; + flex-wrap: inherit; + justify-content: inherit; + align-items: inherit; + gap: 1px; + margin: 0; + padding: 0; + list-style: none; + } +} + +.menu-icons-container { + display: flex; + align-items: center; + margin-left: auto; +} + +.menu-icons-group { + gap: 1px; + margin: 0; + padding: 0; +} + +.nav-links { + justify-content: right; + padding: 0.66rem; + color: var(--text-color); + font-weight: 340; + font-size: 1em; + line-height: 2.5; + text-decoration: none; +} + +.home-title { + margin-inline-start: -0.12rem; + border: none; + padding: 0.12rem; + color: var(--primary-color); + font-weight: 450; + font-size: 1.7em; + text-decoration: none; +} + +.meta { + padding: 0; + padding-top: 0.7vmin; + padding-bottom: 3vmin; + color: var(--meta-color); + font-weight: 300; + font-size: 0.8rem; + line-height: 1.4rem; + letter-spacing: -0.4px; + + a { + color: var(--meta-color); + font-weight: inherit; + text-decoration: none; + text-decoration-color: none; + } + + ul, + li { + display: inline-block; + margin-inline-end: 0.2rem; + font-family: var(--sans-serif-font); + list-style-type: none; + } + + .tag { + margin-inline-end: 0; + } +} + +.separator { + margin-inline-end: 0.2rem; + user-select: none; +} + +.language-switcher { + display: flex; + justify-content: center; + align-items: center; + margin-inline-start: 0.5rem; + margin-inline-end: 0.5rem; + + .language-switcher-icon { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' d='M1 12a11 11 90 0 0 22 0 11 11 90 0 0-22 0m1-4h20M2 16h20M11 1a21 21 90 0 0 0 22m2-22a21 21 90 0 1 0 22'/%3E%3C/svg%3E%0A"); + position: relative; + align-self: center; + cursor: pointer; + background: var(--text-color); + width: 1rem; + height: 1rem; + + &:hover { + background: var(--meta-color); + } + } +} + +.dropdown { + display: inline-block; + position: relative; + z-index: 1; + font-size: 0.8rem; + + &:hover .dropdown-content, + &:focus-within .dropdown-content { + display: block; + } + + summary { + list-style: none; + + &::-webkit-details-marker { + display: none; + } + } + + .dropdown-content { + display: none; + position: absolute; + left: 50%; + transform: translateX(-50%); + z-index: 1; + background: var(--background-color); + padding-inline-start: 0.5rem; + padding-inline-end: 0.5rem; + text-align: center; + white-space: nowrap; + + a { + display: block; + } + } +} + +@media only screen and (max-width: 1000px) { + .navbar { + max-width: var(--normal-layout-width); + } + + .nav-navs { + display: flex; + justify-content: center; + } + + .menu-icons-container { + margin-left: 0; + } +} + +@media only screen and (max-width: 600px) { + .nav-navs { + margin-top: 0.8rem; + } + + .navbar { + flex-direction: column; + align-items: center; + } +} + +@media only screen and (max-width: 300px) { + .navbar { + max-width: var(--small-layout-width); + } +} diff --git a/themes/tabi-lean/sass/parts/_home-banner.scss b/themes/tabi-lean/sass/parts/_home-banner.scss new file mode 100644 index 0000000..ce6b9c1 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_home-banner.scss @@ -0,0 +1,82 @@ +#banner-container-home { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin: 0.2rem auto; + width: 100%; + + @media only screen and (max-width: 600px) { + display: block; + margin-block-end: 2rem; + } + + #home-banner-text { + flex: 1; + margin-block-end: 1.5rem; + color: var(--primary-color); + font-size: 1.875rem; + line-height: 3rem; + + li { + font-size: 1rem; + } + + #home-banner-header { + margin: 0; + margin-block-end: 1rem; + font-weight: 550; + font-size: 2.8rem; + + @media only screen and (max-width: 600px) { + margin-block-end: 0; + font-size: 2.2rem; + } + } + + #banner-home-subtitle { + color: var(--text-color); + font-weight: 250; + line-height: 1.75rem; + + p { + font-size: 1rem; + } + + a { + font-weight: 400; + } + } + + @media only screen and (max-width: 600px) { + width: 100%; + } + } + + #image-container-home { + position: relative; + margin: auto 0; + padding-inline-start: 2rem; + max-width: 11rem; + overflow: hidden; + text-align: center; + + #banner-home-img { + border: none; + aspect-ratio: 1 / 1; + width: 100%; + height: 100%; + object-fit: cover; + + @media only screen and (max-width: 600px) { + max-width: 12rem; + max-height: 12rem; + } + } + + @media only screen and (max-width: 600px) { + padding-inline-start: 0; + width: 100%; + max-width: none; + } + } +} diff --git a/themes/tabi-lean/sass/parts/_iine.scss b/themes/tabi-lean/sass/parts/_iine.scss new file mode 100644 index 0000000..9ac95c4 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_iine.scss @@ -0,0 +1,37 @@ +.iine-button { + display: inline-flex; + align-items: center; + gap: 5px; + transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; + cursor: pointer; + border: none; + background: transparent; + color: inherit; + font-family: var(--sans-serif-font); + -webkit-tap-highlight-color: transparent; + appearance: none; + margin: 0; + padding: 0; + font-size: inherit; + line-height: inherit; + + .icon { + display: inline-flex; + align-items: center; + } + + .counter { + margin-left: .2rem; + font-size: 0.8rem; + } + + svg { + width: 1em; + height: 1em; + } +} + +.iine-auto-buttons { + margin-top: 2rem; + padding: 1rem 0; +} diff --git a/themes/tabi-lean/sass/parts/_image-hover.scss b/themes/tabi-lean/sass/parts/_image-hover.scss new file mode 100644 index 0000000..9f36f23 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_image-hover.scss @@ -0,0 +1,22 @@ +.image-hover-container { + position: relative; + width: 100%; + + .image-default { + display: inline; + } + + .image-hovered { + display: none; + } + + &:hover { + .image-default { + display: none; + } + + .image-hovered { + display: inline; + } + } +} diff --git a/themes/tabi-lean/sass/parts/_image-toggler.scss b/themes/tabi-lean/sass/parts/_image-toggler.scss new file mode 100644 index 0000000..e2f420e --- /dev/null +++ b/themes/tabi-lean/sass/parts/_image-toggler.scss @@ -0,0 +1,24 @@ +.image-label { + cursor: pointer; +} + +.image-toggled { + position: absolute; + top: 0; + left: 0; + visibility: hidden; +} + +.image-toggler-toggle { + display: none; +} + +.image-toggler-toggle:checked ~ .image-label .image-toggled { + position: static; + visibility: visible; +} + +.image-toggler-toggle:checked ~ .image-label .image-default { + position: absolute; + visibility: hidden; +} diff --git a/themes/tabi-lean/sass/parts/_image.scss b/themes/tabi-lean/sass/parts/_image.scss new file mode 100644 index 0000000..e8bae01 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_image.scss @@ -0,0 +1,60 @@ +figure { + display: inline-block; + box-sizing: border-box; + margin: 0; + max-width: 100%; + height: auto; +} + +figcaption { + color: var(--meta-color); + font-size: 0.72rem; + font-family: var(--serif-font); + text-align: center; +} + +img { + display: block; + margin: 0 auto; + max-width: 100%; + height: auto; +} + +img.inline { + display: inline; + vertical-align: middle; +} + +figure h4 { + margin: 0; + margin-block-end: 1em; + font-size: 1rem; +} + +figure h4::before { + content: "↳ "; +} + +.img-dark { + display: none; + &.inline{ + display: none; + } +} + +.img-light.inline { + display: inline; +} + +[data-theme="dark"] { + .img-dark { + display: block; + &.inline { + display: inline; + } + } + + .img-light { + display: none; + } +} diff --git a/themes/tabi-lean/sass/parts/_misc.scss b/themes/tabi-lean/sass/parts/_misc.scss new file mode 100644 index 0000000..d798ddd --- /dev/null +++ b/themes/tabi-lean/sass/parts/_misc.scss @@ -0,0 +1,330 @@ +kbd { + border: 1px solid var(--divider-color); + border-radius: 5px; + background-color: var(--bg-0); + padding: 0.1rem 0.3rem; + font-size: 0.8rem; +} + +.draft-label { + margin-inline-end: 0.3rem; + background-color: var(--primary-color); + padding-inline: 4px; + padding-block: 2px; + color: var(--hover-color); +} + +.article-title { + display: block; + margin: 0; + color: var(--text-color-high-contrast); + font-weight: 550; + font-size: 2rem; + line-height: 3rem; +} + +iframe { + display: block; + margin-inline-start: 15%; + margin-inline-end: 15%; + margin-block-end: 3vmin; + border: none; + aspect-ratio: 16/9; + width: 100vmin; + max-width: 70%; +} + +ul { + margin-top: 0; +} + +.toc-container { + margin-block-end: 4vmin; +} + +.padding-top { + padding-top: 4vmin; +} + +.title-container { + padding-bottom: 8px; + .social { + margin-inline-start: 0.5rem; + } +} + +.bottom-divider { + border-bottom: var(--divider-color) solid 0.5px; +} + +::-moz-selection { + background: var(--primary-color); + color: var(--hover-color); + text-shadow: none; +} + +::selection { + background: var(--primary-color); + color: var(--hover-color); +} + +.nav.tags { + display: inline-block; +} + +blockquote { + margin: 0; + border-inline-start: 0.3rem solid var(--primary-color); + padding-inline-start: 1em; +} + +a { + position: relative; + color: var(--primary-color); + font-weight: inherit; + text-decoration: inherit; +} + +// External link styles with `external_links_class = "external"`. +main { + --external-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M11 5h-6v14h14v-6'/%3E%3Cpath d='M13 11l7 -7'/%3E%3Cpath d='M21 3h-6M21 3v6'/%3E%3C/g%3E%3C/svg%3E"); + + a.external:not(:has(img, svg, video, picture, figure))::after { + display: inline-block; + vertical-align: -0.05em; + margin-inline-start: 0.1em; + background-color: currentColor; + width: 0.8em; + height: 0.8em; + content: ''; + -webkit-mask-image: var(--external-link-icon); + -webkit-mask-size: 100% 100%; + } + + &:dir(rtl) a.external:not(:has(img, svg, video, picture, figure))::after { + transform: rotate(-90deg); + } + + .meta a.external:not(:has(img, svg, video, picture, figure))::after { + background-color: var(--meta-color); + } + + a.external:not(:has(img, svg, video, picture, figure)):hover::after { + background-color: var(--hover-color); + } +} + +a:hover { + background-color: var(--primary-color); + color: var(--hover-color); +} + +a:hover rt { + color: var(--text-color); +} + +a:not(.no-hover-padding):hover::before { + display: inline-block; + position: absolute; + z-index: -1; + inset-block-end: 0; + inset-block-start: 0; + inset-inline-end: -0.15em; + inset-inline-start: -0.15em; + background-color: var(--primary-color); + max-inline-size: 105%; + content: ""; +} + +@media screen and (max-width: 600px) { + .list > ul { + margin: 0; + padding: 0; + } +} + +hr { + margin: 3.5rem 0 1rem; + border: none; + background-color: var(--divider-color); + height: 1px; +} + +.footnotes-list, +.footnotes { + text-align: start; +} + +.footnote-reference { + font-size: 0.7rem; + font-family: var(--serif-font); +} + +.footnote-definition { + margin-block-end: 0.6rem; + + sup { + margin-inline-end: 0.15rem; + font-size: 0.75rem; + font-family: var(--serif-font); + } + + p { + display: inline; + } +} + +.footnote-backlink { + margin-inline-start: 0.2rem; + font-size: 0.8rem; +} + +.footnotes-list a[href^="#fr-"], +.footnotes a[href^="#fr-"] { + font-size: 0.8rem; +} + +.footnotes code { + font-size: 0.8rem; +} + +.references p { + margin-inline-start: 2.4rem; + text-indent: -2.4rem; +} + +.info-box { + margin-top: 1rem; + margin-block-end: 1rem; + border: 1px solid var(--primary-color); + border-radius: 10px; + border-inline-start-width: 0.3rem; + padding: 1rem; + text-align: center; +} + +#page-content { + margin-top: 4vmin; +} + +.hidden { + display: none; + visibility: hidden; +} + +.visually-hidden { + clip: rect(0 0 0 0); + position: absolute; + margin: -1px; + border: 0; + padding: 0; + width: 1px; + height: 1px; + overflow: hidden; + white-space: nowrap; +} + +details summary { + cursor: pointer; +} + +.interactive-icon { + cursor: pointer; + + path { + fill: var(--text-color); + } + + :hover path { + fill: var(--meta-color); + } +} + +.article-navigation { + display: flex; + margin-block-start: 2rem; + border-block-start: var(--divider-color) solid 0.5px; + padding-block-start: 2rem; + + div:first-child { + flex: 1; + text-align: start; + } + + div:last-child { + flex: 1; + text-align: end; + } + + div p { + color: var(--meta-color); + font-weight: 300; + line-height: 1.2rem; + font-family: var(--sans-serif-font); + letter-spacing: -0.4px; + } + + @media (max-width: 600px) { + flex-direction: column; + + div { + text-align: center !important; + } + } +} + +:dir(rtl) .arrow { + display: inline-block; + transform: scaleX(-1); +} + +// This for the arrows that point to a corner, (e.g. '↗', '↘', '↙', '↖') +:dir(rtl) .arrow-corner { + display: inline-block; + transform: rotate(-90deg); +} + +.mermaid p { + font-family: var(--sans-serif-font) !important; +} + +.mermaid .node .label { + max-width: none !important; +} + +// For the `force_text_direction` shortcode. +[data-force-text-direction="ltr"] { + direction: ltr; + unicode-bidi: bidi-override; +} + +[data-force-text-direction="rtl"] { + direction: rtl; + unicode-bidi: bidi-override; +} + +[data-force-text-direction="ltr"] *, +[data-force-text-direction="rtl"] * { + direction: inherit; +} + +.title-with-jump { + display: flex; + justify-content: space-between; + align-items: center; +} + +.title-with-jump h1 { + flex: 1; +} + +.jump-link { + flex-shrink: 0; + font-size: 0.9rem; +} + +@media (max-width: 500px) { + .title-with-jump { + flex-direction: column; + } +} diff --git a/themes/tabi-lean/sass/parts/_multilingual_quote.scss b/themes/tabi-lean/sass/parts/_multilingual_quote.scss new file mode 100644 index 0000000..ecd5f1c --- /dev/null +++ b/themes/tabi-lean/sass/parts/_multilingual_quote.scss @@ -0,0 +1,35 @@ +.quote-container { + border: none; +} + +.quote-toggle { + display: none; +} + +.quote-label { + display: none; + cursor: pointer; + border-radius: 5px; + color: var(--meta-color); + font-size: 0.75rem; + font-family: var(--sans-serif-font); + text-align: center; + text-decoration: none; +} + +.quote-toggle:not(:checked) ~ .quote .translated .quote-label-original, +.quote-toggle:checked ~ .quote .original .quote-label-translate { + display: inline; +} + +.original { + display: none; +} + +.quote-toggle:checked ~ .quote .original { + display: block; +} + +.quote-toggle:checked ~ .quote .translated { + display: none; +} diff --git a/themes/tabi-lean/sass/parts/_pagination.scss b/themes/tabi-lean/sass/parts/_pagination.scss new file mode 100644 index 0000000..5361b1e --- /dev/null +++ b/themes/tabi-lean/sass/parts/_pagination.scss @@ -0,0 +1,19 @@ +.pagination { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 2rem; + padding: 0; + font-size: 1em; + list-style: none; + + .page-item .disabled { + opacity: 0.5; + pointer-events: none; + } + + .page-numbers { + color: var(--meta-color); + font-size: 0.9rem; + } +} diff --git a/themes/tabi-lean/sass/parts/_posts_list.scss b/themes/tabi-lean/sass/parts/_posts_list.scss new file mode 100644 index 0000000..e74f89c --- /dev/null +++ b/themes/tabi-lean/sass/parts/_posts_list.scss @@ -0,0 +1,172 @@ +.bloglist-container { + display: grid; + grid-template-columns: 1fr 8fr; +} + + +$padding: 2.5rem; + +.bloglist-meta { + display: flex; + align-items: flex-start; + background-color: var(--navbar-color); + padding-block: $padding; + min-width: 13.5rem; + + .thumbnail-image { + margin: 0; + margin-inline: auto; // Centred by default. + max-width: 70%; + } + + li.date + li.post-thumbnail .thumbnail-image { + // Styles for the thumbnail when there's a date above (either date or updated). + margin-inline: 0; // Since metadata is left aligned, the image looks weird when centred. + margin-block-start: 0.7rem; + } + + ul { + margin-inline-end: 0.7rem; + padding: 0; + color: var(--meta-color); + font-weight: 300; + font-size: 0.9rem; + + li { + list-style-type: none; + white-space: nowrap; + } + + li.draft-label { + width: fit-content; + line-height: 1.2rem; + } + } +} + +.bloglist-content { + display: flex; + position: relative; + align-items: flex-start; + background-color: var(--navbar-color); + padding: $padding 0; + + .pinned-label { + display: flex; + position: absolute; + top: 0.8rem; + align-items: center; + gap: 0.3rem; + color: var(--meta-color); + font-weight: 300; + font-size: 0.8rem; + } + + .pinned-label svg { + width: 0.8rem; + height: 0.8rem; + } + + div { + flex: 1; + + .bloglist-title { + margin: 0; + font-weight: bold; + font-size: 1.2em; + + a { + color: var(--text-color-high-contrast); + font-weight: 550; + + &:hover { + color: var(--hover-color); + } + } + } + + .bloglist-tags { + margin-top: 0.1rem; + + .tag { + display: inline-block; + margin-inline-end: 0.7rem; + font-weight: 400; + font-size: 0.75rem; + text-transform: uppercase; + } + } + + .description p { + margin: 0.5rem 0 1rem; + color: var(--text-color); + font-weight: 250; + font-size: 0.9rem; + line-height: 1.5rem; + } + } +} + +.all-posts { + font-weight: 350; + font-size: 1.3rem; +} + +#all-projects { + margin-top: 2rem; +} + +.posts-first #featured-projects { + margin-top: 4rem; +} + +.projects-first #posts-list { + margin-top: 4rem; +} + +@media only screen and (max-width: 1100px) { + .bloglist-container { + display: block; + } + + .pinned-label svg { + margin-bottom: -2px; + } + + .bloglist-meta { + border-bottom: 0; + padding-block: 2rem; + + ul { + margin-block-end: 0; + width: 100%; + + li { + display: inline; + margin-inline-end: 0.3rem; + } + } + + .post-thumbnail { + display: none; + } + } + + .bloglist-content { + flex-direction: column; + align-items: flex-start; + padding: 0; + padding-bottom: 2rem; + + + .pinned-label { + position: static; + margin: 0; + margin-top: -1.9rem; + } + + div { + width: 100%; + } + } +} diff --git a/themes/tabi-lean/sass/parts/_quick_navigation_buttons.scss b/themes/tabi-lean/sass/parts/_quick_navigation_buttons.scss new file mode 100644 index 0000000..768592f --- /dev/null +++ b/themes/tabi-lean/sass/parts/_quick_navigation_buttons.scss @@ -0,0 +1,126 @@ +#button-container { + display: flex; + position: fixed; + right: 2rem; + bottom: 2rem; + flex-direction: column; + gap: 0.6rem; + z-index: 2; // Above "copy-code" buttons. Important for the ToC. + + #toc-button, + #comments-button, + #top-button { + display: flex; + justify-content: center; + align-items: center; + z-index: 2; + cursor: pointer; + border: none; + border-radius: 50%; + background-color: var(--bg-1); + padding: 0.4rem; + width: 1rem; + height: 1rem; + text-align: center; + + &:hover { + background-color: var(--bg-3); + + svg { + fill: var(--primary-color); + } + + &::before { + background-color: transparent; + } + } + + svg { + fill: var(--text-color); + width: 1rem; + height: 1rem; + } + } + + #toc-floating-container { + + $padding-vertical: 0.7rem; + $padding-horizontal: 1rem; + + #toc-button { + position: relative; + z-index: 2; + } + + .toc-container { + margin: 0; + margin-top: $padding-vertical; + max-width: 80vw; + } + + .toc-content { + display: none; + position: absolute; + right: 0; + bottom: 100%; + z-index: 2; + margin-block-end: $padding-vertical; + box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px; + border: 1px solid var(--divider-color); + border-radius: 5px; + background-color: var(--background-color); + padding-inline-end: $padding-horizontal; + max-height: 70vh; + overflow-y: auto; + font-size: 0.8rem; + text-align: start; + white-space: nowrap; // Prevents wrapping, allowing content to define width. + + ul { + padding-inline-start: $padding-horizontal; + list-style: none; + } + } + + .toggle { + display: none; + + &:checked { + + + .overlay, + + .overlay + #toc-button + .toc-content { + display: block; + } + + + .overlay + #toc-button svg { + fill: var(--primary-color); // Show the ToC icon as toggled. + } + } + } + + .overlay { + display: none; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + opacity: 40%; + z-index: 1; // Lower than the Table of Contents + background: var(--background-color); + } + + } +} + +@media (max-width: 700px) { + #button-container { + display: none !important; + } +} + +@media print { + #button-container { + display: none; + } +} diff --git a/themes/tabi-lean/sass/parts/_search.scss b/themes/tabi-lean/sass/parts/_search.scss new file mode 100644 index 0000000..df820e4 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_search.scss @@ -0,0 +1,160 @@ +$icon-size: 1.3rem; + +#searchModal { + background: color-mix(in srgb, var(--primary-color) 5%, transparent); + text-align: start; + + #searchContainer { + padding: 1rem; + } + + #searchBar { + display: flex; + position: relative; + justify-content: center; + align-items: center; + box-sizing: border-box; + padding: 1rem; + + .search-icon { + position: absolute; + inset-inline-start: 1rem; + width: $icon-size; + height: $icon-size; + + path { + fill: var(--text-color); + } + } + + .close-icon { + display: none; + position: absolute; + right: $icon-size; + margin-inline-start: 1rem; + margin-inline-end: 0.5rem; + width: $icon-size; + height: $icon-size; + } + + #searchInput { + flex: 1; + border: 1px solid var(--divider-color); + border-radius: 20px; + background-color: var(--input-background-color); + padding-inline: 3rem 1rem; + padding-block: 0.75rem; + width: calc(100% - 2rem); + color: var(--text-color); + font-size: 1rem; + } + } + + #results-container { + display: none; + border-top: var(--divider-color) solid 0.5px; + border-bottom-right-radius: 1rem; + border-bottom-left-radius: 1rem; + overflow: hidden; + + #results-info { + padding: 0.5rem; + color: var(--meta-color); + font-size: 0.8rem; + text-align: center; + } + + #results { + display: flex; + flex-direction: column; + max-height: 50vh; + overflow-y: auto; + + b { + font-weight: 590; + } + + a { + display: block; + + &:hover { + background-color: inherit; + } + } + + > div { + cursor: pointer; + padding-inline: 1rem; + padding-block: 0.5rem; + + &[aria-selected="true"] { + background-color: var(--primary-color); + color: var(--hover-color); + + a, + span { + color: inherit; + } + } + } + + span:first-child { + display: block; + color: var(--primary-color); + font-weight: 590; + } + + span:nth-child(2) { + color: var(--text-color); + } + } + + } +} + +.search-icon { + display: block; + position: relative; + align-self: center; + margin-inline-start: 1rem; + margin-inline-end: 0.5rem; + width: $icon-size; + height: $icon-size; +} + +.search-modal { + -webkit-backdrop-filter: blur(8px); + display: none; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + backdrop-filter: blur(8px); + background-color: rgba(0, 0, 0, 0.1); + width: 100%; + height: 100%; + overflow: auto; + + #modal-content { + position: relative; + margin: 8% auto; + border: var(--divider-color) solid 0.5px; + border-radius: 1rem; + background-color: var(--background-color); + width: 80%; + max-width: 28rem; + } +} + +@media only screen and (max-width: 600px) { + .search-modal { + #modal-content { + top: 3.5rem; + width: 92%; + + #results { + max-height: 70vh; + } + } + } +} diff --git a/themes/tabi-lean/sass/parts/_spoiler.scss b/themes/tabi-lean/sass/parts/_spoiler.scss new file mode 100644 index 0000000..b43911b --- /dev/null +++ b/themes/tabi-lean/sass/parts/_spoiler.scss @@ -0,0 +1,53 @@ +.spoiler-toggle { + display: none; // Hide the checkbox. +} + +.spoiler-content { + display: inline-block; // Allow content to only take up its own width. + cursor: help; // Indicate interactive element. + + .spoiler-hidden { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + filter: blur(6px); + user-select: none; + + a { + pointer-events: none; // Make links unclickable. + } + } +} + +.spoiler-toggle:checked + .spoiler-content { + .spoiler-hidden { + filter: none; + user-select: auto; + + a { + pointer-events: auto; // Enable clicking on links when revealed. + } + } +} + +.spoiler-container.fixed-blur { + .spoiler-content:before { + display: inline-block; // Block display within the inline flow. + filter: blur(6px); + content: 'SPOILER'; // Display the word "SPOILER". + } + + .spoiler-content .spoiler-hidden { + display: none; // Completely hide the actual content. + } + + .spoiler-toggle:checked + .spoiler-content { + &:before { + content: none; // Hide the word "SPOILER". + } + + .spoiler-hidden { + display: inline; // Reveal the actual content. + } + } +} diff --git a/themes/tabi-lean/sass/parts/_syntax_theme.scss b/themes/tabi-lean/sass/parts/_syntax_theme.scss new file mode 100644 index 0000000..ece3930 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_syntax_theme.scss @@ -0,0 +1,342 @@ +/* + * based on "Catppuccin Frappe" https://github.com/catppuccin/catppuccin + */ + +:root { + --rosewater: #f2d5cf; + --flamingo: #eebebe; + --pink: #f4b8e4; + --mauve: #ca9ee6; + --red: #e78284; + --maroon: #ea999c; + --peach: #ef9f76; + --yellow: #e5c890; + --green: #a6d189; + --teal: #81c8be; + --sky: #99d1db; + --blue: #8caaee; + --lavender: #b4befe; + --text: #cdd6f4; + --overlay0: #737994; +} + +.z-code { + background-color: var(--codeblock-bg); + color: var(--text); +} + +.z-comment { + color: var(--overlay0); + font-style: italic; +} + +.z-string { + color: var(--green); + + &.z-regexp { + color: var(--sky); + } +} + +.z-constant.z-numeric, +.z-string.z-regexp { + color: var(--sky); +} + +.z-constant { + &.z-character.z-escape { + color: var(--sky); + } + + &.z-language { + color: var(--lavender); + } +} + +.z-support.z-function.z-builtin.z-variable.z-other.z-constant { + color: var(--sky); +} + +.z-keyword { + color: var(--red); + + &.z-control { + + &.z-loop, + &.z-conditional, + &.z-c + + { + color: var(--mauve); + } + + &.z-return, + &.z-flow.z-return { + color: var(--pink); + } + } +} + +.z-support.z-type.z-exception { + color: var(--sky); +} + +.z-keyword.z-operator { + color: var(--teal); +} + +.z-punctuation { + &.z-accessor { + color: var(--teal); + } + + &.z-section { + color: var(--text); + } +} + +.z-keyword.z-control.z-import.z-include { + color: var(--peach); +} + +.z-storage { + color: var(--red); + + &.z-type { + color: var(--yellow); + } + + &.z-modifier { + color: var(--red); + } +} + +.z-entity.z-name.z-namespace, +.z-meta.z-path, +.z-storage.z-type.z-class { + color: var(--rosewater); +} + +.z-entity.z-name.z-label { + color: var(--blue); +} + +.z-keyword.z-declaration.z-class { + color: var(--red); +} + +.z-entity.z-name.z-class, +.z-meta.z-toc-list.z-full-identifier { + color: var(--teal); +} + +.z-entity { + &.z-other.z-inherited-class { + color: var(--teal); + } + + &.z-name.z-function { + color: var(--blue); + font-style: italic; + } +} + +.z-variable.z-function { + color: var(--blue); + font-style: italic; +} + +.z-entity.z-name.z-function.z-preprocessor, +.z-keyword.z-control.z-import { + color: var(--red); +} + +.z-entity.z-name.z-function { + + &.z-constructor, + &.z-destructor { + color: var(--lavender); + } +} + +.z-variable.z-parameter.z-function { + color: var(--rosewater); +} + +.z-keyword.z-declaration.z-function { + color: var(--maroon); +} + +.z-support { + &.z-function { + color: var(--teal); + } + + &.z-constant { + color: var(--blue); + } + + &.z-type, + &.z-class { + color: var(--blue); + font-style: italic; + } +} + +.z-variable { + &.z-function { + color: var(--blue); + } + + &.z-parameter { + color: var(--rosewater); + } + + &.z-other { + color: var(--text); + + &.z-member { + color: var(--rosewater); + } + } + + &.z-language { + color: var(--peach); + } +} + +.z-entity { + &.z-name.z-tag { + color: var(--sky); + } + + &.z-other.z-attribute-name { + color: var(--mauve); + font-style: italic; + } +} + +.z-punctuation.z-definition.z-tag { + color: var(--maroon); +} + +.z-markup.z-underline.z-link.z-markdown { + color: var(--rosewater); + font-style: underline; + font-style: italic; +} + +.z-comment.z-block.z-markdown, +.z-meta.z-code-fence { + color: var(--peach); + font-style: italic; +} + +.z-markup.z-raw { + + &.z-code-fence, + &.z-inline { + color: var(--peach); + font-style: italic; + } +} + +.z-punctuation.z-definition.z-heading, +.z-entity.z-name.z-section { + color: var(--blue); +} + +.z-markup { + &.z-italic { + color: var(--maroon); + font-style: italic; + } + + &.z-bold { + color: var(--maroon); + font-weight: bold; + } +} + +.z-constant.z-character.z-escape, +.z-source.z-shell.z-bash .z-meta.z-function.z-shell .z-meta.z-compound.z-shell .z-meta.z-function-call.z-identifier.z-shell { + color: var(--pink); +} + +.z-variable.z-language.z-shell { + color: var(--red); +} + +.z-source.z-lua .z-meta.z-function.z-lua .z-meta.z-block.z-lua .z-meta.z-mapping { + &.z-value.z-lua .z-meta.z-mapping.z-key.z-lua .z-string.z-unquoted.z-key.z-lua { + color: var(--lavender); + } + + &.z-key.z-lua .z-string.z-unquoted.z-key.z-lua { + color: var(--flamingo); + } +} + +.z-entity.z-name.z-constant.z-java { + color: var(--peach); +} + +.z-support { + &.z-type.z-property-name.z-css { + color: var(--flamingo); + } + + &.z-constant.z-property-value.z-css { + color: var(--text); + } +} + +.z-constant.z-numeric.z-suffix.z-css, +.z-keyword.z-other.z-unit.z-css, +.z-variable.z-other.z-custom-property.z-name.z-css, +.z-support.z-type.z-custom-property.z-name.z-css, +.z-punctuation.z-definition.z-custom-property.z-css { + color: var(--peach); +} + +.z-entity.z-name.z-tag.z-css { + color: var(--lavender); +} + +.z-variable.z-other.z-sass { + color: var(--peach); +} + +.z-invalid { + background-color: var(--red); + color: var(--text); + + &.z-deprecated { + background-color: var(--mauve); + color: var(--text); + } +} + +.z-meta.z-diff { + color: --OVERLAY0; + + &.z-header { + color: --OVERLAY0; + } +} + +.z-markup { + &.z-deleted { + color: var(--red); + } + + &.z-inserted { + color: var(--green); + } + + &.z-changed { + color: var(--yellow); + } +} + +.z-message.z-error { + color: var(--red); +} diff --git a/themes/tabi-lean/sass/parts/_table.scss b/themes/tabi-lean/sass/parts/_table.scss new file mode 100644 index 0000000..d6e5326 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_table.scss @@ -0,0 +1,38 @@ +table { + margin: 1rem auto; + border-style: hidden !important; + border-radius: 5px; + border-collapse: collapse; + border-spacing: 0; + overflow: hidden; + font: inherit; + text-align: center; + + th, + td { + border: 1px solid var(--bg-1); + padding-inline: 13px; + padding-block: 6px; + font-size: large; + } + + thead tr { + background-color: var(--primary-color); + color: var(--hover-color); + + code { + background-color: transparent; + } + } + + tbody { + tr:nth-child(even) { + background-color: var(--bg-0); + } + } + + details, + summary { + font-family: inherit !important; + } +} diff --git a/themes/tabi-lean/sass/parts/_tags.scss b/themes/tabi-lean/sass/parts/_tags.scss new file mode 100644 index 0000000..ae28d0a --- /dev/null +++ b/themes/tabi-lean/sass/parts/_tags.scss @@ -0,0 +1,41 @@ +#tag-cloud { + margin-top: 4vmin; + + ul { + margin: 0; + padding: 0; + list-style: none; + } + + .tags-item { + margin-block-end: 1rem; + } +} + +@mixin column-count($count) { + -webkit-column-count: $count; + -moz-column-count: $count; + column-count: $count; +} + +.two-columns ul { + @include column-count(2); +} + +.three-columns ul { + @include column-count(3); +} + +@media (max-width: 1000px) { + .three-columns ul { + @include column-count(2); + } +} + +@media (max-width: 600px) { + + .two-columns ul, + .three-columns ul { + @include column-count(1); + } +} diff --git a/themes/tabi-lean/sass/parts/_theme-switch.scss b/themes/tabi-lean/sass/parts/_theme-switch.scss new file mode 100644 index 0000000..9c5bd4f --- /dev/null +++ b/themes/tabi-lean/sass/parts/_theme-switch.scss @@ -0,0 +1,42 @@ +.theme-switcher { + -webkit-mask: var(--theme-switcher-svg); + position: relative; + align-self: center; + cursor: pointer; + margin-inline-start: 0.5rem; + background: var(--text-color); + width: 1rem; + height: 1rem; + &:hover { + background: var(--meta-color); + } +} + +.theme-switcher-wrapper { + position: relative; +} + +.theme-resetter { + -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" %3E%3Cpath d="M295.87-193.869v-78.001h291.152q43.63 0 72.369-33.424 28.739-33.423 28.739-79.271t-28.739-79.391Q630.652-497.5 587.022-497.5H343.913l87.478 87.478-55.652 55.153L193.869-536.5l181.87-181.631 55.652 55.653-87.478 86.978h243.109q75.435 0 127.272 56.522 51.837 56.521 51.837 134.174 0 77.652-51.837 134.293-51.837 56.642-127.272 56.642H295.87Z"/%3E%3C/svg%3E'); + position: absolute; + visibility: hidden; + opacity: 0; + transition: opacity 0.3s ease, visibility 0.3s ease; + transition-delay: 0.5s; + cursor: pointer; + inset-block-start: -0.6rem; + inset-inline-end: -0.6rem; + background: var(--text-color); + width: 0.8rem; + height: 0.8rem; +} + +.theme-switcher-wrapper:hover .theme-resetter.has-custom-theme { + visibility: visible; + opacity: 1; + transition: opacity 0.1s ease, visibility 0.1s ease; + transition-delay: 0s; + &:hover { + background: var(--meta-color); + } +} diff --git a/themes/tabi-lean/sass/parts/_webmention.scss b/themes/tabi-lean/sass/parts/_webmention.scss new file mode 100644 index 0000000..b6d6338 --- /dev/null +++ b/themes/tabi-lean/sass/parts/_webmention.scss @@ -0,0 +1,149 @@ +#webmentions { + position: relative; + z-index: 100; + margin: 0; + background-color: var(--background-color); + color: var(--text-color); + line-height: 1.2em; + + h2 { + margin-bottom: 1.5em; + font-size: 1.1em; + } + + h3 { + display: flex; + align-items: center; + font-size: 0.9em; + + svg { + margin-inline-end: 0.2rem; + } + + .svg-icon, + span { + margin-inline-end: .3rem; + } + } + + ol { + padding: 0; + } + + li, + p { + font-family: inherit; + } + + +.likes { + display: flex; + flex-wrap: wrap; + margin-top: 0.5rem; + padding: 0; + list-style: none; + + li { + position: relative; + transition: transform 0.8s ease-out, z-index 0s linear 0.4s; + margin-bottom: .375rem; + margin-inline-start: -.75rem; + + &:first-child { + margin-inline-start: 0; + } + + &:hover { + transform: scale(1.3) translateY(-4px); + z-index: 10; + transition: transform 0.05s ease-out, z-index 0s linear 0s; + } + + img { + display: block; + border: 2px solid var(--background-color, white); + border-radius: 50%; + aspect-ratio: 1/1; + width: 2.5rem; + height: 2.5rem; + object-fit: cover; + } + } + } + + .comment { + margin-bottom: 1rem; + border-radius: 10px; + background: var(--bg-0); + padding: 1rem; + overflow: hidden; + font-size: 80%; + + div { + display: flex; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + } + + p { + margin-bottom: 0; + line-height: 1.5em; + } + + .p-author { + font-style: bold; + font-size: 1.3em; + } + + .u-url { + font-style: italic; + text-decoration: underline; + } + + .u-author { + display: flex; + align-items: center; + + img { + display: block; + margin-inline-end: .625rem; + width: 2rem; + max-width: 100%; + height: 2rem; + } + } + } + + form { + input { + flex: 1; + border: 1px solid var(--divider-color); + border-radius: 20px 0px 0px 20px; + background-color: var(--input-background-color); + padding-inline: 1rem 1rem; + padding-block: .75rem; + width: calc(60% - 2rem); + color: var(--text-color); + font-size: 1rem; + } + + button { + flex: 1; + border: 1px solid var(--divider-color); + border-radius: 0px 20px 20px 0px; + background-color: var(--input-background-color); + padding-inline: 0.7rem 0.7rem; + padding-block: .75rem; + width: 7rem; + color: var(--text-color); + font-size: 1rem; + } + + button:hover { + cursor: pointer; + background-color: var(--primary-color); + color: var(--hover-color); + } + } +} diff --git a/themes/tabi-lean/sass/parts/_zola-error.scss b/themes/tabi-lean/sass/parts/_zola-error.scss new file mode 100644 index 0000000..3bdbcbc --- /dev/null +++ b/themes/tabi-lean/sass/parts/_zola-error.scss @@ -0,0 +1,28 @@ +// Styles Zola error messages. See https://github.com/welpo/tabi/pull/359 +body > div:last-child > div:last-child[style]:not([class]):not([id]) { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 9999; + box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px; + border: 2px solid var(--admonition-danger-border); + border-radius: 5px; + background-color: var(--admonition-danger-bg); + padding: 15px; + width: fit-content; + max-width: 80%; +} + +body > div:last-child > div:last-child[style]:not([class]):not([id]) > p[style]:first-child { + margin: 0; + color: var(--admonition-danger-border); + font-weight: bold; +} + +body > div:last-child > div:last-child[style]:not([class]):not([id]) > pre[style]:last-child { + margin-block-end: 0; + background-color: var(--admonition-danger-code); + padding: 10px; + overflow-x: auto; +} diff --git a/themes/tabi-lean/sass/skins/blue.scss b/themes/tabi-lean/sass/skins/blue.scss new file mode 100644 index 0000000..d135219 --- /dev/null +++ b/themes/tabi-lean/sass/skins/blue.scss @@ -0,0 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #3271E7; // Contrast ratio: 4.51:1 + } + @else if $theme == 'dark' { + --primary-color: #6cacff; // Contrast ratio: 7.05:1 + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/evangelion.scss b/themes/tabi-lean/sass/skins/evangelion.scss new file mode 100644 index 0000000..d0350a5 --- /dev/null +++ b/themes/tabi-lean/sass/skins/evangelion.scss @@ -0,0 +1,24 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + // Evangelion Unit-02. + --primary-color: #d12e36; // Contrast ratio: 5.05:1 + } + @else if $theme == 'dark' { + // Evangelion Unit-01. + --primary-color: #c09bd9; // Contrast ratio: 7.01:1 + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/indigo_ingot.scss b/themes/tabi-lean/sass/skins/indigo_ingot.scss new file mode 100644 index 0000000..11a6370 --- /dev/null +++ b/themes/tabi-lean/sass/skins/indigo_ingot.scss @@ -0,0 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #1460bd; // Contrast ratio: 6.1:1 + } + @else if $theme == 'dark' { + --primary-color: #e6c212; // Contrast ratio: 9.48:1 + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/lavender.scss b/themes/tabi-lean/sass/skins/lavender.scss new file mode 100644 index 0000000..97a40df --- /dev/null +++ b/themes/tabi-lean/sass/skins/lavender.scss @@ -0,0 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #9055d8; // Contrast ratio: 4.69:1 + } + @else if $theme == 'dark' { + --primary-color: #cba2e8; // Contrast ratio: 7.74:1 + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/lowcontrast_orange.scss b/themes/tabi-lean/sass/skins/lowcontrast_orange.scss new file mode 100644 index 0000000..ad84bf4 --- /dev/null +++ b/themes/tabi-lean/sass/skins/lowcontrast_orange.scss @@ -0,0 +1,26 @@ +// WARNING! This skin, in light theme, may not provide optimal contrast for readability +// and might not be suitable for users with certain types of visual impairment. +// Furthermore, low contrast will affect your Google Lighthouse rating. +// For more information on web accessibility: https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #f56a00; // Contrast ratio: 3.02:1. Not very accessible. + } + @else if $theme == 'dark' { + --primary-color: #ec984f; // Contrast ratio: 7.19:1. Accessible. + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/lowcontrast_peach.scss b/themes/tabi-lean/sass/skins/lowcontrast_peach.scss new file mode 100644 index 0000000..328a4da --- /dev/null +++ b/themes/tabi-lean/sass/skins/lowcontrast_peach.scss @@ -0,0 +1,26 @@ +// WARNING! This skin, in light theme, may not provide optimal contrast for readability +// and might not be suitable for users with certain types of visual impairment. +// Furthermore, low contrast will affect your Google Lighthouse rating. +// For more information on web accessibility: https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #ffa057; // Contrast ratio: 2.01:1. Not very accessible. + } + @else if $theme == 'dark' { + --primary-color: #ffab7f; // Contrast ratio: 8.93:1. Accessible. + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/lowcontrast_pink.scss b/themes/tabi-lean/sass/skins/lowcontrast_pink.scss new file mode 100644 index 0000000..3f96d1d --- /dev/null +++ b/themes/tabi-lean/sass/skins/lowcontrast_pink.scss @@ -0,0 +1,26 @@ +// WARNING! This skin, in light theme, may not provide optimal contrast for readability +// and might not be suitable for users with certain types of visual impairment. +// Furthermore, low contrast will affect your Google Lighthouse rating. +// For more information on web accessibility: https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #ee59d2; // Contrast ratio: 3:1. Not very accessible. + } + @else if $theme == 'dark' { + --primary-color: #f49ee9; // Contrast ratio: 9.87:1. Accessible. + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/mint.scss b/themes/tabi-lean/sass/skins/mint.scss new file mode 100644 index 0000000..e598c24 --- /dev/null +++ b/themes/tabi-lean/sass/skins/mint.scss @@ -0,0 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #00804d; // Contrast ratio: 5:1 + } + @else if $theme == 'dark' { + --primary-color: #00b86e; // Contrast ratio: 6.34:1 + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/monochrome.scss b/themes/tabi-lean/sass/skins/monochrome.scss new file mode 100644 index 0000000..976e12e --- /dev/null +++ b/themes/tabi-lean/sass/skins/monochrome.scss @@ -0,0 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #727272; // Contrast ratio: 4.81:1 + } + @else if $theme == 'dark' { + --primary-color: #b3b3b3; // Contrast ratio: 7.86:1 + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/red.scss b/themes/tabi-lean/sass/skins/red.scss new file mode 100644 index 0000000..169340f --- /dev/null +++ b/themes/tabi-lean/sass/skins/red.scss @@ -0,0 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #ca4963; // Contrast ratio: 4.52:1. + } + @else if $theme == 'dark' { + --primary-color: #ea535f; // Contrast ratio: 4.63:1. + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/sakura.scss b/themes/tabi-lean/sass/skins/sakura.scss new file mode 100644 index 0000000..4e418eb --- /dev/null +++ b/themes/tabi-lean/sass/skins/sakura.scss @@ -0,0 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #D33C5C; // Contrast ratio: 4.61:1 + } + @else if $theme == 'dark' { + --primary-color: #fabed2; // Contrast ratio: 10.48:1 + } +} + +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/sass/skins/teal.scss b/themes/tabi-lean/sass/skins/teal.scss new file mode 100644 index 0000000..3a1fbcd --- /dev/null +++ b/themes/tabi-lean/sass/skins/teal.scss @@ -0,0 +1,33 @@ +// When creating your own skin, you can use https://webaim.org/resources/contrastchecker/ +// to verify the accessibility and readability of your colourscheme. +// The default light background is #fff and the dark background is #1f1f1f. + +// This defines theme-specific variables. +@mixin theme-variables($theme) { + @if $theme =='light' { + // Light theme colours. + --primary-color: #087e96; // Contrast ratio: 4.73:1 + } + @else if $theme == 'dark' { + // Dark theme colours. + --primary-color: #91e0ee; // Contrast ratio: 11.06:1 + } +} + +// Apply light theme variables by default. +:root { + @include theme-variables('light'); +} + +// Apply dark theme variables when dark theme is explicitly set. +[data-theme='dark'] { + @include theme-variables('dark'); +} + +// Apply dark theme variables when user's system prefers dark mode +// and the theme is not explicitly set to light. +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } +} diff --git a/themes/tabi-lean/static/custom_subset.css b/themes/tabi-lean/static/custom_subset.css new file mode 100644 index 0000000..13ac96e --- /dev/null +++ b/themes/tabi-lean/static/custom_subset.css @@ -0,0 +1 @@ +@font-face{font-family:"Inter Subset";src:url(data:application/font-woff2;base64,d09GMgABAAAAABzEABMAAAAALzgAABxWAAQAQgAAAAAAAAAAAAAAAAAAAAAAAAAAGoJjG4gGHCo/SFZBUoIJP01WQVKBKAZgP1NUQVSBXCc0AHwvgTYKjFSKdjCvWgE2AiQDVAssAAQgBYlAByAb4ywzo8HGAQTB7wEj+T8ccFME86LTO1iwBhRNtzeaN4zFsemn0TDWYsm9p6RthgWjFSUK/mPvRjzNKtorVwg/tIZur9XWgup3iqPA/pp8tgX/3zgNCQIRRyFYAP91SrXlCElmISKc2uydJNsnxSE5zVPqAmAKmBKDSyoQugDwSOR/9sWcfkokCVRdFdAAwQU+AKR3fkKXJ75737uz758PlFJVYo1Kx4S4GEQgFqsaDc8A3ewaKF/NkbsG+ikMj2d9r3KgBoVTT4ZK2zGKoZbsfsC6W+P/dJZ/QIQrL9ABYHlB6JKKqjS1Jb8+qTqEeuEAybbYgtEMEbra9A1PSApGIS3OdTmCuyE7+58voCmFyk37i/pUf7F7AHO5ZONNFpqFZqWQSLE75pKQo1bAUepvmv//NtNWd1HqPAtUjeEfPzkkJ0WTk6IC7JOi4tGMshpY27O7Ot6xZBizZPxmaRUEqvhrTD/8zRPkHqtUbcoUTZmiDYiITsm0nOstpOWZbNfSliXXCo6DGSQrbiqElMZh/3kBBE0OeG1JCoUQ8t/kkk0QoLIIMBEwF7ASbAdXwJPgY5CGRFHY0MwxYA95CIMIU7BUF5VGgQUIyom4ZfF4Xq2/M1J/kukVlkl5hRxPQ0PrE99857+VwMUOm+rSsvzR60pXNOakUv6Pbe7nocnCfGP43EdW5edhw/i87wBL2aSU7vmwmI+eU+tJo0yin6QEBMzFvkkNkRBgMyQH+6P01Zq06v+2vJ3P3hlHvnNdqfI7y8MFft1PfdcZk/cJiW5oZLC0VdH9O3TP55kyTK6noxR9D8Ns1SrDi5NOG0iyHtSEUaYKDeY2ZZaiBJboiZQ65IlAivCmCuguE1cU5bXyDamuPoWGW7qVHLmkg5iiplBFpeIkp1lVz0CqeJ0FWf24GLURP0v52d6bU8KpS38Shk1Usm8zmqw9x6gryufW89W7vTl58r3lx+AnSD3DuvG8lL6f673zXqt8AuorEz98IKQv5jf8/E18kr43vwVGe3U8eMHM77gVHEqX7vlZ8ZbS62Eeunp8+9XFTzrdyImtW5AfMypgyA1NEChzj8gCC4bf9gWbEBoHQxgPe4aiQqQERhpqNAELbsJevASWoGm0FsbSFDSHmp2SjULAmYFms/IsADMcEotZbIZDDlVUCJyDgzSjWVACoNmGKgnow4aYSTBDA3RuIphcVnnKawz+9naedyA81Qc/yXN4p68Y/MJeBI+PupC7gYyR7bez5bl63EjcaLTNX67nffV234r7tMPNuz7zVrfui3I2t76Ofnbw+Kc1t5gTq36+y9OnF077blxcOO2/tVyw4rv3XPUxN4Jgoy7bYdPrnQMwgmpwF8UPmm7x/2nwJUtM/gZKYKTZTNNmBIfgqI1hAQJAGJva/wF4IQDSw1qkZk1mZI7WgjVzx3I2GEvzkBu644J0FTHNaPr15mp59zMdOYW+9e/hIwGQs4uPzWyway3PA3vFNPU863PIx9408WRAYAu7Hz28zbSaRev9/xGjmy3vcbo12L6MF6/RIiEMjebz9qQyNWWqFRIGmHPN2wQM+aPn90YYU+QrrbpG2nrH0MX+bJckAFJJFJKdlcUhvYqRvRZPaY5UhtaVhGXzmLpPvcDIb9Drqb5XjuJ6s2a8lDOX00EVqwLyNrmrQrtgZkjygd7zbsfOXllT9qok1rJW9E6HQuXikkbEToux310WjUU1IyCRTGdzpS1UMwziyDSmoqq/7S8b7QLtK6vMkp2EaJ7XYeMQwiCisigUvghRV1hoRBEfRdyyCBhgM6veqxERhTNV87RYEjzVZYuTEvzebgWp+L5bQzryLgOZKemX3Ray8W+Xg9yUbGO3J/Ex0KYA8HAB/jIFkDy1IOW7mwJsPHclsbUGseAiityTeCdCQh6fByLlFnUjgLDgLDLSRf2359PWGxKIaffZhS+KBE+IWcu/Vrl3+Ka7TgiObsSce5rsvS4U2c7rlG4++60zabi+omESruWe1VjyNltKbb1X/rLkHQlUwgf16nmwXrfdz43UivfiL4rcDEue7zSDaLfWxp42LX6jRZ/T0j4RcwqmIEGJuQpuccNLpqsbXI6RCVZJXbOxajVqB7HvRgbsxCHxetEYeVc/Ma86WJpLVSe739BVqLNnTHFzfULalBsxNysrMShVhdutVujdp/x2sJrZ+2baxr2yy05+r17hs881CWwZ4IaXfLGoVq7XkawqkjHfHXS0zW0rfYa4cxNzTWLAGxTFXs8TtKPu6yYJer9AdnP4XokhN0D8b8bm31Br+YIHQ0fRS4YG1rZ40dWbNZn6ZsOBPk88d+ikZee2cvOiBplzRf7syyoumvYUbaR3tPZmIT5eoHmeHh0dtpXQ2JrgNk1ezOl2/mBTnJbgFirztGxwcygMntTlmOzMNr/WSSb+zMNwv7Ksawy1HGj1LUZdRdaphcU5+ip6NDlufVnRbvVM703UpPG5yNyi9aYFvjuo8WTJ7v4T26qn5xZbT7G0bpv0V7dEV8i0fdDs+ZxE3GoAW6/skqrWO2WTvbexM6baDeLaFtQIfHGqOh7QU1UbgTcAM2SP/A/bItPTCfsxkdbvnMOF23u8zgwcSePsLJwsTnYNHZWNzegAJY5qip5m9B3tUajdqclvxtQcuaF11ZeMjaZrLmsmjbakFvsE19kMP3t68dqH4qZevW0eEzuvtSS+zM3M+/86EjlxiU/rROPspUcSm8Eb70WvLxyNTGoz2zDHZxk5ekwBuqhopWyG7xx6OOF90DW4X1lGFBcYLwaLp00mDd7EPLGyFqzcMqtrq7d/BwClXEuB/7WU67Pk+1PxXSZpnbC3JOIiAWnty9rZdnGG8fd8vibW3PRi/ezvJ6dtqWy9XTLFexc/c5p5Xjt9A/BwYck3/xDKPY8q2lpY0Q3/TVDKhWnP0vPmnJFSw/aulP+h1bbZw7cqaBuQl6183GMGQjJzvx6ZuCN6ZHVvZmuHrk0REncHrnFecfXsoYWEze5zKvu9RtbJdb5df3YmvSirPbHIpV9Duswp7zXOy66eMbyEdjwW7aw0w2PvWORJnw5OrRLibTq1dj1XFNHcctvuNTyil9OPv6NoT+Q9x6bWKA3Je86Vs4ty7E0Nhj5UAc/RXYsFY6uyoYPc2aJ9QL1z13jwN50Kn/7YYdj6TnLHOUZQo1uQR8pTHYfAdiAFEJ2F1/KPmdf0Fy1r61vUWEcCHGUJAw4+R9QSqYYBiQMLgD5zjpKzPk+RmiUE/JDs1CyNnt8g0kZqrr/QfVkh7VT8b/94r0T+SrlAeTg0oe6mfueB7x+c1T794O6HNuoeBTAGXvVJ9GZ5KEs0ik36+gicl+0dq/EaSr+Oe2WmJy/8IDRYKUWysmKkafXQ/I0FelJlHEWJohXbfpp1uXDePEs6SkIbnIisVseTdBg4ZLiubXkyQwuY+i3QrRuV5FMoXhw5nPTzTq+FpBMCJ9iTqN1JI0RZr0EkKty1MAPSdzb4+/axQHqcx0oX6UQp+b1qzVWvYKgVh0n1a5vkx1ZpF3IL7R/+ilaZvQusRk2KeRmvXj1QTNXtZQeqMsuhq6baeK3FX8Ur657qbURDg0fDP2xZ5W3o7e5oa2mssaP63nk8QuqdKimRjt9e3duYHtyFtRePFs1Vg7XI49v9scsv9InrIkbbWfR67u6d2aEFg4O3T0TEwInVnlDlqhpwANTblkbQllmtiqJMmd6DdR5hMB6e7PWrHD2GX525usP5BxW8si1PKY+G6neTlVr110MNimVYaTgjdE9mS8/wsU36QDaQZ/NIORQ6hlAcDnxO98h+QKCW5908q5RpUKhyQSeyTn8YqTyhgATx0+u6KIks8qISknLHzfrQK1fmbwxRw3kc+IBML+w4l6T4jrY5Ms4Ux8N2ktRSVIiiJp10Z5rCUc4nDUbDHn/EZavMdOf6ytkw40kSRQzWPMqk4QkVncJhg8oBDSqC+KFRIziItm3d1JOsbhtoTQK+LodWbxZMZ7Zljk4nRXvSwmy0ag5GaWELSFyGog6JDrRjJTrQruR7cdTeqEoSQhDi8qI+T9YKSaoEXcKapIjRAoOr0BxIhltOHwqDLLrzO3n8oo4Eh+4QUcaeQLv7hCGOaNjBgEXlP7OIo4zxcT3f7UcYwxd8tnF1FLJyKp3NRgh5NNVzwwqbt8FDQE7JvtnZLHvVjqt3SJGUGVg6XHRO3F1v6l2FUruZO+fRCB+bTFk0CDI+p5V365850RgyYMEs0lozvaC+gXhytKt++OmzcREsBUFMsIqgFYVWLxLDiPSezoOm0CZYaVbrb4ADHL7POuGX59H5mHTHm6DSjCpw4NBWXcvfHj0PEYrj3o3c5XvVG4skdq0ceEITvbiyKxdVfeRM07c732CV/4vKzFyJZsPegpqmq8dlnMBxFbfYVEX1In7EShAQRFFW9nh6r4X3GHhZ59l2S6JRp9ViU7HaQUFg7091/9gs8pxORU2RvPZABKV9DyWlL8MJG5UMS2TgVrShA+OtbWXv85yKlKscAU2dqVQbFMMQiiqgrMoE3Srndw9assqDAwE1TvWeymSLzIMpGv6w2qK5NK/ja8FM3HJ0OGIxDMrtugOjkWOS4Sy7frlfO5Tr1QyDW3jUN19k93uFkPu2qzf7FfwWbbVq20rHMOu/RA82TdSUu5IbzlFunSQrWzyD/b/6e7tNHfnMKROyR+ZqoWJm8/r5+x4+5j5kT4rgoI3tNwU9knb9QfHUcP7T+qlyqKaUU4lSJEJnN3kE1dkF9+wGsSo6Ir3wizw3IIJN8h7g3LBhdSq3J4/KHYgspNyKBndh8gRvRw+5zuChlWBb/e489pdzLh/8fwmBvCDQOD5tUbNW+9YjV/beuEMyDhLEC8tVSap6+3iD7G1nTxdnzRByM4vrdZd1YDiKIKTW7MHpzRmU5G5xPG4GhUFJ4JxkVcOpFN6htHsEa+L5WGI6y2nacF4DZ8/StD9hAxNd6EIKnegu8w88LiCnNbiahpjC9BhBVIo1kmMb1XI7x1uNcqFazp+qQK3To+c601J4fXThUpYFQRobPBQhKl1AE0F09aTXOKhw8G5HrkOpMlY8rjS6sa6UTBZI2ZPrhNi9oXODueLqqmefu9wG3wC1NLbMeVOKJP+hsrLP2XHQslLaIn36ffi9nxotHD1zmN69o5i2fnDiPRArHBwa8AO+lTbX7Fp+/4IYAytNbt8Fca+Aj1IXx5OO6zwQbU6VrpMVGt61U9F699HbrrD895VB1397X9/ftTlysTn3gFVPI3dnJzTEO0az515vkH+sl9Rd/Spoq7qCYbn3GhfJ4z74jK5a5SVDrETo7PSZiqJtMS9G0HRqpI8HthgvdlX0gDqq4AzYICjOsNLW3NjI73dxnNPrtJopouyBoNvu8gUjXmtZ6UmGCWNciPtD7L5e23ZZkkvHq/md2YjX5a/i9qRjkSOxHGuwFcuxTFz4ukJT3h1Hu+yKjJuhVI9OX6YgEkg0eXzouFir5SF7J0mc5AnRIHVDkOkaOBhrrR6UTqh/7BPoNPoFd233NvEjjcXrgmhwnsawV2Ct/pKTVEmGjEpuLOE4t2v708IjuWdu3Uj0e1kyvNxuuV9o8wJtMdK6Mw6SvBqyfJ2376KJ/DFfO4FvPH4CPBBQ+UBn+ePGjmf86cVHHxm/bkuWpEomWAxfXjLIqTBVqP4bZ97c9/IwaFsl18Pk9H9uDxUiuflk88aZD+3V/V4WJ7NjZjBoSMrqMQ4K1NYFKmlknM1ugczXBHnxSP3+am9GBIfsxDKopkGRbTLGIz3B/e3LpAk8G9xylvv8OpzPEtu1UR93tgUSJXNg/RywluwfU7aatPft8Uzn+myh4qEeG5Xq9XP3YGEznBWZuDHrGBLMPERM1XgO5ZRA8m0I63QRB43I01eyPgU6KK6QZhn55wP5JtRV7At11RBE1qiuutmFC7V+2s898ZinWOIIg2mJBBVmzlq5bD2vbkFgKAeB8gRJhjOvvTm8jEACw1y0vnweYRgXRCjAKTNFaDOuUjyJWoW8IFDWVBeX84wOCrqD0UTlTpIfxfZkd/sFWku25So6Bm/14l02WCbcpICNhXW10wUECGiEAKFIvQFncL6I5bdXt45Fgn5HnhVECI4HOHv4PmMqdWgD3+b5SCDXg+Ku3O1HZmh+ZXR3d7/cMPE1T+ba9UHg01AiLLRa5diAWzsNCltWu2i8I1s9665T3q1/Zf8pehxTj2GTZs1F/vg8gnvCzcXE8j3dQC1w/XDsS67scOwb3blNXtrk2SRbfw1cOOT+F8+s/OY0prrUZiLmX7eTKAbvfjvhexQe7hppXfWdQ8Nh3+tkV04EQQ4HzIQLSt06EpiXLdOjADOU+BjuTO+SGxi2anAmTy0M40EJFVRQQQUVv7Wegt/Tcd9hA+93/AwmD8klmgR8g/pJ7Uaojd6Rt6KM4HXKuPvwGnAI4LZh9stiF3DSPItKNuCumCV1uRd5H/hWFhmsSQvwJi3EtCAD4wMIBWOoPrQXI8sCN8L1Opa7PQmtval+B+6KRO49NTZ5sotxVh2IgE+BHA8/3S7Y51rDnkUAp5oTc+OR20ofvsxbWqMBJn+2vl+Shy0shV0q3UIU/SWOE7t1475RYU0TPFPiRI8WWlD6Tn+hCqZpJloRNS5WaD0Y+CFZMmdT+Wjz6rLAhi2nO3zg05Zf26StfmiSGiD6jQBoYIUGZKDoqtl/GOniboOmuSyzuqdaV+XHr+J/cQHPmA43TegBW8QQQxJxxGbZfZygtr+eZOcEUcgdzs7tr3TWgN0Blb2bnZOy3+ugrp/pfvfxGmcsKrGyscVhI8kRKRssiQU29W4WbTwHbwzXskGbBoekqamhwUXnyO27g+lVbCUVoDePohES7GlfprxeLO5OO667ePGXfzy6frsVsvvDl3tFsM9G9CRm7QW11zJF+wx6GbwBNsWmPcXJ41Meaxpy5od7uVTV2KG+hgm4oiaRu4wovKBSP0Ziu+ArqmpVtJyK0sZC4q1QHScw8HGyESZdbgemqITNzUESzm1jvXmTvKyNjw7wNjNepIG42KkVJVeVMKZSeVkwx+kZ2Es/c0svWdo9U+SroB2r0IE227dfK0lVYfbo8MqoUXcHhzCAeGib9uvYNRdQXAOEEEYY14uAFVLc0uBgCHETuGDwMBL6AcUlMOuh4WinjLfOiwQXj3LU6PUhYmh78NDi5QKKaw/MiKlhOLqTf2XKtdz13ssYbrpUE3KPFNcAzIiTEYSTe2WqF+njDoqCJy2V4HkVvPI01e0kCU8IIYI4AgjY+F7K8y385PgUk0wmMuhzp2GKwJa0ib+O1esVDL1wcLrZWiFr5J50k0kGp/bOl35DIjFHTeLSoJkANXDe4w3jmYDeAKt1js1bmakTBvJu/UvJbTVbh4Ys0dwbRrTFvtTyWrDNaCTYQLXtvF/DKc/6KnlXtIl+MQDqU2IzrP1J/4rStNOdoXB3IBD0eOHDsZngR3DRf4JepTdtPG4HlpF+rgBBNE2ZI6LY2t091N9ZsolyGDQaQpAqVWeSK2/mvTR9qyCJJFYgjbQw9BpkOKSTNbZ54ML1o7ysuLm/triPnZnYm1/dOK1ev7S0NBe5fBRsC6inmg/J8RImyjpx4NiWIdEtSZ7dMXeC0xlOEDW563n9QZWf2w+w7C3JvYfL7ejalPdcYmgfKp0YHJY3PjX3WegL+7WTdPHESXB3QL0zVXLpBo7i9pv7f16lRx20DhNnFs0ZmY9VTXIarzZ50x8NrEr6z1r9Q1ug10in+Ty6M3wOCyuY1fZEzZwdBeq/RMt9qRqw97yVMlsXA8tQzEQydE2CBExOZ4Sq5snVoVIwdYxtlvJnlc46zD1q4cUcGvWjwcOBwsLyqsJNOhotMdrleGESTLBLoZPKoaWL4412a8Dl4X1BHfyHPnZmOJ/EQwBjv5JWDyjTPhdBlIVjji24uO9EPeuVw4yCmerdUXq/QlZ2uN2UNqrCYCgO8QG3wpxBd7B6nxJzbr4k1xflrYUC70APCpGAm4Z4kBNUOqaPddrbNFQp6zhvyiKrOibKU+yJ+U45I4hIsu5r6mhQoBwxhJpCZljhO1I4bR+nvSpZ8cBx4Be8r+M4JklGusN3NG+oLfda2XXvwjwtTpXpm2LuV8PbjzI8u0ZMi1YxIu28dKmfwqnf0t8Km5vbbnhibxuFRib+lw1tBIu77g6CAjwfHosUzkJB60PQN1dWh8lTfzyZ7YF7V7sslMTmg18bZzg1cCoFbjgbk6C2fdZD8gD5C3kjdsSJggBkDMaBHa3CDJxllVTRcFNMfNqcjSUSCrvH+Q6+8qqWzrqlseZoDweJL5I706DcaVK37QmQgmuzEuzgEAAHLqbpSqgy9VpJk0WyePEo2JM2wdexWVCfStVj9eqvuicaDl/3BkGz92st6c2HHgLugPOed+xGkohHejphz73xgZuXga62ptaGWOXdD93t6nKzKXB3e2DbYiy2WA02ov+FDlzzspkgL7MRGIvb+NJfyqt6fX1oaO3tfWdnqlRH82j7v+2J6DQT4BQkuaCqTP9ivJMjQ+q6hFvk1qQUBp5s4G49VPvZAONfDP8betRPwZOsjBttIgAe5FTmwxKEsEuFJEHViBDvV2SY6Bw6lqrdxJquKrfbxE4tWdO2N05gjCgJHgCX76QkD2OOGgUGdZ7nnzo2e0727nAETcX1c4PAOYo5+66dyL7JK54p1/A8rKqjoytuc+ZpFg1k/yLmd6GWPWvwTF2a3peEHz4jbYGDgXBZS+vgzBxoTvia8lqXfZnM4nwiPSF25v0+rHB1sXrjYFf8V2RbaA5103MXka7j+ZUtMRmlsuSxlDkXrAsKXhaEwFBocHpYPBOG4oQbadkHCFBQQDguLlMVmMyDDCt3kO8jmePu+06G/P0IL5rhJyYIeXc070pxh/79hkqd0gYJQYjSL4rsk71V4NB44V7Z8vLf7vsDKQoKsuy+Ux1gQrAAN1Cw7JMCVyjTlXVL+/63vVOfX/n8l0/t7SAAASxaHDrPvZcRdfoP6zAAn56RLMS9BX+T/00MJvneBzQKAIHv+v3YYyH1x9irg+9KbNVM/KwWfpfnHFy2GrtMNrykWw6On1hgioW0D9kansvWh6de/2MamBiIvyxmmU+ouurADsxHADHLeUxVROA5WW18rKQRKxLdXQET7tSVKaJMZJqBwitbOGZT1xtTHG4f3iYC+aMsMMGTJkwRlvZMU3p0Zxb+mM1sqo+1zMHIPSxE2fEYCxNl4pUjeTODJ98wl/IjxTyyUsAyqJyqLEpY9WeZlM5wliUnK1m2qtnNchj1BMtVNi+xivKTYpWEdZRVFtV5rApPl45fldHVtaTRBUwCDs82VlN1NdQ9D+v5FFhpR2X7XqaxrkwaEaI1guacPlt1tHdXta6l3kjqWhJFhl4j4DhrC1bOVVU9N6fwXCuwTTVQ82diDcNhI8ZMoe7ePLQr7dFf/O7qpuB9Ih2r9DxoVOP8Lm0elSc6+5lGI70x+eYh9AVtZ9nLiGutljSP0y74a0yke4pLrXvJOpf9emHwHmr6rAUO5XpRrPN2gfJqn9LIGN2LxV9mlod8HS+75sVrGFquv/c06ZpHXrxLW3vg3aR3zjeaRa+QAjdhYk2dyiuN8mSxKgs/pf+HrQc=);} diff --git a/themes/tabi-lean/static/feed_style.xsl b/themes/tabi-lean/static/feed_style.xsl new file mode 100644 index 0000000..1e413bb --- /dev/null +++ b/themes/tabi-lean/static/feed_style.xsl @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:atom="http://www.w3.org/2005/Atom" xmlns:tabi="https://github.com/welpo/tabi"> + <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> + <xsl:template match="/"> + <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> + <xsl:attribute name="data-theme"> + <xsl:value-of select="/atom:feed/tabi:metadata/tabi:default_theme"/> + </xsl:attribute> + <head> + <title> + <xsl:value-of select="/atom:feed/atom:title"/> • Feed + </title> + <meta charset="utf-8"/> + <meta http-equiv="content-type" content="text/html; charset=utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <xsl:variable name="baseUrl" select="/atom:feed/tabi:metadata/tabi:base_url"/> + <link rel="stylesheet" href="{$baseUrl}/main.css"/> + <link rel="stylesheet" href="{/atom:feed/atom:link[@rel='extra-stylesheet']/@href}" /> + + </head> + <body dir="auto"> + <div class="content"> + <main> + <div class="info-box"> + <!-- This block replaces the text "About Feeds" with a hyperlink in the translated string --> + <xsl:choose> + <xsl:when test="contains(/atom:feed/tabi:metadata/tabi:about_feeds, 'About Feeds')"> + <xsl:value-of select="substring-before(/atom:feed/tabi:metadata/tabi:about_feeds, 'About Feeds')"/> + <a href="https://aboutfeeds.com/" target="_blank">About Feeds</a> + <xsl:value-of select="substring-after(/atom:feed/tabi:metadata/tabi:about_feeds, 'About Feeds')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="/atom:feed/tabi:metadata/tabi:about_feeds"/> + </xsl:otherwise> + </xsl:choose> + </div> + <section id="banner-home-subtitle"> + <div class="padding-top home-title"> + <xsl:value-of select="/atom:feed/atom:title"/> + </div> + <p> + <xsl:value-of select="/atom:feed/atom:subtitle"/> + </p> + <a class="readmore"> + <xsl:attribute name="href"> + <xsl:value-of select="/atom:feed/atom:link[@rel='alternate']/@href"/> + </xsl:attribute> + <xsl:value-of select="/atom:feed/tabi:metadata/tabi:visit_the_site" /> + <xsl:if test="/atom:feed/tabi:metadata/tabi:current_section != /atom:feed/atom:title"> + <xsl:text>: </xsl:text> + <xsl:value-of select="/atom:feed/tabi:metadata/tabi:current_section" /> + </xsl:if> + <span class="arrow"> →</span> + </a> + <p></p> + </section> + <div class="padding-top listing-title bottom-divider"> + <h1><xsl:value-of select="/atom:feed/tabi:metadata/tabi:recent_posts" /></h1> + </div> + <xsl:variable name="post_listing_date" select="/atom:feed/tabi:metadata/tabi:post_listing_date"/> + <div class="bloglist-container"> + <xsl:for-each select="/atom:feed/atom:entry"> + <section class="bloglist-meta bottom-divider"> + <ul> + <xsl:variable name="show_date" select="$post_listing_date = 'date' or $post_listing_date = 'both'"/> + <xsl:variable name="show_updated" select="$post_listing_date = 'updated' or $post_listing_date = 'both'"/> + + <xsl:if test="$show_date"> + <li class="date"> + <xsl:value-of select="substring(atom:published, 0, 11)"/> + </li> + </xsl:if> + + <xsl:if test="$show_date and $show_updated"> + <li class="mobile-only"> + <xsl:value-of select="/atom:feed/tabi:metadata/tabi:separator"/> + </li> + </xsl:if> + + <xsl:if test="$show_updated"> + <li class="date"> + <xsl:variable name="update_string" select="/atom:feed/tabi:metadata/tabi:last_updated_on"/> + <xsl:variable name="update_date" select="substring(atom:updated, 0, 11)"/> + <xsl:value-of select="substring-before($update_string, '$DATE')"/> + <xsl:value-of select="$update_date"/> + <xsl:value-of select="substring-after($update_string, '$DATE')"/> + </li> + </xsl:if> + </ul> + </section> + <section class="bloglist-content bottom-divider"> + <div> + <div class="bloglist-title"> + <a> + <xsl:attribute name="href"> + <xsl:value-of select="atom:link/@href"/> + </xsl:attribute> + <xsl:value-of select="atom:title"/> + </a> + </div> + <div class="description"> + <xsl:value-of select="atom:summary"/> + </div> + <a class="readmore" href=""> + <xsl:attribute name="href"> + <xsl:value-of select="atom:link/@href"/> + </xsl:attribute> + </a> + </div> + </section> + </xsl:for-each> + </div> + </main> + </div> + </body> + </html> + </xsl:template> +</xsl:stylesheet> diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_AMS-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_AMS-Regular.ttf Binary files differnew file mode 100644 index 0000000..c6f9a5e --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_AMS-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_AMS-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_AMS-Regular.woff Binary files differnew file mode 100644 index 0000000..b804d7b --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_AMS-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_AMS-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_AMS-Regular.woff2 Binary files differnew file mode 100644 index 0000000..0acaaff --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_AMS-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf Binary files differnew file mode 100644 index 0000000..9ff4a5e --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff Binary files differnew file mode 100644 index 0000000..9759710 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2 Binary files differnew file mode 100644 index 0000000..f390922 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf Binary files differnew file mode 100644 index 0000000..f522294 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff Binary files differnew file mode 100644 index 0000000..9bdd534 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2 Binary files differnew file mode 100644 index 0000000..75344a1 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Bold.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Bold.ttf Binary files differnew file mode 100644 index 0000000..4e98259 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Bold.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Bold.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Bold.woff Binary files differnew file mode 100644 index 0000000..e7730f6 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Bold.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Bold.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Bold.woff2 Binary files differnew file mode 100644 index 0000000..395f28b --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Bold.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Regular.ttf Binary files differnew file mode 100644 index 0000000..b8461b2 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Regular.woff Binary files differnew file mode 100644 index 0000000..acab069 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Regular.woff2 Binary files differnew file mode 100644 index 0000000..735f694 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Fraktur-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Bold.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Bold.ttf Binary files differnew file mode 100644 index 0000000..4060e62 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Bold.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Bold.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Bold.woff Binary files differnew file mode 100644 index 0000000..f38136a --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Bold.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Bold.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Bold.woff2 Binary files differnew file mode 100644 index 0000000..ab2ad21 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Bold.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-BoldItalic.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-BoldItalic.ttf Binary files differnew file mode 100644 index 0000000..dc00797 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-BoldItalic.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-BoldItalic.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-BoldItalic.woff Binary files differnew file mode 100644 index 0000000..67807b0 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-BoldItalic.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-BoldItalic.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-BoldItalic.woff2 Binary files differnew file mode 100644 index 0000000..5931794 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-BoldItalic.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Italic.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Italic.ttf Binary files differnew file mode 100644 index 0000000..0e9b0f3 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Italic.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Italic.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Italic.woff Binary files differnew file mode 100644 index 0000000..6f43b59 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Italic.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Italic.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Italic.woff2 Binary files differnew file mode 100644 index 0000000..b50920e --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Italic.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Regular.ttf Binary files differnew file mode 100644 index 0000000..dd45e1e --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Regular.woff Binary files differnew file mode 100644 index 0000000..21f5812 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Regular.woff2 Binary files differnew file mode 100644 index 0000000..eb24a7b --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Main-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-BoldItalic.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-BoldItalic.ttf Binary files differnew file mode 100644 index 0000000..728ce7a --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-BoldItalic.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-BoldItalic.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-BoldItalic.woff Binary files differnew file mode 100644 index 0000000..0ae390d --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-BoldItalic.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-BoldItalic.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-BoldItalic.woff2 Binary files differnew file mode 100644 index 0000000..2965702 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-BoldItalic.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-Italic.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-Italic.ttf Binary files differnew file mode 100644 index 0000000..70d559b --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-Italic.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-Italic.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-Italic.woff Binary files differnew file mode 100644 index 0000000..eb5159d --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-Italic.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-Italic.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-Italic.woff2 Binary files differnew file mode 100644 index 0000000..215c143 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Math-Italic.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Bold.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Bold.ttf Binary files differnew file mode 100644 index 0000000..2f65a8a --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Bold.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Bold.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Bold.woff Binary files differnew file mode 100644 index 0000000..8d47c02 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Bold.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Bold.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Bold.woff2 Binary files differnew file mode 100644 index 0000000..cfaa3bd --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Bold.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Italic.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Italic.ttf Binary files differnew file mode 100644 index 0000000..d5850df --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Italic.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Italic.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Italic.woff Binary files differnew file mode 100644 index 0000000..7e02df9 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Italic.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Italic.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Italic.woff2 Binary files differnew file mode 100644 index 0000000..349c06d --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Italic.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Regular.ttf Binary files differnew file mode 100644 index 0000000..537279f --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Regular.woff Binary files differnew file mode 100644 index 0000000..31b8482 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Regular.woff2 Binary files differnew file mode 100644 index 0000000..a90eea8 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_SansSerif-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Script-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Script-Regular.ttf Binary files differnew file mode 100644 index 0000000..fd679bf --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Script-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Script-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Script-Regular.woff Binary files differnew file mode 100644 index 0000000..0e7da82 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Script-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Script-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Script-Regular.woff2 Binary files differnew file mode 100644 index 0000000..b3048fc --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Script-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size1-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size1-Regular.ttf Binary files differnew file mode 100644 index 0000000..871fd7d --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size1-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size1-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size1-Regular.woff Binary files differnew file mode 100644 index 0000000..7f292d9 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size1-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size1-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size1-Regular.woff2 Binary files differnew file mode 100644 index 0000000..c5a8462 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size1-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size2-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size2-Regular.ttf Binary files differnew file mode 100644 index 0000000..7a212ca --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size2-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size2-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size2-Regular.woff Binary files differnew file mode 100644 index 0000000..d241d9b --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size2-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size2-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size2-Regular.woff2 Binary files differnew file mode 100644 index 0000000..e1bccfe --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size2-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size3-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size3-Regular.ttf Binary files differnew file mode 100644 index 0000000..00bff34 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size3-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size3-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size3-Regular.woff Binary files differnew file mode 100644 index 0000000..e6e9b65 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size3-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size3-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size3-Regular.woff2 Binary files differnew file mode 100644 index 0000000..249a286 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size3-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size4-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size4-Regular.ttf Binary files differnew file mode 100644 index 0000000..74f0892 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size4-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size4-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size4-Regular.woff Binary files differnew file mode 100644 index 0000000..e1ec545 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size4-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size4-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size4-Regular.woff2 Binary files differnew file mode 100644 index 0000000..680c130 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Size4-Regular.woff2 diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Typewriter-Regular.ttf b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Typewriter-Regular.ttf Binary files differnew file mode 100644 index 0000000..c83252c --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Typewriter-Regular.ttf diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Typewriter-Regular.woff b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Typewriter-Regular.woff Binary files differnew file mode 100644 index 0000000..2432419 --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Typewriter-Regular.woff diff --git a/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Typewriter-Regular.woff2 b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Typewriter-Regular.woff2 Binary files differnew file mode 100644 index 0000000..771f1af --- /dev/null +++ b/themes/tabi-lean/static/fonts/KaTeX/KaTeX_Typewriter-Regular.woff2 diff --git a/themes/tabi-lean/static/inter_subset_en.css b/themes/tabi-lean/static/inter_subset_en.css new file mode 100644 index 0000000..cafb383 --- /dev/null +++ b/themes/tabi-lean/static/inter_subset_en.css @@ -0,0 +1 @@ +@font-face{font-family:"Inter Subset";src:url(data:application/font-woff2;base64,d09GMgABAAAAAE2AABIAAAAAeTgAAE0RAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjYbIBwqP0hWQVKGAz9NVkFSgSAGYD9TVEFUgiIAgRAvghAKr1imXTCBomIBNgIkA4I4C4EeAAQgBYoOByAb43IVqls65OpOCGt96qrYUdSJ0erToiibrKWy/z8l0DHEgn8Kii4BmaRaVZvE9JkKzRCrXOj6NuqyHkezR98XbphNsCvFPo9wt0o72VVXLcIIOxY1+3QgBYCw+YFFtoMJEFjyE2Kpw/0qDCYZPSahBL/ppEX2ZK8+e0hMgqYqlBMnV0cdv//p9SM09kmu/z3p9M99u1otkliW9SJkIctCxkIUt8ZksCi2U3HtxCmd4C43YZNSOpOQzvcnDftnCNFoMoy+P2m4DB+3NcFy5yt8IQtZ1s4/te3/zjCgprgguGwPW7fDW3ag3rrsM0C4IRoRIiKNOBIi4kgIw4iAaGySEW1k5Ce/Wb9ny/GXLRv89+73757J5L6PJEkWhEbhWiOqAHXOzy2DrTCEuqtGMQrTZhC2OQOToxde5Y18JpEeo1AQsTEBxWhCEAzCwMDEKI72Q17qfx/Nq+p/m1Z9BYQQGFOulDybQjrH07w57bvHUwS7enM47ynFVN1T7YpTdtkYY4IQQgz/ulWPEEIIKS/hEUIM8REChBiKyCAiEx1sU6rjzmwrZSLefl0v22q921bc1tVxPUcd9eFzs96IecZqGiyl7Sd8POD1YJoEaEgzNK0zs7unkx71PIfTnsT0rMDzcerLIAzJBsxFMF0DqIA9L5Z6PnFRycr/Df2c9WPa7pWeK/3V1j/f+/hp1eRaqdmeZBM3McQgKiIiIHUYBhgQEGsSY1zPf5tm8yN7y3u7HdAkV9npxEsTd0mpZcaf2NRLoxM/VNEB0rvXAfB/qmbtfAW/0V6inMTLoOPIEU59fP3For+iHA64xpAQvUNKfAZJBxKrfQa0DkNI8kGkk9YX+OTLpa8KIXU3gNbPQzqB0q4fL4RYhRSaJnVXFOUVre1pv1bPXjwkRBukVBolU8p+3RPVhvY1zONPF9qRAiHRGvBF6fzqVROSVq0/xgMWAgULDsdNi7/ZX7ATm1oPQhdKlobS2d8TXca0DHxubG+MZRcFxFSpySH114LAIGFQLO4DHgTZdYUx+9lCZhRndZPUBERgaZwJDpxQ9VwhMQF8A3qb2GUne/DC3jvp4Y1aHTYEwKEEqa/M7t7PeBFncD88GgQAVFtgK/p7hhnlMWAwBLGbxizgAxxiL79srzdP95Ejh9eA5MArQf+bKBiGK/b11fOh76/JN+F/fvtLm/4+zogP/risvJD68BKtoD4+J+AH7u1YBf39JyXPRB754T/33R18n0e9KviDV88uDn/vq0Oro19pSgtin4kffuX14jwZ+12Q2vjbZ+LfFf/B4fDC+F/boisT3xgViT/ECNcc+PsvnrITbwqsVfV858NJce+voTz1GcPUA1Nfi+icU49isk9v9Gc/Mv2pFO879atv9i6afZt/rST6iWsmV85f9ZmbH//cvCk5/+qhhucvb7jnXx068znOO9Kb+GNvjK9b11wOfxpGW261fX0+KwHf8T4AOtQfjzqvQnbrv7YEuPy+XcJlYNcZV6Qa3HMGWX3p2hRfcUNhAM2dk60RgD7q0Q/4E3Y2C955dkrrAPLnhqml4LEXb+04AZSNN8D4S8C3vL4/Fig+jx/l4Lrv5Mxy/QVyC2yCevR9x4P5IjDDPr4T4hqfr3s5Cp5/u+zZOA5jeiwDfmBwpP2oqewQ8LQ1YXYIaNvSbaGjrdX3x74BHjWACE0QGGnHRCddGNhuInw8Qzdt1KNnK0qa2WlEIEYGysQLKNiBgg4LoIFtaDrUKoyrGyyDJLyLgm+2xMzUQDIaLYQDyM1HJjyBGRWYGUnA25ZFAgKWTRY8TQ0tFqRJOorXaTIewT4YL8KAqQcz1AYI5PO2AGDrnkIDyNq+fsfusnb2ObLwd+0CgHXnATA2vpE+Wft3bx05AxcqP7kEvGEivQwmYJjC/wrg3Tlnrj/vH+HBwCErBOnOA+2incE4grjYOwime8C1Qu/m4aMc+HWGbsd1NSmSmf2sSra5FLb9vop2QOp5bF/LODAW9Odr+gPjwOBmPGXMZRm1+Ej8PIkKAxacBPiNXiIP60jGJrCecyM8q1ApcAYDo5evYu3m61SKwdwYtqLfWj5XwLmOs3GN6wmMPJDgdFAh5DkvsueKoMwVQ50rga1ZCgc3VvSPvzoitledJgeaz/LY/fm1IcNBRD4eJjCL2axiDet5AD97Wxe48FDKRGZTYTxhIw/uNg/ACF6/to02bldstwsINsK7GNzXXVRyK3O5jerICzOoKFgChbGJaWnp0QBJQWNgjR3X/pmzSAawaRaUXQ6vT1UAKoUR0y+DOh07NQdgK8A63X5qLsC5wDbdWB7pBlzTdgblPGAAjumXYdR0rOwEBjB6ur3sAgaQP9VoDfbUsPC+Qyycr5nlEigAOCxsr46BhsxA4+7Ye5nBBMO61rQvvbPk0JQXZzatjbPsbRgVz51TxIiMTHqMxVKZY5ANoEKXFvlkeqNGeMFYYgwmTwqLXMkIm2QnSGaQjUEY27rIIUNHB+waGwgcr2JYJgUlINx1rCFZg6UxFquRXk1AKB0SbLRNi9oeSJJJRfGhsZXHYqk5qKcyWUZDtiyntFyOtajrDle2ixDDjCIXFZOqEqHMxvzvtNFIX9Bq6m3VpApKHJTapTXSLsiz1hPeC0O4Ivca0rbm3Cm8bqaD3wm9urqY/8oV4WZKCtVZS0WxaPGcJ9v6WTDyUHdt88UWUdRhkaCGN603dqiv3nChjeWIte28pk2/3MkLLP/IOGZ4axLR7cBWam9xczf/uSZi0fZi1vCoCMlOTAW6sQok0rjmXvihS1QqfRoOqqw0HC21sSzVn731SypxxSJpJmKtMQOd1U1uc2MTW9jA9tYI2/StB5+rV3eSPjYbHUtZ99Hj8i+RzG3levRidYlkPAheUIqacOVCzMXR/7wYf+8qDBR3nldkPihg9mXs2Qvz0V5RfY9z+lSImE1fVq8wwK+/4IlIccvCGGjdXSV7ier1G+F2jRpeXN2P7bcHtYubXlA7zGX5dvy0ipM6dhmnXHDoSO955bmBs8VtTxbLLB8s+tnhFuusHUStuDcAOYGudeE6T7ARbY2t+LR35pcXTK0tf25rL/Jbvt3blexSW40XzJ+vMak0/nYQhFflbVdpOvgiC0Q2bGXB5nnD1sXmEd2qpgYvgc7Vfh7GL4tWJ87oZnPGvG1Ms5ZK3lI2uBMVSanPGgTvQCSLTy+VfrnfX1eL2Dx0hFZX17PK2sqGr65ee0ns+CvjuIKw//OXTlFpSRcLwXjGPucqysSGKf9hsSDLlO1SYhktZafx1oMVI5iLr9CRNnouQHnlz66LDzktSgNrRFY4qdMd4c61ej8XRXRpTfBVTZazrrTyzRf29Yrhu6MfOrgeVTpSWcI0rsYy39yau7bZan6b67GgUCF0kzygC17v8DIXwmo2f7u5SvxraJO8lVsOZ8MW9C3Uogimh9blCy1qQ9MJ7USOohuWOX8iekFULX0/dzchu/5lobsJXUS9uc5zZtEsfjt8Kyksi/BHcfNTGfHi8/7L0U/Cd/vzLh1T3Hdyt6uB1x5n0Ns7Gg4uePIMmtn6S/MLOADEYNV4Kil6lBWJKWARP8KoSWkIvS0rNW7kVsJwXCtzWFUaTSbz5d5RqU1+/iIkOcMnWlqqooBVfsThovEvKa/f9IXU8TpSp1GtBUlj8LQxG2+fzFQ/qYuX9HaJwGpqUmApLn3gLq90ik7TRZebNLqKrvzcAMHHGtr4J3m2+d6xTNNXssEsTdHNdcOfkJ+/7PLZNjp6TzeAGLiVwMQXay5+wrMJbuGbn1+e5rSFRCMpA6v5iGm38c8or990hziO/5x1BtcqTBpGJOvnkMgZyQHF7v7iGwx2J7S8W1ImmGSxTpbmTWg2tR1uhNmpaPaP1c+vnz9fw/wGzN7S5Cf6M5J3ODSlK91+xL1zB4O1luCTgtzEo7uNFSvumz7EtNM+sWv+6xWn1dlkzS3I6PilRxOFz9g1e5uANc5wY0nnMbtSvO/ocApsUVBK+8IvdSVFC4JxjYRG1nS+aluF7x5Ya6qCqcCquKLw1YQ2esR5/MuQN6/7KBHt6JHeKhFYTk5dKEIqxREKoraa+1fLj757hclXxaKk6/d4Awma6JxKf5SCSkPJqvxydwDIGnBp33TXTfV30nTbzboJNf1sVvJ58sw97kBte0UGhxI8GV1cSfoB6L6v+SyrGZSXai4xxfstcvXmgdEs9XpqfCcmIjfAKzBMstln1p4pA5NO6+sKJfpn8YqK+0zRkAlnCMran1sSXb3Tn0P0jYqUrOfUuLa+uF68OliRmFM49Z4LzBzXaNZprmyZrmMCYpxh7IZa8c6kdHDQtFT5Tn1j7DQrom80sqBgOLJuZAEbR8OCzohdEQftW1lvjzOAqdI3Rt8LF3fA4E8On4UfO2wLjz28f15xtx4h/hhqGdjuNvCToRvzlcsvLz+/wo+Ajn3l/vP7L4EJznC+eZ9d46GLy46mMMeYoEiyBjvkoeHFLRp4VBdPS5P6/eLUrMhdWTxs/TJvyzgof8awqxlxXWziOt8A7moS2aVjlntcVZrOM2hDuU1cQ2kpftBbDzXxD5BsIaiZMl8iD9eiIyEibKhW7WiLdCf8LjRVTAONxclCIo7uidA1A4hB6wTzwND4BJb8qizHeGg42/SqvE2drOQSJ7OzCIcUHFaiPIF4kMcjTShSQNScpj5VnknP7kLTR9V1WQcpOc0zEnRTGCp7Azm2Jj7wIF/oP1GbGBenTJhN082I5jbr6QA1R3Zcnm06PJRjfFUmZ/MIGJoHzEkLiKFTh/DE0QXEYHWCPIU0weMRDioSElOUHMKhrGzipJIL0ua0XVYWGu/W5UMeVNeF7N4sawi82uTFUBn5bEzF9ZfFxMdXxXq3hUfzQwabaQkYlpOvD6lr5bzAPN4ePHCZZlTRqqyxjB+RNL5ypy/SD+GyuvqXs07BZErgeRAxXjCyI5PpKl3PJvjkb46TDgllj2wXYUMFWLb0Kr/g84Au5991hZwlIGBpHnYjzbwKwditoPK4xs5L+lzCPkVCIquCTRhPyyCOVMYCQqtGCyAGrYOtE6WJKebupkXoK6a1eqm0ghckJpCloOVtLQNYPmFohwATXyv3T7HXuHwJNBAEtrccW/r844EMG9sYb/t89M4fLczNntUKxI0DtF8f0PJ255CtPbUxhsWuinGhQt0pWmZ2rDogpE/0RvemQJpIzxQokm8M/YvIzYjGpBPwhQH6NjGbOKfg1nh+Wl8YQ6+8mESlquwAIcFLFTWn7i8lz0Q3yDOtoq6+dPBNB3V8k16rzqjOJExw0giT1VkZ6VVZFmmc4S+7KhM0dwAz0GlHRM2CrF+9XjCf7cv7zyqsUbvWB9bld5MSE+8XxEjzYtGpSGDS/z9qoYsDNMxYeOqDAeH15f58DDGTPAW2bopWu4YmMdOYUgYBSd8VPaerUDWm6o2MSFbd0ZAi7iA6TQhntDnPphZRk7IVTMJWf59A+HiJukD5VnpEUuV4QCanCR2XBVwWM6rQVT2WWpcQgp/PTEzgcvUOrNVy6RetArD++MlaLUN7GOoc1JnNA4ltNPoB5bT2YG5ZZRJAipE0CUA/Ycw7xhgqOT0cUwBNARp4WMaYzfJQKOxx6H5YBwXaVyhjr0GvTQzN1gLMXP8lszxlfWo6fmW857T1sOXwdJRn1Epg2eeBgV5zr+GC4Zmb3bKXRcw7FnvEz6R+0XGLJZTwtPwNgFfk3DERytSgy5xEXmiBBvDhnRdGc4M+f/JTno91dJhW8enzUPVstLOZo1b42RyZcESt5HSP7lx65LK/QQFc7hh8yI/KIawSP+5P/w50ktcLgsPZ5Rvysb5eXP52fwoPh+UF60Q5xy+yi0Sn2Fx9RsCWhpeP8Eu846BjGlBZWKFFiYZMM/ZCCJR42UZKpAodlOUT6F/YhE/L0eSEFu/cle5DRnFytgd6SzcGxxuTBkwyRIPXooVlx9mJexL5RYOp9tBwmDgKXxORW3TkERtkr1Z5n0BTnnktfgyDcjXZqxn4FTpADCAZLuiKzR82TR2wjGkXpdPlwf41kVFB6urQCJzC7WIfnHrXTMNeu0+8UrqCzNSR+BL83hQF//5dPuDDw/aha1vCZp6f9lot6z6RwiuciskfmskdmhujEGWld0uoYG+OnBMqXeEtuMzj36soy3t0X1LbSq+kBTcwwgNqFVQ6XRVOqadSAxsqwsHJFV0eKNB4tK7FXpAOr+tL4h/IZXhpipL9YRZJC3jjWdz0kbNMkfAMM2OEm8Ufj19g4QsrSiZrGLmCA4+TVK1xVUjfLL+gYGE1iRGpIgUJg/x8s6qRcZN++TsJXG8yjpO/PSCoYDuWQ/bGcwt2Aqfdz8LA3k11zTSbcydIawRkCguPmYZnZo7MYSrF87skNKN9UBlaGbnK490DSlCyN9+T1raFVdEC6w2/OmVomM8IVVNDhrySHywUvOpYEvdAbri/XJYXirreepZMI2+OTvLfRNm0KmTlus3JVPYvt6Poi2t77mLwG3apQuKodW1BKWltwRR5UFJSIw3jejeGhCtfjCfmiLyoQa1EgZQ8kdOtwhwITlSXPc0j+t32Abf+A47OBcrzfPH1BjJ5w39PUHjEqnyD6h4K3g3pSCkIIaDiUzfhtrJWeSVAgvea5mUMTtAzhQfj4ofScpN2M7Z88yHaJ9Ksgs5QdLoF5y42+/Eh14J9f/lPuCFwXiPTACsTTcjqafVqYJ9d51PvcRvlBFSJ0STgBfKQvjhvpIPfRRLViNJilB1QLUZ5nYnn0jk6bd0VABhAg7drgA1u7hoCZtWqKK+5as4RzMN8eQLu5G5qbNx/wIh57StlIGcUcICj9QN6VIB+Ze6lhwUg8N9AHyL+d0SXAcC3PA3s6eQ7cLkZ6TKjsRdZB/cZ18P98ihfNR0wvQHBQurN6GZHzfssFlsSLTMtL1rZWAmsTlj9NY9CWTOoMEcbS5t3tvkz+xWMXYxdmfIcDoGz4Eq1cJb+N9yYPT1HZ1s/b+O8ifmB81V5kAWUBbcXrl/4dZH7ovdL5i+RuFKWNedfWr7OIdoR4ch1KvZ0eY47vXRe6LzdubjwhvMPl80uAjaz6k7weAQgkGFjNDxKIIwEAu6rysDtl/DkFtsiC3aSp5oieFJPVPAt9qRpP1nU8RE19QsRTUQyYb9/2YHXUdsq+IitEcY6ggShQm9rD2RqmtVJp2V248H/lAH8Y67NLDDVZM/GIo4TNZkJAgbYVO/DCZRtL3fd55HtutpQHX+4fsqQ7cxPKWyHUzDbxzaGLXKuUlmCNAVZ1QShXqFIpnkNWZXdbx7X0G2k4LYASXPq+tfArKRsWZXUwCTszl2ntHbCyIsYQ3Mdp4ZeMLwD0uamqVPYYl0+Y59KuxDl6pWSGHFECBTW/5DYGpJe40mLoDij99H3itXq1jq1vOMCFntSdtaekmkLCe7wzg4kQzFGkMbvDVnAO4E+EZYns8+IzUG0IhwgxiUjzp+dz81EmGKksFDgx50RhIaO1XQorUmQtMH79zDwMciYmwLMcszCTCFKmwXdgjCfiUN1Mgut0kDxpFkpDboSYQfJUWHckIsxRuhso9NxKCuYFrbA8XiUx47iZ2f2PBU9W6VWMLsj/3bNiu/2DFrWSaLSc3vrlodjfJDq2wGYCz1EsGFPFREXazCdr78tYUCIPeDtm3KN9RjswQWF+ATXwS9H2tVOT+s5tKXJL6g8s6XL11O0ksDPZ9vQ7T3o8xNN8i83DtSB+gK8KAyJZ9BxI+bQ/atGY81DFlukeYtt6u4Hdw+hAarQ9tCc7/V6xcDDiWXXWwSh91q7xuYCwRXCbsuxQ5Teaey2NiO8bsDZBvIwnRrZYZirqMw6jdvJrKcpkSUQsFqm7Arv97hxaZD9d1VD6PVqgTq5i+wfcDrdw5G6qck364WNk48KRz+5yx0ADVry7klVDsLO8T0II9QrHgRT2S/ksnk3jaXWstMkShjcwKZSLVdqXJGiWNVvxSr6zXgMW64VlshhEBGGXM9BOFEZMcf3VzksIVwRzGnu4hZ9Ld8VyHXhjCsYjywDA0zKAia4TamNCMIWtP1IyDBwD7TZeY+NE3DxwghZZMEmmGo/seBFCHMKtvZTd7WPEMGmeQ9ADr6Pr4h/TTdaAhX6qH8YJ1Oi3WAxr9eCW6UWK6jwMLEN1kbdtSX3DrF90qwjutGNeU9Qgwi7GOVuzKi058bez9SAciWzqL1dfWJ7AilYN464vU3TIATQkyHZCPzw94i8oYCx98wbFgArANN9TPdXC0DYDGH4MrOnvHA4Th6a/j+j7vlGJQa1vF5BwfMo7M6JXUKX7dk3hJgEE3BolL2SWbKhzV1lzK9hDAx0z6sCuItHEfdYZsVaT3ljIWG7+i6i7oNHD/jhGvM4by+8efLgrPx5C8L21b0yZUej9xq74IHZzAPYDidQiqAAQ4YhNzXsqKnnjaS+ucL/9t6c78Z89SWdVKax86vuaGzkLZnXktkMtSyHBXWeq4abLmaP2JkLXwU/3B/UO/+IXO5e12oXO2S7hcU+xfhBTn1bNrtIukau600VCrYfp/VK7eS8HuKH9fVahL8v2hEWNC4PrhvDgxHrxnJCCHXzZtP6Ik0fmWpSqDx0yP6GQLZhQCaHK/7ujD0s2GkMphzb7UHaNNOiB5NOPKAkO3k3dQpXuu0wA4vZMy5kK5tGDgkT2zwx93ulPkwpblJrtMs9YCOpwIhY9ECtIjAZD63eze5xoNNthxmwvGcUOJIx4UM4ruKJK85qeKAtlHkVYswxZUmXnaZU3eUk0DjOYFnDbT8EyWZQosRCJyrmCCyoRivlBFyKejJt27IMifYqPfTJyxfV3vb48/HWy+8CQYG7PGDdsvH82c8PYdMu2gWef7krh5S0WZDtwTlUtHg93MNMH7N9TAImIT3TJzCCAAS+Rgqmgs9Vw2AI4xdA4epd+7+BnS0CZl3izoL1deiEQQhDGHUlMotiZNsYYh91iJ7/OYme2KQ9ZaJ/azsGQUIYe+i/KzhOk3qldNuc0xjcr0fXAeYLBqdyan4VJpTrutXk3rRC86uww640fjfeFsYyP/vMxUVtg6IRXZGI2vwhDy7NoQmmBjdn/w/Wt24j8QqKqelwC0TmcNsajXxpVQS6l0fUQ/QrvIdzNlRuLYdxyEjOu7r9whj3l4wzKbs88DvayMSzJ7nhnhM3GTglEUk7V2DcMcXkEEBfsj6MgmRla4XBrOAGa3q1fNIuQtCVgnpT7pAZCjUw9GbluTvayIzYQ5qVv60Gm1UHWEdTAdzFI5OCE7QOx214CoVeBAi5Z7mCZxOlXbR0xY/ScQQuIUEewB5kj9UgC6sgCUlI7lCsXDqb/sZLTRxFvXXRtzQtwJPCRGG6uoo4wAFdlI7+QiTmjv1LEZ1dOMIM+3OjeF4pbW8Bz/xeJLVQRMxBINZ74f/zG45EbedMXN2bhio6MloBfcKg6KNeye+1+dmgCOPp6fAeiM0QYB9mGHd4aVDi5fmLIpVcLpls17ggKqCHJyiSNU+QeBVZHIOucEny1uY2KXTH30sdixc/P9Vlq8ibradZIsoqxmdhQM2ujtzf5Zerrrn7se5mgDD+3C9MajF2jyKKKESM78MBJQmUG2tBEXId+2IQx88KEVIBYfClBrar7RWLEebvCk20sYJPjYerJZMIbxiEQ/AAeBA0KEFyeleoJsLlYlxniHqjs9qzlrBFpisv6z6dnXvAlDDE6MB8FUWHB8AZXHrMPgu4mxprScrJRz8jiO21ZH5ToSs4nFx5vVIVb5N6b+VTihaafrMWr8bmaGiNuQO7c1jlSkq/BTy1Y3UBaNX5KLhvDZRQlTMYOSgJJ+pWmHJxlZ5FFD5Q4ykpxVSMODnOws9Skjl4XOOZiGR1D0eQNEj+JpkIwpS4/BpNeEPjXD6L8xwWtZLY+CJOTmbg8oM8DLPykwhh34N83qD6lNPVkSLHkFgmCVYy1GqRqKqGReJlYgHnXKlcEfFMLswWwHmSBYtyTQ0W54MQwF24fyCsJruicRCvVGayTxttxn3nf/DA/Gwmo6XiwVduAUFJOdKhaTU2Cn1CRGeZjUNU81OQ+yXrHeNGSodxPsjw/vErm91e6LRebT2p4I8Bqz1p7o1z5lVdIEF39FPm0Ca3moh3ogFU2vpuWmRtXgncXFbiOKbGzW/6owKaJ+WYV1lvHRtZhCZ4vE73Rmt4DHwesBE20fqbDEPu6E8WI8d/vF32rA8U9G4Yg1yzHvbbD/7tK5IIBKZ5ofiCt/3VfFTQsnkCY2IHutQPue/VyrSTF9IHX6oarOU09cI640tVg9Y3vWFBW4688rm3qw56YSMEIIB63z3BoAQggY+9DiaC4smuqMC4pJzMPZzuaiR6jkAHcc9B6mvZg0TunnRuE8DOxKYUbUfT0ssp3ONJ89IT/linKdADa7Rv+EVU7KOyIMkfwtrWmTuPgEoIv5sQvHgVPvZUXWBLU4DlSTmchW3OQD7RdXG1TA+EvoT0WDgRfgknwolwgqby6XDbsv/dTgxPjTYNgpIxPxOoGn6O+CM7jIs94av6kpFOWZ0nPp/9sdF1j4KYKhhWEwirrzWj6RqbCqZztdrqmhGhsAhCwsLiM3eaZFWdOuXpZYIIzIS7uIVMhu+uXcR07YyUlEdv9DAbl0AMXrn4YSJw/1f/8nEp2RmaXuD0OBYogB41QjgwGo8GUtAHalgZxEdhwBaMs7BA7CIAGSc3AR0YOVpFtvfSHxd8+u6WgenrHyUm7461t2P/F/Z9xs72R2+ZrUGhA4guvidCM9TyliAWyFVN4Wm5r4rEhIC7J17mNHRetFyEoOOKsiTI9Jr52PkHV5Q53SwEcW1keKPv0Iz/HqlEWFJxstekslLG0zvU7Yxn4hZjNnXQJlBanevRzF6NW4IuNWyRoK0mLF3k5S2Se7zLJVFVU9tACJtGHDpyZLbkM/5xhTlqXU0GpDamx5ONp3Dn8etKBMp6UpD43Ga4JnSw9CDt8eETK7nsDNPaiXR0YZI0g4rkP7jidLvruTgyyhBCu3v2CQVNtVbM5cpVt9vo7illZNqWHtd+9GY6dKU02KnixGB8UiYzHpxTurJBQi8AQZBoiqLizEe6bjqkB7RwO7Zb+61X6OtCKCgjN8xCfyR+RuxjLKqgB7cYl3f9n1GPLgG8tRVy2u2nN/tz1ln+Mh0iQujOMoZU2iO7qyNgZgvncf9QazHZ7sdA7PAvkrC7vL2zgm7T7L3M4yNWReegCMPNY3tJYvSfxNMomo9GBxA2wVQqIr44OXKqpVHJ8xhJD+ZfdlRan6EoAkiqQXRmckJsy2U6G6DJK7F4Gw/cpLWVkw+0FCx6wUbKl5oon2TxroxkCaAwxdgKzgOyKcAxaW423M5UfIJykAuXChUZ6kY6IUxY+G36HyJcRSXiF0N4ARfGBTGUJ7K0lh13F3cRSDzXoVPGjqiZIsfZYMNOvWfwOibI7qVv1hxaLxsKW9UizSEBX9w6EDvY3910mgQSX5eez//kKRWQRNOc7Zy9i1ZHxAyj95A6830C4I+o2EyKZhQs9D3O5w+gOUgVYcL/RCQrTRHJUigiDLgTBedThKjgyKLE2Q0PRCWBBpI0pXkKEwUnLRRoXLcoganqMoK2WWw2U1PwcMVvhtDGuG4tqEAyMM9jUVzSjeWwZ7m/1CMmczVZ8DWNhUOXVP7f1MXSZtZQ+GU4L7klPKsAHTzYSOvWvQhzK/3+vyqhEWfQiz6JIJXYgAofCcPzH7tsX+HyvqfigyPNU3LCOVZWhDE7FyISNslw+TQiYLTc75mSPTxaZkDZj7Sd0d15RWP9s7IM3lQDnTmTxpt/tBVgYAv6PaH2l0qc4sRmqP+Q4KNLDbRq1Z7P+rbtcNeQ7BIeQOkfGWQ0WE8VEaKPnbNtcAoK9Ta19/C6Opaca2D9gYEqfGUSmlDydrDVQIgoYD7E1ZLs0ngHuBHYDVuj22AoayLMzyg4589L9uz1aV0bOOVr1Otmfta4Jm/PmWdE6TTE3SHEqYVOlHYHRt5/diJtGETFZ7jJk98vBo4iw+tmT+jbXw6yUQj1UBX+DIzhVHOPd7v/IYU/pXFn3p6IhYMBL7kHFv79gJR72OWPan6mt9tuaVMNN0/AhSMckNGcjyy07M7dcufWzvtRvG6xtTfv4F98TaOEra6zlfzKSTy0mNqXQKxSkZusSBtXlthejPdOn5PxGcSHw0ctCQnjHEuuwXgCu+nwE2X+5OXvPByMVThe7m015c49vboTaL6jq5papoZmN+hKVfHhkqozNlffzRYhhuYURWOxI5tKFGvID1FrAFeRSaAinQWuTJ7nYKKwRVUptyxyu60PDGFpDxmHL4fR9FhjhnOi9bI2ihvE9+MuogdVEc9UmG96PvF7ZmQts9sFrg7DCSLOraZkRYlheh2QznikuZZEglQZNQFp8eM7reBXFU2mtraErqZKVTL6LZzJra5pt6Vm6ZDHMDWFlA0ll7RRFFPjccS3clBXJI4zv7MWlSTd0nbkbZxKx/XGTk8PmOGmumVZikBhTdjZk2UKBzCEGbMHKl7eUF6DAWOUkpUsUjVgdVt2ug1SkQNH+ijNSwwmK3mKG4Mbv5C0aTBhjoVWBLb1nytjw2gq672ofoiw25d7b7IStiPn7winbEkMJc7Xm04g72mf54YpAmkQFsagx54odypeVx+ACKQyA0/Ag2SbvHk4WidV4Nqyd1wtfRgtA3iwYsa+JSzMfBNkfhDbwyAUBtB4XHeIQDZs/8pJejtPlD1JUY9Zj1nnt+NJMU0iX3jsgDGQnClEzNwEkVZiDQidP+oegw+viS2NEk0HwZpzCYi6vDcVvBRcF3tZ9g4EItWAV+T8ZpWoLdnUZafRdGARk6dnUj8baD3KzphRcqnu9hBJyETBCereDjJwY0BayyPr7qNnDQNiCvWTg9MnWztBch3uNSGZeuJ4IWmIBw6JmdKBDzpYr6VZFrNZk2ZVTuNa3TQbli7hqvRFU4/RzcBaMhGVGcHz6yIx8UekVts1iISY6ChkcsV8IoaGKzEaB47HHEwFnyQDrdgOsoHJNy5YgNKq8qPEtOmmNxjsN5VNYRiOhSEYghHfmDszroYuGpRX1QL7ndv6iOJ0Wa90zv/Mb2z0vxvjEDglrJRjtGmwQsQW4jE7LehfXw5PqlElMCiphiEneSFrt3YKb+EhoRE0H/ZPTJvbKdoYxY++PZY88v1uWQSKIu324lWxeAorESARpL34sNs66QV9d6tfMHTHwNITXNBkmlBs9NV3ycHCPzREzqwLokTKosBXFSRpVR7zwpO6UgL9wniJmJgCy7xchqZ3xwZXNdQYRKSlJ3F0uDBKkHJOI4mjjjBO2sk1BGm1T9qxupPDX4XxxDU1VagwrzHodk9VUoQoZnCMjsgsTpZ6aEhRBKWLKZAkYSFAhSGKCEJjcggBlgsihCAlpnWjc1sDKCoybZsmpwoRS4lDDns3U1kmAx1ql3pM88ddt986wrTeunKxpl2GF1lNddpQ/JkxyX+pVI7qo9q/R8vZJg9mS0wM+td9ain3YXnYR85x4ubmBiN2bxkutHO/jxxC1ssL27YaifdYc62UTb6rI/Dmlo30y+fcOww2HkPRTRg/CbPfiyfFMokqxYnYOCNLxMk8YvEWed06bccwePP8yZpjYMmp1T9qy2eDKnDPd+4+wISCppWtZ7sPjPOiPK4seou54ruB2AFaXtRLyzGNnf8p89xY/9+YnBxjo5pDCVbCRrRJ3t+ZdHcTi/Ege5W63t+Pfd9NJOcNU11BCKlGILbUdrTcqppjYswjrBbX4j1aJ8djulk0sKRbsp+eqAoB6bit8qYZNYqxrhuGbG0MnePFFBFxWWgbVjEhiC0hBj7/MUVMZdt2ixtt+ww5QwijjVk8EeXvJEP0H56QmNhndm46KiuhAi1OtIhbpqpWLrFUMVnXS92TmN/t6XMf8R2egwR5cUaHGYNJGMvumfX6G+JgzXqy/0D0HZyX70PpDNlGz05PFFvUmSzSm1D6s6WM+1EyNX1b+7mKx1xQ4iiHNIxWXV6oHDJ9vSiaQbWmpWk0C9Ko8IqitU/gO5aWyG+i0e240nvjgnd4yFRityVqPtp9kxysCNJipQylok3qtOOy2VyxuEkVa7ohdWUjy7B5imYLFDCd5fJ0/9qssigXib74bBwESahz2oFh8eGIjjPFjnhWThii7KS8KeNo567WGBIXKqmdojHFzHOl7rSQyCqjstLAyVkuZ95WqlhBuV6MjiGkKJKcLiuVmSzJpI4CiWXxm3pnmMu326HIaDy+d5upcbZtYJzOYFXklbydyaWSGVtFTBfseljFJG+hTlidYmKmq1S9zJTJpdn+0Q0H6+a+vxQ/F4xQhNXQBUXokuT7qFeHGZQ2T0+WqNRhu5v9QuqTAccwgVFsrBC20PpvSkbGSW4G2xyMF9sWFLx5Mz3s3McK18Sc1PiwJAyQAh02UMBY7+BsukNjydCzIqO/ad5nIZ32ZFQzIbbS6d7khvQO9A5UdlA6M5xubb3u8EsAKjD4lA3wJH5Yb1y4cevqSfPTL7LZCMSVK+/iIHPtVqLJ82e7IIwHAfjgwXdggIXr0XhjtYuT+ybzAqgYxmZDoVsGYALoqRxuXgESiJkpIW0R3PWYwCSHYllIODQ+yuRwMu976b+LET8+Bfwr4FQ4VX8KMFQnxz1Ze4xCndFBlZAZ/1ZqZ1oRzqdq82I+Qv/GGDyajC7z/FcKR1rIjoKRyv+34RvnazSQe66/6vZTJ5Mb9/F8KmksCeOIXQfG10cu9LbSR2/OVp+QSBHH1PFrAmJ46GHr0vq+n56zydzVpHKMJuREg11Qb+006fVi5CiNbPGMff0Mr+G7NbFEbNpNeFoY5DqUQDU7Ob9VhyRXZ7r/s0cHbvzhNtmF0gx3OgJWWDejacYcf2BsT85v7dSh9Y5QfpUavzBtn1NbR8PkJfWmoJ9DMQpLZyiattlIZV2jFEnYPeGEiXQaC1QSmMRa4/iT5zMuchtNoq2Sm2vGkGeGlblikaLexA2LM6wpBoVyoepViOfvSO9ZdPonkTfHtW8TDkx1AaSjmKCvKM1YT4LKhjSHBE9l7CAd6UMsQXxnmntgPmClyAfiN/F7V2m5CDJKtYFd5WrVdSfj7eJAz1im88wL1mcNvXWHU3RcfWovyXoo4vl8kHUkESpWxj2BO4GiyDLSHXT3gFBY2pSFRhFgeljl9dID87saJdIWWbZtykQqjRa2acyqXS57nGKJgA9akq8yrKmJpGE98KATNkAZylBuKDdZu52ysdNt3rnTbLRYPa2xS1YQF3i6wmkpIiLpWB5ralMWTz6XRJFkh4WZ7wDvVHrasGHCQm9lIHJnuvuP2bICNRxdAT8LHKhwr5bMwf9rTnjQj/JNUtWqVSy1pE+dWRb4AlWQtVXFcjBwCkRrZphZC4uepGKadYSlOZmvzZecOXOYtEtTTuRWYJsQRFejO1oza00rpnpP1WNNr9RFKY/a4vn+nqYb2OxIqyBNTsRE1gMbtICCA9K1OYebOuoaatsbCEIQgpjpQ1De5W7whrZ8H6uBXzMET7FUT4DaH9GJuYwO9n0gIQoc0FO0TzAQZHu2R1g3WcGBKjxnSs2v63Afzv0fCgH4BGaqVw5AID6tgZoaxTrAWQDt0D6eDgjgH3eHvb9/bA4TmXx8AbwnDG4Nz84hL+aqTlIKwtu6/PF9I7sGyX+J2Cgw4Nf5cCmYiZrUlpKtZFu5WqS0vF3xKR7FNgIBISFq7cjFiIxr8VR5zWzrhcXJyZxgIa9R7jZ7w9yEOLRIp0Ao5noLvB8wKxLQPQyunGrbcMX3XBrumPDxQTi2GLx3TB96ghluoeMB0u2kInQBBgxakv8LFj3L19UGaP1C3D2j68v6WssVoBBcfO1ODLKjCcj3vexhGeew5vYb8BrAvy3M+Kxo+7w25+HzqVNJaNN+N36PO+nYV+9qzD9nc1XVsnDqdNuqA5dY/apKURAu4TMGHe/ozn3bhpY8y26AiElHNuu6hoHdZjizsyGGHHepRTuu04GkB/PDD8B7IGaGIEnOwu8q8AZkSQv/HfflZs5kmPfaXgBb+i+Mg2Abt1J7h91MdJndHtKi1RgsHc1CufWVd07CqzAik9lXreyPxlSwSaCIEVGUxhw8mGCPxXZPJDQtexnRh9Xu9ZSdgMLMj2s27c5rgcRNHCrJjBMPI4wxXoj8dYTesXmDhwNE7qdr9q5tTtRBgroI0UgC92qNOcaF65BwDh4qmAfw7SptHlxTOR6fotxhm9a01p+QLdcQxnINWTByjZpSF1WUCGeRjSFyDcvGNgoDv9CCENU8WMd4Pezn80yated00F6kM8JqLkrF78ufYpvIxpLhNoNG7MNhZpEFMTK4fbsSqWq5Sx/WGQ61pub29NRMG15P2tOgxaITXvUuIJQkWeW7AkHTEtcVw/QkSwUoBtFP5FmONwOkSOC0SHI+9rEkIxjWZIjxgiLE3uxyig2fANQMG6EClelOZlnefXBJuyPQ+taKXT0Z0ynU7rkhLnW4aO8CC2b6mxUHbmiQc7cgHOwaC2i8RogEUWsyesl6ZhIGB9lijkcnnbqOMAJ+DmhBiFroJeZwmmcfYLDcL3Ty8Sd7HoLojlq5a9RSrYGeLtEQASzyWtxMWQmYSOpECHI+4DCGGWKXOuzfJTAMwYEwgAeAIS85NRntc/v+5DZDBVEw2svdfuLmTHu2+VgrMAtSp3mVGS5VSqMqGnbgj1csRxF7vzpxiwPk7VfUUo5zBSGhN3T7AQW6Vux48gGxOm6TNGn+2xQEo0WV8NRWIounFqWojQw6unVfCI3XR+1dava8eK2b6DrD0g8nUq3+QzJQEobElzbXgpExPrtSA9ofR+6U2rWAQVjOzcWVyrGO5VTSaSL2KiSJ9diLEmLG11VHo/cdjNp5g7nHCrC6n8HU6HtLdupVzuG6O9lyJWPLWVUgUY5qqFLyUYUlNYUmqp2mBiE0U48nC/uTcc36mG9pEivwvFXgduureTHYSsczclPkmtMBq6dR3+sm8agDaQvANjgHxmAsmRslI4nLcgSu76xWQeuTJFvKKkVceUujbA7LcWY1hDyC2GX7vSmjlZEIWbEcV9x6OSjmQ9cV7OmFlgqNZevUKrokRElZLsP1DHBazIeGkVirC7LuOnzaOrWKLil3xSyX43oGWC3mU0I4LNd3rKc+SxYpl+N6GlQaII1KuYAj67IKh1gisyiBsnyZePIj42F52BftfY3l7Q+EyOZW22yJLKOUdDp+0lA+KWPZgoksorw8rdaFGUbceLp7v9EVSbbPMaqMLWZMFCLKNxTFoKxLDOT0jfZrh422/wftc1KVscWCiYJH+cZ1BZSWE2MlMylBhqGrMsbhTBQyytdeHofCk2bqA8OQhzx0lKIhmmwdCB1iH1GrtbEZabWLgPBGRkJ+NdKCD7Tbq2cjzw91CprfhqVUddOIhDq2oFRC2pkpGE7oIYt6AX/H7DFx0FsmL9O9LdpiEM62NrKet2pIlsUjpKPTYGg34q79K17QSSGKpreoNNa9gZFcQ5CZd0YxDuPzILtv4Ok4NAOYkcrder3XxVjDz6xuuAW7RlEmme8+vNE7IgjzUWFCaX+h2VKkYIrRMIXFVy8u4/42HARnwUFwEBwcyd9SJl25uRcwqGD8BKHetXe652radZaxGbBURjiDbVMj7nZLx3vBqPLlwuEVpZmVV4RygZOxvx3F9GH23xWNlL7ZzGK12tmB42GsYZ21lhBb9ISjJx3Jg8BtrD7kggIjVJFClx+K3XhrPSyCA9PUnvlrr2G4OxMtmyC8YYsOmBktWS7+0pdpRy0JgZlz8vV6P88ZsYfUXyey+xmktqE9PJNdCSWTceS7uChd02bxkYP+AzIqyx4frfaOTei1GiJKTamsy3AHD5lyIrs+SMf2AIPy91sHq/gVQVYtlCQg3Shm3CvRVEk5T1qBi6Bh1HlWqkybdI1pwxcE4HsZHU4ipsb5lddsIi1oBh0kw1YTJ9T0UYBlSzhT/t6ErSyjs2Bnk0pVUfmoeNjlB5pJuSKJioYN08yVKlINFjtrXCW9O28oMtJOpl1VY5VeTyYg1WOwvykjqTL+lkZLpdOCgIy36q6H/lZK3dZoGTC1V0KViOR/G41eLSz/FEJ+XWayodbpJDfIQwMKUICKHL0MX+41r+N+JqcD3+X4qL9mmmCSjfL32S0dEowttZel2vZCm0f2bn+Vpr8KGz5Y/dim4mppM/xI/ICmwctclLcOeQ9sh5hCylZnwU2e1ym1eIepdFpwN5e9v/WfwfsoX78E6kUoX1F4ZxhGkSrCi+XFSizyvOOS05xQ6gCLNNpMzfuWVUpQYQifNamio7WyH5avK/WavDF1bUeCXP01ury3HNSTCj/iaq3IBoSzY/IK6wWBAJpQOaZCPxCPeIvcT8YbVccKdJN8FLFW18GXgUyZWLbICMV/EruO1NXWtvdKoVPGlztHYmTKRHZBNJZZ+Ao1rMo7l4VzqQkQgP9Zxir7tpHFpbRvruIEXnbU8VwtuZoXbCfScMbJzjR+t1VTMC54gKLSBQvydq2UruWDO5x0VgWzeL7kWFyQ5xlq2emKTcoqt0GLwL4+o7huVEVhizFq8ZCpDSGAEUS+5fRDOb3xG+HYT+QliHZRMiB5AGYHBCxhUpUKqbhNLFmWgSACcZBBBlEb+hRR7P5beuJacJ9kIhc7eh2IgYBdFhTCHjNr94EPRwVaH77POqYYCGJVBQ6tcyvG5hfzWZcdF+ExllcgwAMno9wl8PP+YIsfQFa4HdA8GZQ2w5xbyB6TTqUal82k32ecm37ERvH7k6MgIYk412X3RFqzHRFWv4deHRd+Z72s+o5P+ALhvTHSzln//AviK/V5xZ4Nm/bb9iqK3MEQHkOQZ7KHzbhGjZsc/mg2wmqhWSFqpKfcodajRcHVdlBbQqBg28EqC3Pg/eLqcpecEe6Cy+rc1rp7OHM/UnerQOmYo4EDJYHSJvTFi4GPp3MHMUiCDjqgZO5zSa68Xs7teWR5sZUn8tGC0R48f1yI0cre+woI0tjt6meEUEboiUPgx1n0tZo8zu5DhgY1A2G3UwG/kBCiKJwG2ySoj5pnn0EuwaRZo2ZvGOXYdXVUhZ1uSxQez5YQ3Lu9O5A8OUDenYnS30scE87n4duhmQolcwwHxt/TE2/S6joG9gNaWAbxz+m2dBBzoV98Lwk+4Q+HTI1pUZtZnHnFo0EhbD6+cMdmDKQ5TozGAj4UBhl7TejQo/Xa62+koW36Hlw9q0/wohMSdfzhws9KXhTVNLFcUzBw+DAirzOD5dynMzZpkT2bpvuPNRs909R77KJ3RQmJe7MAghiHSQwsFptJ/ZqrS+cLrgYrOYgupiPZxfMS/j0qgAhJLG9EF9A8LGM43smkd+CQB1llD07ece1UNjJWAIGE9Bq3h0JrCAT7uMmbq5fhIuXuESaLBXiFMlp+Hpt7jFUvKZWyLBHe+VOAsuwFes7P37eBHMhB99Z2wZtbu1qrF6DeigJVYWkvxQyGqFLoZmF1F6lcW4I9uuzCW4y5j5DvYo2vug1IA+ACOEh7MsPuu/qOeTwvlJHMlAr9vPAtaOKDlmEQBqHfxx/1fTUJbnlSeB0nrKHJ5CzdCMdw67Fq356lGEEMNizpCLVKsC347QVbGlRvb9o8DiZvNUuLcnx1jAgI2bcDMH3hoTSaGIKWw1zuBvyHFrv9pgfKhrCDpD7qIRpJliyG2xbSgDH0Y0n7Jl6ZE7rojo37Hr3Cj/USPUuNbqan12ZZuT7s4zKbw9SQNlyrKjWyaFjQVCGtgFs66dWA5baXuBEwNgPcVZYPUp1ji9nlIIZjbGHNaXgjsSrWaDzQqoqntQRGtTooBfM1/aRlAKOvjCFAxi1+r+EmJjxTU8o0wamaaSHDMjVZLMmElhJDbtRAaZRpoLCooChU5Oc5yxGULOgTK7i/LSd1QkpGDENoKGMJ/EnlWbGqkM120MLyCZC5JA2OifJQjcMbKvq7rjYlE/Bv/AKbpfjHHMhK06LQRfYADiWQ0b5VDV5L/8EyATTlNtNEhUbNsi3om/IKfZNSZHFRzNAYjkN/S6Glqwr6Hprf7PlvpqJ37mgybJErleKBKMu8resp23FcmRtmDn5TXGMXSYZWP9IwXjbR/xY9TCHBgKTKHiLOAzCGPw4r4EWhQvC8gPlindRJX04J0u2E2etNXoiom2OByx61icExKtJXd9LxabIcZ8B7rjSWNiqoD0bd0tAvKNMEdqHlOVXS67I3wJDL/1JUfZtq0Q2fL7jj4lYyOfzX5qmAzrAWmiB9ZSxGbJZKt5Fx3TTnDhgXWn7lrYvSObuNNmLZkNVcuJ+iWx/r6dYIcau6MBsYx5MegMRuKt/ZWamUO1LhWn77oPhk1yUZFD00/8qV+cjIyP4ff0AQwkJRRgKrulFef1JOlnBS/6+zc+E4TfXr/dWUdVlb7/7ZSVxIM38pf+qut5Ir70qLF9zCoW7rysLwFJVWXE4XodHoCKs0vqMgLgziaFjaf1gps/XI2QP26kbjJQ+m1IKVPmPh2x6UNhFrXoccAqpZxsl2MyStc/Qhhwg1ysWHOH1u8beYe05wL/TX5rnFRxC7vJU/2AEp8q7VOjTLXXdMNuX62lCo4oT0QfXx6RTXbZHcxmisQaEeZyQ3jK/ioh9kEgk87Qf2tYzogmU/M09C53RGZ+dy9MUdK5kgWWdN4cnwjl5+a5NhqNXgBCKBZ01JyaCoLV3J7Ip793RHbnUoEjae+MWpotrLngsBtbGRvDmYycyKC0nqFggdQdmwjFEy+w9FiT06nuMA3WqLhL3Q/tODaqRdN1Iaa+EKaYpmnSjIIImXtLDPgvV0h2b+Ul48ceNU8a1lnYFBWHk8HWdwfPjcTMoUwUo7otIK7ekRpGe7rsPp8coSJCJrDQR8hA7usK9cMO5ohoWRJCGZ9ZRmmlpbhNOtYau3UXScUsHucBRSvDdZaWPrAG8DGB7G5otjDUVdJ2S5bI64lAbKlqZYz5TLOBTlkLtF2oK7uFooI9EUMlCCFKQgFSti3PgxuQTHUTQ3Pt6PqQAuqPQBTIQcefc9Ta8G/58bmKeMF17u/98kEPVYsaZYZkx+qlvAn2tx25tCvhPds3n/74DTm+UF7Z5LVUWeoS8o2FMo4a+Cple9TIfmVMXBns5vx9Pf5/Onrqqv3hpSAvSDjxRb/a5YhIM9dYqJpSXPS84T7jd3y1lzv4ZtYYZdFS34ZgwIfEvoh7NhE2yC7ersc1LH4T8k2xGemlEYZQUK6z66yn6DxapW6U0Oc5tGra5BQJ4kcEtS1x0QPUfnd9bEEriM7rHrms/9FSZd1+xn0gzJO5nP8sUvw2Rp5FFhZC/y9uDOfUUHUNTWu/I0eZW+NlcPf9BOAJ/05jhLz2ibIfEnYIhaG41VeahAHnp8StubeyoVjULbWCRSxB+NsdEsoyi6mVHo4TJKb1c4UY5TlKNUgaJ+vsmVnr1SfeURat/FXgSGbY0iOHwlDFGcRiM5voB3AySr66OnFNLs49LoboRoBNJ4uOzn8ROddBqK67SLVKTZlLqR5vvP5i+E+by00EsOuKV3UqBVGDIg5nLW3IJUnqzN0/WWd7VOdkkHqdNEzbY0w+y5tt+GAiS5gJrKToRSaXsDBQ+/aXxsTb797Ud1vaEhvmoNRMRNjSYGhB0NofJkmnTlhxw60hIh2boj1QdYr9JZW2rdy4Qz+v9IenC8xP6laIMyj71Qy4w6tSI3WnNiDn2SO86gpqWlXlrW2ttcjv7Pb3lFXq38/vy9LzfZ6ZXYwZ4SSdOe0xdAPSY0gy+Ffzk+eLso8MeyX5fG5e64JpFUD0xOTB433HvzGyiVXafufa9cg3r2s9NtZQqRdeRmG2nwBml3nW51vcqjmwCeOBPOPl4Jwiis3d8oFDRjJJhgH4FS7hrZKU7T1+6d7t7RpugjDkdvt30QYhTGynpQ3o7TKELOby46VZvG2kSkcWq+0BbjcHcbMw280DXksUcnpZnVv6LzXV4rnUCgqgJt3RVJS5bKAvJ895bsksjUMVaqool8US0wDAStmrMgwthzXOAfktS1mU8uddOaCu71sEK0KPNSgaU8k1J6melK01gd+lOy0oOKlgqVI+SoFyNdNc7Jhia5HoRBK3aQygo2XRellwIbIwhr1TSqUfB0XLOmeN/SKWpNMRHCCZcK0DgTY7TjUZ8QSmlkeW5Tf2BQ5zGjbqsibpAgHslYRFAUlYZyzNSXmAw6SdyeV9SaiaJq2EhNaFmJVFK+y6OlHPc89xFB9m2h1J5BHo8KEnl6BpEscXQjI9RCmTU4ivsTqcVJ6fMYYhb4CEbY2nLlB5RJFN6B3wVYJ7cpJif/vIXAX8DjQsVmRuOMJrTUQx0GDGInaSYPPowpfVKuau5CiTSsAv8CfD1wMVwcHQeGvh9nYioE7qhUHJkQVxLIFYkli2XAN5qS0ZLxw0fcnuFArB1r1bZSx89OFtaLGPLF8Ljmc2pPQeAjYTmsyebNvpKU6zE4WsO5PZ5IlcetfoPBr8/1pc6O+10C9XJiHFIGg965enGfJklzozp/Sc8XLLMRbt12VZWq68HtOwwB/X5a70bdnUzgZVzuHdk2PzgtZu/uk3Zsu0CTgrAP2fAyG8uKW27eNOFVdcK2gWzpcgwOZ0ZKlaeyNpGZHspFXnTSMNqx4OwjBfLI/7fjOXQfYvYX9YmytltcahJr6MPnJteB/++XWw9qDkaAHcRcjUEZ3lYt6zDfALauClrYdlhvhVAKPCZGBqQUjiJCmlsVkM/VCYJWIn5YQTd7q/IexnIEoHBTNRFCeePwQc2Eh0zVoFWBdWtDwfGtK0vbU7RgV8wqogj99JnertBFaOkT9RVTUnkPfGOroMLYtlK4gYM/O2I6SRLEJsQkgWWR9qzyztENCXTRb7BPVlyXeERzp2GYCwKCnXE8JwVeEpYzLIFg8LWgw9MIEniYGR4CfjrSMOzXG20G0SlSGHBdbnFhkxS2uNeYS8Vw6sV/Ayd2+f9QXm4Ru11+FTf9J5gS7JRuXdXiTJzcldIEXJUoP67Gg5fFFUKr1fbGUt0VackpM0ArNIOS89bZjeHHfyEsfrsjyZFVvxtKjGjsJTNGmTfWizYzfMnpwcLLBYfqageqrLrRhpNgP48kqvzQ/Ogem3wFASgUM8usK4piNIjM5asWskaPGi5R6KC03D78kDA0y3ux9TYCjsnnreJUEMmuprG9ephNcxxlZNv4vOOZSGZeNSdwhxKCpDymGps9e7DEygx5zd2/OYYk0EBWMSIStBqaXBOVspsaZ1iKghuBDRXNQpbjoewHYeO+COPedR34tZG3bkQ4wdEixSkhUMpYDL7DAg4TMJtZ/DEgQLoOnpZdiuZyydU6CZtxUHbT7F7YQQDrioUDYiPb1FEmhrBgX8RZ9bxq1qf21x1juUf31I4DAaNwXXCwVMnSSHWVWj4GDei8DG/AtQNijSdRf4Q7yZnbPLCk1w9LaEctz8yTVhwmcbPNINK+2E5vuYQ71ZxAwo7k2lKWdyA3j3q9wWPJtn3wGmkoiWFZA0fbpZaSMPx661tGzKw04X4OCFLaY2ByQVUas1r+OQXLQoxubfidvPwXru1B2Nko94LeMDUe82g/F7uSp1JQjDt3WUInEUl6RIBfC+Ol+9fc0gDtS7PFkaR/GjtOFPKSJ6KZ2rW7TboYZEQ7qxCn4Poxc514RUuqtvZWleJ4dQXd3U91TAB0atCSReReNZRIV+HZtYM1HiiqfXurTWCYPnX84OkAYn+/0h9P9eRTCYrtmOBetnS3MTGWUfriQSIJdYPKId9E68EbW+VYQsH/xxo7Xhy/ov5/hekUHWqhRw6aSprX83JLn3fs7MG8v/KYLhwmHSc2VNTOcgGHo9qBjgbbvUnQNFj9/4FKkTZHmwpNKrYwiLswIEA8e2ICEtvJ5zj8yX03unhV7+88DSYE907+SWjZDgLgW55aDjHQLen3sfqRYxQoO1GPFiFmgbmQHcyyXu3gTT4zKas0O0+fNsQa9IXCYRAX8w/w7/td4HFrV84bu80VWP+qm+jrrgcBiDGoiEgOk91AYkInAssDTyun5ghzJ4FX6RqcUIVjOBrG4TA4HA4XRRtDCXnPqumMvW6mCZXnZqiJy2UoGQFLl9ma+V9WdzY0Ljyqj4Cg8pKvlY4H3W0N2dtq+ljIGQwaKiJBXNN6xrhiunvH3wz/v09sF1vGSNo+cJDRYksYzYgXtd3uPX5rgUcTdqiczP36qOJHF1GokxCl4cIJrW6DiYvwUw+lULALrP8+ofErS7FjIqSDr7nXNm8L9v3HNiU0gYD/xrjVzGLs4bArbMmUoliYuXy5ODAan5F/trwoaYTjjXh6GDgpnMqC89VsPptU9EmQ8jKiT1MXe9VK1CvWxyKv8hnPnjNTetvh60G1LLuZqTR9fXGDRUSdclj8V26Xrb+9P56O/guu5WlZnBXzqwSOIf+QGzzQlx1wD43oT4EOZcgvkGnOnkfpRYRF7vQM0snIkr4q5c0e45zF8fkQst3uukjBtdFg3TWjMe6zVqRVZiUuOGzMBwIvLzHOX5ykZplePsluLxOtT+BSazaSxn89027McSpI9rHI7NG6vrjQv4ybmYFGfpYweLbWQ+z8wUMTSNQAwxdfqCpoPzng/5UzP505A+ofNv8pnW17mdI8Vb3GBJpD71mfW5bCSiETMkEAYUoo/KOQte2OE/CWMNg44sLhPnveDjoXSj0Cne0gJyjLSQIHLAFGgAwSkuJgUF2/dAMXvv3TqDx3yaaBqRJBniUqehtIa2vTF9i1Iw14zHHV4JCcY0CZQEh0QET+Uz0Nh4rnKCiFRWATQAARiRKYBWERVIrA1+4M/Ir5FBsaWQxYAzIPMDd+MhRecBbACxJYOkcvEwaeuLwlr/gMzf10A2F/IgsMMczPavZchLkZrv6LNo/trv3jj2FpbV4MuJ/D333lUw1wV4y1fDwxNKNXimrmf3+1vCWpZpjsm3ey2WBQR+p5DuhxFOCCZy9vPTt032+jGLWUUvzpJo5uVFHrYu8D3d/+ccqfcJqAFk4cXyChvPHT3//yqy9aey47LkYcNbFzgV/cddtitSrQaoHKn6eM1mVStrycpqOD4m/WleIjk51y3/agbFPFXOV1TLiXhy4UC9qqupqz2f1/OFzYyHx78J7bOg5ECFi2sjC0Yc1vqT+BemXv9SK2BPtlC47+ggjbM3K5lPlHn1meOMqeVzrNSQZ98bwgX5I/eUnW/nGMTimTpDI/+j1m6HCq1Ie8oVFgMXVtWnUDzQzHhGDuwjn2KKa6T/xM2x0BAgEVAd9+zpf7YghscbHhQAD+HPEXAUlLxqGtxeKIc7cM8V0Rg2Vt56PKfJu6h8nNm29Uv8r8UUSVIaEs4H/6iJxDC/jGNQbQ5jRNTfbRrYb7MTVPxfe5G/4crJUIt8VvhzCILs+4I1iGJXmmeQA8GFvpxCjalspqipyKbMeW7EZtHoDRfRyDt7E6F2BmXoSpGfBHIz6NM/gw9ia0oOYO78PU0Hq5HQaLwA9LqzqBKqWlFNzFZ6K13GmLzlQ8WTeOx8N+Eb74LPwtmNsFwotFWAFeLMFedyOkmdgQPXg32/B2dmNHdK/LXoU/6u/Hxepc5Z18v2/AP0LCIu/F+LEmtaDZ16HJaxHwueaZjs/Sh3pa1i+5T9faf0INr5KDOoyapg2x+JvXIuBAfAaABWANggkLwCBhFThM5X7wsPM+DJhMW1KYil28QRIsxABZsJkEGSJ5kA2rjYcCE1VnR7i0ASosVIMcKLYKVoj0MHKh2hbYYKKnkyOhV2GHx75CHuz2BxyQ6DJGwWEJOOF2FaNh8+lwocBrkA+718MN1Z/HGMjehAIo3oqxsHkIHoisN1kI9YW9dDlcRIPhYkqGSuIcC5eSCeNg4ZS/jYeJc+JrORvNdbVarmjMxNi4ySRewsWlr67dk2okI9dmo9ak88imY62urzTUFioZuyTL0w05uxOLp4Yhy7lKTt7P50pmS2ddH2bxJzHpecOyVW0sX2XYkbFhc6rsQG2YRu86sQCXvQw3tUEyP9mWGfK2UdTgeLXuam+r2bxgwZfFYCQLg+WaEt+FlfMM35Cn+JwTyGabyU5eou1Wc7u3zrhVmkx4yAhDo/JdYq0060TIpaYmzs+0nIsWkZwxd6vWjRfKcFG8Pc4aWSUzWaJWO+JcINY1Mae0wDtkzM2GMhjXDw3OikEFAA==);} diff --git a/themes/tabi-lean/static/inter_subset_es.css b/themes/tabi-lean/static/inter_subset_es.css new file mode 100644 index 0000000..fe802b0 --- /dev/null +++ b/themes/tabi-lean/static/inter_subset_es.css @@ -0,0 +1 @@ +@font-face{font-family:"Inter Subset";src:url(data:application/font-woff2;base64,d09GMgABAAAAAFP0ABIAAAAAhawAAFODAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGlobIBwqP0hWQVKGZz9NVkFSgSAGYD9TVEFUgiIAgmQvghAKtSSrZzCBsj4BNgIkA4MEC4FEAAQgBYoOByAb8X4Vyu0j0Z0AWlvSeueJItg4wL1hBqIo3awJZP9/PS6OsPjKARvJRoYpqIk11sDeu7AgyaIjMnSwfYe9BikDC3Vykd1XsFnqmWpbLNyEcnoimMzPSkhkYT7RUQUTFgTfYJkelAoJmeeMckMwTJb1E6xWqTOzWRx16XW/RWZpqzHx12zI+Wjh4PJezf/3p/8IjX2S6z+Pc/Xn3id50aalRYplxBlnjW+wKsI30nZFjFVzRlYZ0WIFmiHmrEaCiEgZcERARERERCxRY9QY4ppstrYr26+0782YL6Xvl9b3a8+V0rNZ10tMG57fZs/I4zBgVbqoIKSMRBBUsAALMSmVECZGIgYW3yjGFKNYud3mojnd2kXG/7lVfQpadGd7ZkU13hON711474JY4wN6TqPMNFSJ1rRFGRrooiiKoupD8fvF9sHlcgqGIoglWhSMVlMwJRGs5c/Qz1k/pl1rubtXe/l/H1/1c43XSt+eZBM3McQgKiIiIuAwDAMMCIg1iW1dHz4362XElJqh+gkfaZtaYCjTpg7UYg2ppXVmTQ6nPe7R5KhncTlrEDe2o8cQi34x97n7J/nwNp+u4Ilcp45wfOAAIcmaxObsTXXnVElVGMZACeC/2u/zdM/MX0S5SSQJvWRElIqe++eFQSbCICqUW9GMKnJ7/j83+3uHYunYympKe8kWj1s6ELeU+vV62f5mgGBDNEiQIJIRR8QRcRyRMiIgEkBEQ7CEKGYxlpRmutvnQ+f+cjlCGiikiKg8HHPhWqPuifyxN+6FC5WOzY8UUx5NF00jhRjSkBRAYGFe/99Sk+63NC8j+9o6RUqXXjJXqgyYYxbceQdwdmaVmS2SV8VNvipd0aa6tl0JKK02ZjmtVZhjeQdgUABrPACAAHp/r6rV/ifZu28zRSdc/rz4ZTfwaq7Pueo/QfkEkQ4gJe2ClHxDYuUZwPERtGYhclPghdimXG6s7wOyZz6p9c2ntIG+GNqbPqeqLA++MJtfvWrD7tD+ChGMMWCMwuE42zG23GFt7a/4KF5PRLgBIutexrQMlN83vDGW3RAxRd6kNO3/QBAYAcr+O8ISDijrEtBn1cBVfWTULKTWktUmOTkbDXWeGWNLAhZ5wADPDadJ0TZtviWXmwGZRyIRVQdMZcMeGPz4Q3QZMxEAi5iSPT/fsbpoHiqEk+FM4wK7NwH0nxK7HOA0TIPNeu4LS6jXsd4F0AnAZ0VbFjPvWStpfGoJgCEgKx5PtBKkugw46xVQRA0vOToH9gpbkjp2YyGedbl3FiSpfYrpTn9L6WqPGTg3187uNluarq0Lc52pv6QTfj1Xd/hXM+pcv6/67eKgt/7a6hAGur85vDNipF4gvxbDYWMjGy/tTF8e8R054xbhD51bGcU/HTHKMJaXPe9Z+Ox1Z0lx5e9cFYEXH+sb/clnVgYf+8xZ5wO1P2isZyd+2+i1Puc9X3joEdNPPfb+05+1fWrHeVeR8JUvn+kyeNcfnNnit8IWE18ZaPpA2upfORyT+5ZwG3mffviZT3u2LduDGwM8Z28t2TubCsO32wego2gudOV7lN/78kwUbH20mPE28KYjtsnW4MdHkLV/nDvDz19QQKC6eu6bSYDeHtlv3LtsbRncdv/81xYgffLj2Q7g/LMPfm4dyDtvgLlXgN9+sz0eyL5kn+CBD/3Ili4HX/1xbqMT8O0BNkE9yX8eH7u9CURwDO+LrPknyx9dg0vezb9/cOVuvSSjM3a/7PkI8GdOXgGg+1vsv9hxFTgj7AXyK0D8mG/8/AtAI/1l+nFYI/XTrW+QjzMA6hoOQoI1zrI8fYNV1jmTNm/bgTLJBZaUFSLOSWaIcG6r+MF6PiNknmFewTRimG8JszLDzoMpZllgp202jQXbwbx6FRYhvP+E7WLGE/svC8d9Gj4C9iY4GX7OE8Vr25hnEbN9ZzpuB5k3mJdJQZBT3t4j2FMr1S8jxBwn8DgAnVbLDO9TxxgGCu3/tdaBBVptWgEAzjixqADxxW1nHz2tX8Kt0E337s4AOPAyBszDt+WuA8rGAuXNijf/+X0J4WoeXQEFqIXyEwA38WX4E1zCugKUQIol2I4on3XX3XqyGCuyZr1cFQCcMcURug2IyAOVOQ4REgTiUmoW/0baYGcdNaMzcOCkkysGswS+r9F9ScwaYJiooGkWFEQhCWLk4ir04kE8izf7tB/7w5ODKMTVALPwRPxFzVAbiCiD6YoOflm8IUtlCE/ivatrq8OTRbRrvSgNJjBNBQtLQNMAw9PBh2dACM8ECs+ClG+DSo3n1XOugRVOeKd7BMRVnHb+r35jOhz1kixFDROmHAEdTGRADAma8Bre6IM+6at+7OeW1N/K1iKGhEoIEYurpGnKFlDARCT4UtZ0Cos0wmtMfqaA5A86qo1AVAwZrNiMViNhSd0vC2wMHLQiudj7o3yyg+EHCsigIuhG5guFgoaBDQcufARIIcQTIBGiKIksKcWUvq37ZFmOnKKSUWUVY8bVNTRNaF2ZDO7zAjr6MGJYfPAQ50FBJDLgJ1a0unKKQgAcHqJ08v0ZyQBQG9SgKyCLyiQHwHtDLXqZ1AGICOpRKdmgByKUZ2A1gg7QhK6AZlS2WkAHaEUvWxHoABOCJV7WHwL8ZqXjAKzdwO5zGCswbtdjMpRwCQw6wiBKMF7ZODjMiC72L1pZ1mYuTlICn8DYGJRRMJMDlhwp+EjICwmBnhkVkBJRlCXiNGXTuMgQkIZQIksTr5BiTbAUZfNRmNwrbJy3uCjOBPB0M7dVGB185OJnHQlpREOO1McowkrB6kGIv2UfHWAUG6u02n9HtESzhkAlQIjJJjVEm5u1jCI5vUbZOBXD9c06x0oOi1dOJmkGCfkW9cZ/aWxlDvJMIpG/UKRlgmTKk7TSRLPvh/WGeusrReqfMICKttEoNQszSrMJ4/4oPMmXLW5Ku7JWGG0lAcyW1LOvQ8lbPrN0O2qxmlQjOc2bsiGrq/q6XbqpB036dsZJ1OAjRBW/LO076/pqHc+aeMQlPad9SetuuYsTnOwbY0Wc811wL9iypDktU3PJX8ddyUyfj3vXLbLK0fGC7Eo5S2Ucv+w87ROV8g5YAVSl3Lt/llok58rXoeZltfG0j7AeWju7oIWvUzIjk1OYxiRmpp84e6FvwJTmzhbtgJ+GH8tx/8nd6nvmWG/1uPtQ6hNCBhh3Kbtd+LwlpzHZ/SktRr9wFASPW3dqMhfomKqYvLZnLkpYVbWd0Ts9YjwbM0ckwDedcVNWMTQjgtPevSKhqKs44awGKDU4qLlx0wG7arUbT9WlRMkveLfqWNx2EhdZ12jx4JH9X540O2PYxVLugqwZr98oNalunWp2zQN8AcZMsEzIKiajLT/trQ1ObdmmRmfoyIqxtpIzo6glKoU3KnPn9bpUyN0WgnBBxkyd7gCmlboiAWfkg6B58t4uus4a1aX2PdimNseJXxatlpfSzpsyZ0d7pBrVCmsZpxU1gtWUKhi/Abcnm2JENW9TLNRHbPpHaGZsIk2Pj3ZyrHnCbm/JNz0v3CjT3OHCyg1uw0eTHCMuc2m11DHPPyYGeUR4prDRgqH6xbhje5SadOXTe1KgwzaKlH29+LI9rELwqd2o4JoELcxsNP6Uy2yj0Sn3G/JDhmDmeq/Y276QPG7dP7gFUW7ZyhjzccZj7jWmvMwZDSxK3XEPJUIXkC3fGQ+WZJG2U0/QF92lvfdToeQOzgdYzw2oGmxEcSSabDy8BZ369ITidyYo2rG01KUShNfMnhvdFfdtn1BciZfNN5dlj6S1EazUGy3s+kJcck2v0yz3YEzg2eAyNRZvqwPSO6TA6cmb5nKKzHmbnXzelattIVXcd7o3Om20Wo/cI51abR1oc/3fvUJyTIKJztuX+86jCTl4sL/mvUl8dLnhzCa3JebDcx4/hWXofkI/wQBszKl1Z+Oj+rkR2Cwu8QOcWuVTw5r4yay+W7G9LB27V5Mf5e0tLfaJTK73D1CgvNN9o1T5GgpY70G6Vox2UV697qLWd3c0eRyty4ofQKQMOPn4ZiT7q5Z7qm7nyRxPjMscJFU3cvkjnaPzdLEzNb6/iTZ+PkB2JEQf/VgssBsayLB+KevhQzk3Nw+1eD970ea7u3/BoBnYmKmZ4LQkga58xLMb3ILmv9hvoHP2uVBuAdhQiRxf6WinvHrdTl0yeox/HqeTx/ciE0wzSN7pCYH7VwUobxB4Y3KHu/UFsuNc7pl88Ri0vWmkDu6qUVO01Myu4cNqZ9eC6Ye6/LA/doiPhiS2pbn1ue3by+BuIvgmorZLwlYOrCzhjB9hyz3rY9fORy95umVWG2/Z9I9efTijH9XcOASBf3DmGwuICddi3PPIoUT4PHJi89zP9cREPQjGddKH3tiqdlbjx5o3WWvgGrA+4lHQ1+lHHls22kV9/aqLEiOPdqhu5ckcjnuPFEelwpJbRM27+6tla3AqO2FSqYi/PiXpjoWihOUB6BIaHV2k9hftBTYbwdWr4203td9I4003q8e06lV+wqWlz0+ldlc1ly3CoWV7Y/aXk7aDdk7DBW4DKGyAXrCVI/Yik11QFFe7hcZpxTJFgZ5Bobk7fKcNburecM5UnZ1resopKbvHVhiteEYYd0SUF1WxL4BH9IuMyN3Cq1yhK9miDA0uiRNmn3iXCmyXbIQY0MSK+fVdAiLLPHBDW/LWKr+nxzq/9K32xsA5LrOrPyIrqzeijuYCpyXmOcRT1+Icdjv1NLnhzODErF+89iGE8igc8fjoBYTvqDMi5ujIrP1mE1LZDHNP4HzcLE2AdfET/7/4/9mElAl71xP3nt17Aaxw5ksNw651w1cWTSSyB9ggp7DRw7gaslaelO6duuDJrD8e9GdpuRFefIlHzSIfBxZM+m/vClvi5pi4zX6BqRtI3stbdqxiqVMMa8hbC2cqfSmN++931sCsAgJzdxK07CI/ogTXaCAhmU40x2aMfdpSvBeGpqSDuroEOREXtgZpaAU2ZnIpfDWWLiVwiyeLhJbGXoH1ZHOTNqE0lXhcwCccKeFx44pjiYclEtJYSSKInFH/UCO26jiQbf2wrZp/mCJs+DfWcAJLS9rqHVPJCToslQeMVcWxWKWx0+mGf6NSG0xhAD2jaLJYYN1rFFpOyoqTJAQsfTV8qR7YmAkDcg0uTEYM1sYWJ5LGJBLC4ZLYuMRSHuEIX0A8XpoKUmY0vSzNtjxgyLS531ZNPbCjSB40We/J0Fj4bkvGHSyI5nDUMT5N4VFSak8DPRbLXernS2pbNytILBnEg+VrDDVd/Y8H43sEXVq6zw/lj1y+oeLkhaXveFOCLgHmaFbf3gz2ChUzieCbuYOlMsqLHjqXe4TIPJJUk9KsT90G4d/rsmKujOBBX+3a1yopkw3cIhey6lqvmkSE4ZLYOG5ZEmE0JZ3YVx4DCDpID2zM5GLnpZR6tjL1AJ1pKhvXm1SqMglZSfBWgcYD9Qzg8PhTvRGw8VXFAYlu0EI/Ah2QwZ72iYXnPswlOTlH+8hrMb5keJlIME0HkDccQP4woPHAVqOzG60umpukjl5Og62i6NmCGG0gtUvx2vA6SxUXliErSbhh/MsUpUdh0wj47ECTSUym1tJgHUea0hXKMJUe4xT5GkGgnOA5W+SM6kelEitDj8S6OtU1pZfUuscgtRqfVZtekUEY46UQjlfw09PUfDspvOmOVmeAhjuALSCeREaNXTSsbhLcd4/78OnnYdGs94X3+ZkkxsRDguxrna+4EwnM9v9HPWx+IMSOQSTf75Zfd39DiiVmeJ8Auw5GaVeExLNT2CoGARXmFTWjbZnGXV2ZHsGt/o+ak9qDSZEjGE3LptNyaPGCEjZhV4BvEGJ0lXZxaXUaM758NDCDV49h8cHyHQw1Rt3hoF9OJfj7umCD3LVCD0d3VadOBrasnKnSM/RHYcvIrQIJiGuihx0qHdcfFhWUxwOUEkXPBZjHjFknGcYSMyGwWbBXAWpzHowBJ/cQGPzR+yPwFgpsTFMGHt1Op2i6sx3g0v61OZxNO+vnrOOsGf+n16F3PHJN5Drg0LUaC7v2qyNWwYiMHSsFi5izTsa0+Gma5p2yX0AJT8ncCiQ5y1rWw9gQpmCpYjksCwJSROuzfhH508fXUJ4NtLSYVufjp+lsT/tbG3jaEn+nY2MeoS3ltffvW3jsWKwtActvMSTlnXJIx7gPI2nfQG3h1Zx3wpMKt2Z6+HmmSvcEUCQ4D0mwQSE8dSUpR3E2KdWUHriztuyYNM+HBRuAQHlN2f1IhdE6fciGQOEUbaNEaDBkvm9QQHY9PkUICUP27/NK8/VG84R7gnxU24I5lqRuq3RFz7UoecGppLjBOGlOT7IbLByujMRXMkU5xx4mAcEGzfLHsMSnnvMfwWGpkGADA7/WAGzMIAEhuxCT2Wud3O0Q3axICysODqiMiCRrK0KYuJKVV7oQtLu2UNKmYfuJhrXebANJmosfSiyR3rsrBVJE6DCmqjHU5dK454Yi8+lESfaJ6EyjS6pxZnSJgp/WnksDQ14xL0S11kf2v0Q6VVYgfngvt0oXVk4PrmWEB1aV0MLCNOGUGhotqLYsHJxZ0bMUBvCX9Sv2LwdpiOqH8dJDIoYnlJMQALePnyMZ5aem9V1gK+Tn2el9qXzpKGeOvR88J8EbYohkhx7Fa3QsNcqP708OlleQGBEaEllO9vfjV6BYx/0z9xFSfbxxvMw9geSsPR48bx98atY+sPT401AwtFl1A93pYoC00YJF2dkn43pdMvpmsEuVy7bl0i2GYUXKuhGTEskUKEXeJn5KVdUUqqYH1UT9q0tDQkuMEC2NOpXlbF9ohHoiPvWQKDyguEgcgr6uu+BN994RFR+wnbJ9PXXd5h0JtKSfK//DXNnU68OQ1nppqCxadRM5MaUpmFJMjo+vo2NX3I0m4Qrn44lChSeNrCPKVN5jwnYN9lBwnLbgiZjof9sX3LoH/vvoLcf79qutL3tvXRZcEIHH68kuLm7KOVtrkWNt639PkH3MsXCrhkXBr0QtoWRRCWhO8nbcLu56z1ib4CFrcXrPWFiG/DCLY0wRxR9g7PzqS3SLozuSz6t/E6W3OhZsrWQF41d9oWZRCRgOr43GOBvyct3HwvmyIyC+CztQy3wIWe+V/pkVtt9744+IDd5LUBEEHK0g6oZx7Qbgllbz43e8YCEMVCsxJOAJxCg/nA9qsf8VEs2C0mghCKxQoj3X/blLlu7yCgQMAN3eDAFn38tClxPHXMDG9Zn3Y7Hr2RmZFz8rsHzH78W4Ge8JrrNT5mRaUr3S/JaiZ5YTZ83aTxJYhvonASfczI2ENurkRv5crkhApgIfACwct7eZf08QEcgLhhriiaDQYANIbq7e9QSaQDJ2nFsAZAW2wL2sxqm8/vgZuyCq2wxU6k/utsckGwwJtLIn/jOhgXH3SHw1xpm6Y2w/LWZM0FGlbO4kSZeSEYoA4NdB+eTtAKo9sAMWgNyUh9jEvojfFj+zxBLPF5tN9+D38cP8I4tr6k8L7abdADrxAAC9ctV0peKP2Wv056LM+J9j4GS0Nz5YRmeaX6hns5d+BBHw+Gzcy267ZXhZ5wN4LS75/XO9zxNW/P8H7MVntgcz8L/3DCI5c5vizwUZH4ov2Rda5NQm/j84yfIr3NILZg7tI39KeXrRoL7LkX8caUnNvmQq9GbarTT+MpeZeuIRDqX+uvKf2U/nvObMN3NHnz179u25f+Uhq4HekefJ/7agj7jvohAtS7pMNHtvySel9ti3Sv2lT5cV1M+WCe9++fV/V7y34tE9b6+8VNXKINqOp26q/9fOtY98e7ex4+Hm61pe2/LJvXf3xj4Rdq5sfX3rp/cJn4S5qdwb2v6/H7nZV7YqnpMNAHoKkJAA/vZ5XQYARn6pGEYKmeAty1YGkddZ+gy+AaQ6JIiGTiz+A1/tbNOo/Pp95n4wNLnbGIpDidIWg8+tFg8/CMbVXeaKtvksNrvUd6LhXXUIX75qcdqZSjprU7EgyLrC+T4HzKqHSYxkw+pe4wNsOY4+lvfR9SBUXEkRhQAEkYrAgkDjTW40bgWFc7WvRzBi6pcSzuxUCTDXkKJWZm2FQ/BCpCOcGcE+mm2vriGW+R0pVnRJqpcZkWu957sVGW27Q0XfpWomdROToz9+hcsSZ9CKoPirg17o2KV5YNd8CB+74bfV2d+4e4GwV7VVazymPQOPzATFgWDzPHumP95PILPII0Jzteh1zsQoyPb3MHu/kF63o2eXt1zBjlicYW6SrFiQMrbx8xA/KUwPZGx9rw/cluwrcfE+z3NCk5BsEgdyDGIxN86kMtOJJZNCUTgC/cUIQeX1BiJbIraKZPMwLkFkQ0CaRC/MFSKkPdViQ5i3ZKhOZiCQYnGKomAsk1CxxLm5IhfLOcHsUu77ttSz3oF9cCMeBHaFfWFm3aiZR08nackqP1T+KQx3XlvC6xoReyK2e8fQdIwP4oOKwsCO2YSFlczhyipKZmsfyhkIQiO49ZJUY1qGXaRdQZ7Pc7D1PW3roKM2Tld08e6rnJeb2TspjhJ1P86OwcmN6KGRFumfn3E0gPpMvK2YLTLw3QIn8WhTr697Rin6I1NtILsHPLoFmrBX2n5ay/pMRuium9/9uk0xerd9iBU/5AyOYyVDc5vK3G4eFpbjeKmQ0VdhwJ6iTCsuBpkl+xgNOtGiryyhHEHoKTrLS7OmDIPG3GlPT+pY+kYlz5wZpoZGrFbH+NO6oSs06vmdM7cKyxA17PCCJu387QtHEnCsQpCBMCx9shmCRfYFBRb2aECKu0s3wpjBTWKolVK5KhQYhte8dqR5rx+P40vV/Bo1DiaFsV8n4NiFEoywg6CGgcMIjTQYqOptOSFjFkn0hgjBaoTblpACOjAsRBhpSWmRIFaIrdqg4xXvOPbETZqPwe0RjJn0LXNNP/95qR8iGOPQvlzb1q7EBFf1B2C3PHX5Hf+pNY3IOcXSiGccxAu802Ihr7WC2ySPCZTFmNAH5+cdF9ecu4T+MelLrao0fmCxCBOH4OzNSVWOLtyE6TpQWp8WSiSUZyXiSELNeNKJmKpCCGAsYWcg8PS/ddkgQesLZg05oAQkIzRRJwfM0sTwc9btf6Mi5xYiR1g7Xq5+DwY9Hx4g401kNtX5Jr4he/2ZzgxCMDC0OHNOubShDt5lvL41ix+qThdQ1asOTE3H2gkkAqq/XbMkk38JPHtxlIHpj0wiY67VKlW1L5ijZ77v4R0fPL/FZ4/Ii834+e6mXQAv+fc3CM2dX5RDuyrpaL0J4ZfJP3AIbsJDwG5wKMyuGbfyqWdVYdFqVfxnebLz8nLlFY1Uhilh1TvIW29ZELVotGLVMhjKg6LQSRbCTscKfRfA0zcGDdyZns3+xLa/Fe3OaMO92hjMDrrNAxMTBWIapWEg3qh6aLdTq1RPTGjEbjY2qtno4Gj1u0HreGmtilWrwG2IPUqZW2uN2ZdTfWKhQ6EI0EH7Ak+8rlXE3Xtfdece5h9oJNq23AwkVe1XPYR2g6El9eFDjFL4Q/fs5bDK3nEpCopadJnS3bNm5JyoD1MLu8wWY3OMmCm794Fc9SC9LHFpJ2Me4ng20OievRwo7x05kigLU0JEGc/a+3KRDLSkkqghQgSuVGsodkuqXuz5uiBAnodueQGI9YOklKT8QiGOYyi1kirUw7WwT2WSpKnN5WbVxfRrFtF+98Xvi08N98Av8EgMTMtd4O/+8R13rYIe8ObDvQU0UfugvBu+YgULP9q/kIqQjhAHSDnVYpDgh/9xqqYfeEh1LGrMaa7hecT1Ac7xAuC0RddduK8xsWPIu5dg470a2nA0wpklDAFdXFWJMiSTZTGifdcTjfuRFPrDIWvBZJ/Rdo2CqLCMxJ0NHGcorVy6NuvaSSTSCG8AnM62xayWfwiDow29JeTmBZXlH4KGbal8DT5VzDX87WWFgr5G0YymykRtRnsX6ZZF8xwWzmWOgPuLV4lIA4U6Ot4OwwucJKhYm9TwQIuzSDaz5MTMvvRahduKIRiz5LCn0ifqUX9p4U6KPgt2LXtKvP45T/dY8YUCq0QCdPCFGad0wd0APmx6NhnZ8jBCZzbwdfv5/f1eq/JDG60aabxTcsxnoOv84mauZU8pqgmpdv7SCfbqQsA9dyKAecXwJFcJeNflU/zsCfghYIsbpVAKrJfwJlp836fK5wy+EGGe0LvQnm1CBsYgCRMguUW+/S2X2Z88cjnPonxn+wWGqQG/FyaI887W1RxzOi3v/YJE2F3nXYK6h3j2cfyfDwpnVdJyD3jtfW/qkXjrBoLheV3/31m3nmbvDOTNE8k12VbwSTAoDGY/9dHsTim+jEIoWrwQwTQyAoCTCBnvuGRI0unla8LVbDaZTKgMHVXQ4AaLUJoliH+STJRFn2TWRO/cnRJj3//msYQd8989P1hN4ErzTgpJWWM+jgNtai4hjRf67sH0ml8yuwH89VWhc+qxjIAqyzi8iFyHA7tEsEm0Bzl6Q0alH0UPejKiCoJgVRPtSmthod/yd00m213F743JbJFy6AFm4BROg5vDZgiSaw/reQuh18t5nRPqze5qY7sQCF8ov6r5fnqnwVlhbL2N5czJJYdgNN6yj74M8nbo7ImY1xpdwgj7a8n8nmJXT0dy881Nae52aeCXRZSinea/rt3HojYbO8/g42ICq3wi92HgD+vNsyCrzn3giS7IsTdeLLRxCnbYy4j2eYQePMfdSqNPyxGVM16h6uGSIMMJeGaMAB0J2x4WIHEnZM8bGMGoCbktRnAFsoVcBnMCynpZ7rzneZ/lGbinqi76wjG28zGMgmJVcLWvRUIb1nguBb4GtUpBqGjQpNEqNYF1plSuU8inDOhzMDxbYVU8xjkoY4p5QX4weGBPA2x+zfpJPgto9j4BVqxE/dNxOVlJypDbq0uZZ/W24+7NF1+8s3LJ0hL88ItHgV9inqmlabd2i30ihJeYrVOa/Q4yHzY91H1b+QKJWos1/fharc2lJuuK9cfJIwXsj8WZDUPudU2wmu7IA8GjB22E4O5CI6y4+SSHp21P+2veJrmuqbrmj/xLBdRYzDM0oo053cwWVM5oRumhbBMPg68GdsMOsv4pI8ge+ckOnPlXl4jMxwt+GzwJW/UR+ucPyf7BCQEIDHOE+Ala/20+L5qfJ9An2KIJbUixu1TCHt5PDH9EdW5pBmvubzB/RHWu9EFfmd8RPVS/97QacCLC3UvoByg5DTGcIXX98bC89i9/IuC9fCoqMCMxL92hpyutZH8R8IV644T2RXaINOEpX90NYGtijEEIQ0/vjuKxWJyleuLJbkOwp85TH4+sokKMUpEpKCHsqrJykgDlIXwS4bz4JAEjVedvqkrAjsU8XMeW0bBASLk8EtMTNkkCsfA8eBc8D46HmzTVpd/vsJ3PdBLj4ek2g6hkLC+pqmHrsHj8mH5HhxBXX9PTLmlwRkT2X6/r84GwyiCseAhV3mhF0zMV9hez9fpk3QgTUIIQcW6Xl211xK1oRJnIrhOElwsOSYCq9Ubnm0fHW2cirzFq22rb0VyEnokr7xe9m0/+qcQlCtKhTrD0RQ9QApPTyDkoCo8BKnShUqeTHokFOzEre3ukFwEU8aJ6GND3VEtcn4XfL7tN7Y3dlpa/pOsIPvucvtbG0G3s5fHhRaK8heUzzTw0g5op1sR9paKrIqsMJI8s1MOLc58IGjYnmw7GyHZkpSbJ9oZxWThUlQa6RQAiqoawdur0eNdNXJlYk0E80lRkEpHeVnmQdi5qjKnzlRiH5MiwES6tK1Ks8Z8O2tTvSI9nC6KCVWr6znLJlJlvQYyJAaMgkBPL0oORJ2XGkHVVBVCqVmfezjO4dUVROkidEQJ4YCzN1WlbecoMbfQRCrVm3MW00pyODOdl1W03mSZV3XFvZ1BGRhmB0xpP9CpoavViNluueePGeKNkyXZgzKE+s76U05XS4JjqpOH8jESin4/JLNVGKuMHAQgGUaEwvbPnpYN6QsVJv9WeFN6cqQpCASnzQxr94fyd0dcoqZAt39bv8aOsXRgywLcrkNJptz8ejpb2isedQSFIP69j7GoivF7hwMY3zEf9W5PFZCKMInroFylYvWrraJV91/CEVG2YnpwEL8bAz+/hZ9sIN16ol4KYFVzwgxveL0FeDbSzpoYwmUukzTVPWITkFxJFRUxYcgsG17Gh8Fu6sM/lFGqccFZti5y9ROFkP2hRsSyZ8NDS35QklwHuc4rMzwTvUz8EsWHCngaI5t6LJK5UOx5OTJsXtZ9Gwb6i6H2vkAIRYsBDusILo1PBWwjJUpCJt3z5Ar3DSAc6h8v/WfpDgO+NeZh3DJ3ceu4VRnkghW1bUW/5BIPofR0G4VqoGrIgWGDGFlpPbBZRbPXps0sOVaCAwgerZ8lD/IFz3pz/wra57gwFBNaupbL549ufAtFAwHUPlZ3TZlXQBqN30Lr0awLgGhTUEqcVGduoh880gdYoXvlT+Yk3+yzxZhcSb+nwSznl6QW4YGhK0qymC0ISQT5OUk7Rp5fzwp6KjHVTEhlaA1hfosFFg4vJzE3hKQzMixJUoRKIJJJmUUvyULSifheNk1ENh3boHmSu65jrIZSWF/wu+DA8Z05kwTuEwjNmCVw+eg8Wt7Lb+EuIBHdgHRkcswh+NPWqZdBma8G7zGB1AkPH9ucmTzYrEwk1FmkSgXQUIhxIsQRsfYzsnUX91oRcjaMZAshsRtocirLvmG9szKbBR4TBEEqCj/9oG8CqZaz59ZO/CBFnoRvqywI6CQuDi4d2Osnf54L9OKR10QWEfjnCZTiDdEaMvnVRf7rxPN9cMWcMffPvvX0sRiJHro4BaSacQ86nkb4EQoCC0D2cL4a6xVeB88Dr4IzkK0DQHF6q13P6cs1aXlts0frLxCrzprHSXFVV9kPuOUnaDf5igEhioR2lvWnrnd0zpkEQUiWE40n0z6r3BYZuj52fukIMUSn2NhJJ8gPoRwudnTKneXq621pWVY3ae5ID/Xy8iKgF4GemUiBHhsfOafrhg119+jr18M5blmuj0UCJMnXOXH0K7nft5+XEKPT67oYy3cLnhipllA+/nVe5mYsBNc6YyQAjn2Vv/7c8WFoPXXCFuc6Awx4QSn6A0PEzfXqzEi5WGU/f080niOXd6vEie2Trh1f8/rIgKv3tHbHawSzZvqbbDU3XSszQzA5brqgeWlN0h2P5k0xl41hBVfUyY9tVw0jHXqDWAa4CiqJBuvAd2VzXJlTlC6pidl1gM1YHdEFpj+rHJTunzhRxjBFjalkbRk3qeVHPMMUKbt1QmW64HvX6OLIS7EFeqKNgDluV3Yy7C6Qxnfm0+zyhZzWZYk1BTemAXn3AizobllTZYrG4pqRKNTHyBFrKTta1B0anTDeCYfgGF0JbckkbQVFFlhG7KdymIDAk0xkUEQTN1ubyjp5Ky1rrWNrCUnWyukVRCEMOccovKhIYhEGMMQVQzSVJDgiIUopMcCpduqiI7riBK6G5wj3JyLKYrSYUPwD6DaJQE97YfaBLuBC4noryu2sS/G2FB8J1Mkfwjvua5fj9daCGdOFA/6tKCHDQyP7xUv0oQdN7On3TRJhPCw+ls+YUxqJCvs2NxJXOMDs18LIgKIyFzX6eWG36XDmHYZAhBp6DL2I+o+47KHOZ3Rc33FNK8bOpGcGJCSM0tPm4n4KCOqT2M4odHWjeuUSMQDJkfzTIervX7bspGjHWYzb4ZLwsRTkDy6ZXZPHxxVyB0ySOxbJ6FwjdOO9oAHefEyqPklvmwYGzCYi2h4GB3yXHIV5V3Av8WXYkqkputxJmTzEaik30BiDFQXJpbcDcpkDsYM4pu1h3+oYUYplKYtw3HwRJc2gW93BuxxIPIcIWNM6MrlW0D6JoFox0EMw92w0woS5YEAdKqb05mu6ptk1F69KMZVVmU2m91dYEvSZ90dSi5Lprrz3CCyJFsWxbIso/g8erCRUhzsdzBatQzMejaHhEBm4/pfVgMXJVxwkwqdlPOqBOS/kiy9o5LNoK89NIRDXDBMzC9bAVtwC2hcbgxQ1K6CIBaVLJ87/obMbE/rpWZtZvxa27u94ICxicF1aME3JcE8WE5ThtxzwYXtoIzihRRU9CWXbtFnhE0XathL6PhYhm0HLNwyyahyg68LnL78xz632+dUEosnQkg/elkcSmVKIA2ZeftakX3p1khTwza5bBruOSUOVakK33JTfwU9tyFzEFoy7JNVGRJbGiYqJXRCJKd+pyEQwJy5ciakg807JphjnuH1zRcXPoSGNGYFBpm0CxCnYzjsK2IIo70QyBtjuPO4G6m8BnwvJJq5IqVJnWmkmlQlWDoqVHSRc7HsR91Z1oiSAoXVSCOO6mlHZDFOYojelnEaBNKg0hSMVcRemiClQooJqZJiNzCbEgtq1vvUJR6FC5sfYqr1tedbcx5B7Br7ffaarqObzAZioXoOotPSMj5Wr5hDZqQ9OWplEe+ikhhb5+QCnO2yJ2+ChY1tVtuzh/cwO91cq8NFkMbZTeajusJ37ndPdKycS3GgJvba/GHrzg3nFQfRRFH0H3XRh9PV6WppwRSpqjcyyzsypOsY3e2qRtvfRAB7j5+ItUy2DnybXc2eWzTpOEF7uPF3KhYFl17/m+uWxRViCUZHc+Vz0nWEZE60f14nJK8+CumsqLD24RCsNzAisFHBM1aAgt+vL2uLcrvhoNs1fK2UT0nuhTvUiuX+c3VIyxBoMxpGip2bG6U6KUbfcQTec0CtU6zSxyXdBsMUyXFA5ixkjlPdF8RNc1zTBEe3cvF4lKEmSR29Tl6oYNY4jhgHbLQz8XSBmpzHR6eUKn7VBAk6uKL6K5CHsXCaX/bDFn4sjU4GKOSkHRGPX0SFu3Vyy67SZEb1srdX9U3NWY8n7tPhWDNcR2pKXrKq7KuxXn4mZzYW645j3axYQ+IvxTGUpr4IyPX5wvNMoDRaI7J7UnyuP+R7HE/O3pa44dScix1EOaRsacG5aPGv56L3lBraWZjKuyJQu5NTG98xh9xCrhF9HotnyXWcg5xUJiMnt7BrzXpq7gp/be8wu1FNUKFq2zTstksoXCLlOoNqDU5Z0Mx+cYls8zwHCgpepgZlR4lKvEYCQa+X4cNARtAZpiMLUKHNJ3OrKcG82QpV1KwoMnenNMml2vHHCNfOE6UncLDLMMJUsR+g60FBrrU8Uqyp3CgB0hSRLEdFlGZrIk4oqjpJj/We92Z7R2ElBiRJbX98v5NMcxdD1t6QrPKrvByqaSlqMgygynHdaI5FzUzTa3GF/qSZnHTFqMcccza8HwsQ49by1SN02eeSdYzAuw4Z4cYLhm7eO9BBwowiRUYC5UiPi8/f1rFKXDor41e7zE6rFfpQY+oXBtcSdwhFJKvOacqsv2W6k74ZH13y6zw0rd3dkbVtTp4bkE6jC5WAWfqkdAkd3iN6kNF0wh53W4QpvUjnjcqR7TL10pg02j+XAPqV0fMpBqk+shAq3K9ZqDtY0thp8I6DXO7g66tVa0MBenLUpCscNdEW2ETSKwadc44UCd10lxh23l6vYY7c7cJh9L7xgwzQuqohnrBJKyZfA0D656oTDObHaorCsZ5zXhwIt3Vgcc+ELw3cCL4GT9C0FQW/xzR1TPe3G3d6FCzJSfmO8wqwglfK11rY7QZ+CjS4HwbcEIpwqkx2jmT5TXd+DJ43UqxGnl5W2PnovPTMgwFTSYhfFIs425/kS888184Eq/8pRIzHYsnrrXOxpO+jm8uKL5WcI2Y0+LwuLLVzIh/5bycLdBqxUmdWR4T9r+mJ4vcP+yvkyMw9biVcWw1WkCxUyf/P5eSnBhqXeX2zix4Y13kCVJstqkw6C7NQqaBg7EET8SE7cf06HtIW9g0z4T9ztDZu9Exl2U1uC/J6zvpDybtjOMuSvasvmuUQLtDOYbWKfzQKEaisq2bjyyyaoSG9B9ib2iU2hFSOSGlYRCgWHeh0LUUqKrkIJdqeo1RFIPqaOSWfe/LBrUZ3nbNgyayhBoL8UfSMsQhCBAWcG1aiiw+HJgYx0dQLA64H72oQGklyVOo/fpE2NqIYyMUn1gpVyred590T7fq1m26d67BeszhtarabzraYtZxDoo7OkszLgCDxWb2OHIIJQkUTydIzlNkGh8PeUaacLcjT/330ODmEpIDFB9tsMUhVQaDRMrJeyUy13BETDwQVPwrSDn5WZG1bXIhVHYBWUsg3JD6gn3sKnfSvXdDmNvr9Fsh/qCzq+ZQETg1caqFA7Lteldbr+OKHfkvtyVibaZj/sF8EGlpQMzBkgGqgNeeZz+5PS+Btb01Cr4rzDXEEaPV5C61lwX3pAelOk6FiBbUdgcqEhinskr2opq2gRYBUIt2cdtBSX3pJDkPuNZXiRWU0WhA4O4k2Lq0bZvGQiEmtlDzUH1jh9bs1HrcgdUm14pj9poDIImVTN0M5dWYCqNR3naCAeWKsEQ9y1jcKlB+sulpAiSy7cBC3kWfLYHwx+elbxMxXs15JGKkImABFOhpOYAE/DP6yUwtz66hr8sSs1nfQ6T7BHoBUgfStfACYDKbz8ZlLL0GwVQ6TUh1yJWCBd/8iHgLMv7pRFqwAwgAa3jacDAzvk+PTQ0FSNcFucK4A5hyLlgdIX9Ya7rpsQguApqtdXB4cNteKFMYJ4DnylGuoElZ9PqK2KL3L1MFkPTPawvJdPAwsArtpfZOp1wpKiFvvqU3WrkV8+EspLJXNzpdZpCnHKcVtvMAiGfnSiwppDKEIAWY8joUKxzLf50S7PVGc53AXfsCOcx/C6v4dU9GDTIQAV0iEDNGnmQ1HJHmvoA2rgEts/yf99cjMkKmZAuX+nFoB3Nw5HfS56VoC5ojEvAZQD0mo/De+eVP+64A3eXrAmfal8Y7+NjNvXTR9zZZStCRTNNkrqGZdaBTdyIpjEMQksYgvJ5Wy/0LAuZuKbVBJMWHZmM5xkGtjHj6em1fDDNXeJJ37V9JGMETR+HCyCsdqFucGL3ZrAAFmW+/2M4e1Uo7SB/DkGwr/91ORgccO3Ufp82Ej1Gh5Mi1Sod2dUqlllP3+bArYCH7/O8bnLW8BohlEMFFqeqzRUkFpGYCxufRywidpOEox3DWuqehz7u952CHA4moXAQwZ5lxIqTCaaYqbzyWMQ+MrPGwgJeidC1XD+QQAMUqCs/lUQIozdXWBXnIcEKkuDlGOBrpMiDbwrL7XPl61ZkNbWhqHsPmyBEqWIThQ6sqnVZw8mIhS2CmMNNi1hYlImq+Ryvt2vhx3g7WMrluCR3I9mko5NMCt7VmIWP0/Y1W9giNei0/GbkIVFGsImIAqV1SWGTcXrUw4/xFn9no1E37WUz6UiDFk5FsuY3QENBEBXWnGJjMow5HUKHEa20o5g9A88P4oFiURZp0rgMotUjKMfxvLTtxEmU7Z3G1WoJ0Drshiq0o1HmWdm37aRoSyj3b9y0KmcCxZWivqHe4qxBDy6JkaH+RAsOGKhR8iXpwsrhOJpjHT+RU9oB4aCNbJEwOIkvZEV82LvRwAQDD1uU6mXmusntIZG9gsHmAVfR6/d2XYyUh9qc3kI16507KtFwQtj3zMpmyo7DVITeCEHGBD2ipSQyJS09apEhCP4FCmoMfs7DkZgxLr8nD/2oE/ioCFvhOEzDZrA1SK6ZzwkF4YjwgGNSyMNOvKstXFnqLHafaHqjIL6fVp5mkBWpqWSWa+NDZ8gl5Fwuk1ZoxV+8phTzWmxiCD6vha8s0jUc1u9TCS252yVVotVJCkIuqBFeTMzkIqmkpKSgNLoqdzECa/PqG0Tti0KuQOi5QmhnCWlVufMQpwBrYnF3K5p4LmY2asR4crEzp3ZMoBOWnlpONIF3qqDRrna8KKKxeduLY2pEN1QJ4ctOhZ1EE8a1CrreorHY+9iyVeym6XgqnylXM7WcUTi8kG41FCF5260LSgrNV7Uw1R9ENTU5WfAtSVm1XxfaqkBTBF4N8P4aqSV88zpdvp6s8kRVTUgrfjjwY+5F01ZIpub8IHBXXoKOPXlAx7/napJw9kiDhw+AXwkcht1TB2nQw+BxWe/CTCYZ73yiNAEvU8gT9coYztwdAg2tpGdIfCziKuXx7IJ8F0zXJb2zDkO9xHEka7GkJ4L9isuZ66M7vV4BT+f1zgSYPOolEMbmZolu205Vu5y5PrrT6Ul4OrN3JuDyqA/mOJzbuzDaaM4v2m50Zu+MwVhw6KBHPVqwby9zSERe7uhKRfGcZGSyRKLTu4SjC8ayWKON/CSzzYwj8opHGY2Gla1QNMrGaTKRVzo660mj+TryzrN97NGD6pkMsCxnstgOnshHOroQhuGN7ksaCv984uJeZ+w5/3RmwmSxHTKRD3t0IZ4nG+Vb6Lrx8kdXZhiayWI8pshHPLrgbhZzJEqN3wNmIQ+zIVeOxGi2aSRQzD+mVKrDXG2zd8LwRpIk3pso0AnaO7aUjSm2vT+y/HOQtaqPZkQ0cAi5MtLB8aKRgBaqqlfwTUwVysPeNHo+ycRA8BCfiBUkXf5KKVuRj1OWbp2uU4/bZlf5oCFeL8vuMcm3Xd4H2YakcC9MEhJEV0C6uUGg6cFagA3i9JrNCQ++hY1OtvyCU2eeJps1T2tNbOO4/ADnlBI/dJoWIRCD63I9DVfWjiORAE7Ay+EEHAAnE/lHS0yck30JbvfnnibUwyci/UaT+lVyigO7xENxaJis4S86xVMDwKdsunB2RiYxcVMq5QWFePtOnTZmdzZUUrovk8VabTSnyyGoYX62x8+cA8H04tUsCLeB7epNQoYee2WgKZn85VvcwVGwYJg8mr/4H7hz4OmZDOm8I8RhxFd1SeGujxlLPRle7rJ8s9lmg0bWQ6IdgvtyA+MAWhG5zEYgEM8cqlwVH7hCuqlRT6F4ed3pZtSuKaZRrWKqVtXytrjDX2womfz2KBPOAjplu0ybF4VlSdFMlNSnPadO7yiRqCJlGLd9ByMI6yIvVRrvJ3t5SvRBP3hKvFuVPkKNXZq4rRbW/ZbfNcQDQ88ONANDEf0YBuEbco0F4qMFJ5NUKpLCzkVXRuJQlaXkBV5SdcM0s6WqVDOlXl4vaeN5QxJPu1ZCUesKGUnGISFQGBsVTyoUK2nUVDrNUcCa21MnNqVURW5UgcgAH1yR0Jet6O5Os597JTHHKMxTJjRLrfnkBnloQQHmQJVGbsf3dDK/yiZnIr7nCGI4WDNNcB+HFu76ni4R/FD91rDccKSn2Mc2v0qwP4TZXapxdG1pobzeV8/f5WfBuwxa0KdOx9OQY5i82TPyeB5cm9fLv2ZPsJK/u+56N3wOH7S7x0XQKJ2Fqira4+CcSjPw1o8akSSLTovPVbki9+o8iXU77oS2XYoTwZ1Aj1NFq6mXtkW8JDXrCg5ri1vCa+df0ZRj0z12UhY6/mo/MoewPzM/LleQNfo7uW8J5Afer12FtomjVXPtZN+kS8iebIJHghlycbbMEYO3M/3HG+rrOwfEMAi/37vyhhctsBHVee7wD6ihoxwc4k7Gx8ADlZ/lbKJvA5pfS9J4KQG8bmvgjVYfzZmdSGDVscsDjdcrKj6YEcIzTDJnge7nUqpc3Phjr9sULaJUUWHMFEWOWbfawiGqCTusDOj2nMXzklYU0mktlQlK2DgahhHFkys/pHTDawazdjIvw0nWpmUIMUA4DQ9r2GQmbS1WeFGpBYRkBISsACSMaDBR1pQ7AzZEQX3IBHIE/rUeyt9QF+Ab6mzm3vlmqWhiSABQazV3nMsFr3j35P9XDmAYKANFQC3j9QheRxS2+XiCeS/4qSQChUGeB6bDa+f8I0HnQfWfgl8/9VL7wl1KoQoxIpoGLGIbFDP8NZVSbTuYPHPUIB54as+dHgb/+TcbgxDSlOtDjSVQxa7KGzJXTDHKG+c22E99/saKL3zbXhm5egJEJZIbHKwdAb9VFWQKO/jpzMgfy4fUbvvmhM/k3hOA5qo/9J0OgVbJ7ppd1mMtuglWbqEbFiaQyGWOGXGVEjdYPM80JJ3qSfEyUzXhFYZB8HKip0EdAWG97ri6QoMBeG+sOD18SlwPHNJ0m558h25dn6y3n6PU7qrguApQRZtE7hKSMwdRSIIGLYCymZti1rc0SvMCmj1dbHXP5QJfB97c35nehtwhBEEC2qLfaEOevU8tgH+/ZH9VU/szwhjqSIeYOIMKeMT2YoYhSbDKgmEmlRHCDiW0W5V2nuFO3fM0VoEtvBrpbLvnOc5OXh4KQiwF7PP1Q/0TxDXh/hiWfY++VDRm0DLxEwnmfR/TdI3MAkZYEmZu0hzqIm7EuPhVEhd7464z3bOqL60u3MIJ/0iYvUfh+7XpSLBCmOYKfq0Y6jMdaNCi9tWXFjC4b2mHx8a0+XxhLkMwnw8/OIWipK7LpapKgMUXIMlRhqQ2+wDXJ006qhi6c11mZuOjgeUEupKURv2Fj0CYC0jDksdVr/6e4dL5iSuBpHBzc6g1s3pF84iDoCFCAk2O1xcCNcaSksEBE83927vQJnYR+aHjpyOGzggQZJi2RFob32sEApHeYb21c7iAODzNRJLAJZTl+e9N3RGL771MLkkh8cJfAyqza8mkb75+MGHS6cC5bXy8YuohVyhXkqGoXPaV8I+60Id861XnF5hsR4C1+G39DxiDL+AnuD1qXguSAPghnKGN1mzqhnY0jzfVw5KZlLZADraggyeWYAY2h3ao991q51Ng6h/n38QFUyAUX6LxEI/2nqgNTi/FBFtnYU052aIES+F9J8wJULWbarsD3He5VVzQ2FdnEjCauxrAsmtvAs9thZpTbA0DvqXdJl/pgpItcIyYLnuMZmI1BXKSQBWY0YZMx53/EvEV3FJ9/DaolfF+eW2x2dMGB0mZpUxAyEMsRKmhHfhLFcq0ZDBUlmJjEowaKzU2sFEMctcDc9WN/NPKltQFvpBZD2Hcz+e3rNw16a8QjS4CtSoQGhWg5ZjaLI3l3PqkicD0nUMTlBQrmbgTW3ANXS2xgqDphom5aeiKXFYIzRBjN+QgZSFZJ7EqYZBLRyDDagHKnL5B6o+pmEGQB6a7gyUJlzALyn2Zblb/eIpkTwnozchAoayM5XM4sqpr6FqhqIRki2/xeIrrKyBlHeVc8ewBjkVQb53XDG6n/6TMAR0am2yiQqtu6nDKRmmDuZAULo4KaRrjuQhvBnr6XkIUo9m/O1dJSRs9qjKsECyVZL8rxdCgaSnHDVya5wte+Hhhi23EcLV5tWE8fi9zyTZLIULnRIVlkgSDID40rIK31cMPLzMtD7spjehXKYPZVja6XLG4o1NzScicMAvD0SvRVT32R+fMauxHRiY6z/IyHkBVXUj7TcYwAC20tHEljbriDgni+jsMU9+3tLRczOWdGX9vgjy+uXvWq/22AgwdSL7s8RnGbCdt+7k6tMGM0NKa7al01omRqhz9bC0bGibpcvbGuIpR51V1zPironkPIKcxlR8drVbLuVSoQWExMeuqHLNBMUaza0ohMixx5NOfEBxHUSFJInnNKO88IiVLeH7/e/TccIOm9tcPqyn7XMfAbHReL6SdLVe+Vr/l6jvrpvrQyR/tM+3rGIri4obNaiNUKg1hksa9BCLCIC7j4ggll910mr/AmWy1/hGghFLw0g+s71oXquh4hhxkMBDjcRDv6660DdijFkFK5AuZQW2wegX2/nVrf7C2LKw+jbC0PX8yDjHS3jnT2GVr8Tr97drVvb0zCYhv1XZGCoO3ZzdpHeQVCuWObbRpbHEwcpczWU2gPh1+Q0M/69kfzHLWWK2h6Eq6tvahGc/h2s9KLF56iIns7XIcs+lnMPU9ZdTUHA47ZKLwG47j823ZzbFJH7xzR/uqZi0HDgL27dvotpnx8Rg/TFEVIDoXWnEJRGL5NsPIfWs82waZjJUk1iEZV+6G3GauhcBSZYJ1VVN26OdwTSR6MChbo/NtqiyGxOjOhfuqZy7rIAFBZSHZn8bx8bqlpJKwmaxTqdl5TXdbc6bnucxFmaYwbMhRBQI+dMWH7JtXOVzVsHUkCCjtWko1TTUWZnRZ3Z5oFV23VHByroTLzcxWYv+3Nr0WGDGWgQbv6zjsOYMlQq/7igLJExvkrHJZD7rSMbce1zvG5ZGFI4ZcDBaUIAWTIJXKR3rrmavXncNRNDOUVykALtjt55gg6Wrz3iWG2Q/Yb2/iBOFL717+PyhQuSZOpThDVBX7FXzVilc+9rD2eq/n5i/g4q635Nxy3h3JzHfZq/iVSgmfCQ6odZMdqluTCzby9UYIfZDLnf2+8uVjAeOBIfBZoRlx5AIu2Egb9CqtuW58BfeLcZguWpMcGoSQfSsa+hwBxueVOOAVsAd2gEPqzPvz3VpwmeRYMLwkMcomkrbdTIX966RJqdAaLMYOlZo9o4DaE/BLHPjvQuhfEndu4VVBS+tm7FBf9pSRtE5rwAR25VTLg4HC92GADG/jrOuYjcHDewtxoCiN2XiVvMp/XVw9fEknXtzSX8VaB3rbjeJGBsa21g/ysywUQAd3htT17DOpaOZbgZSAQDgS5sNlRpE005JI924s9qAsyEqUIGwZhZLy0IRQfP67kS9etZ9MdMIwpNcojsGjwtgWt9VKzqUiN0Siuu7BZeK0otr0eoRIGJKwtPvuTHmX+oG8zdgwooyGeIome/4cuBojVxffGqBGHNJb7eCoMDYvZ7PmSqqSRK1Fuj5wWq+6XXO4NQlbHYHdaWWb7Ubkx9eMkK6xFalY3N+KAi0fv/ClfD5xa4dmILBhtloHk8pTph5EqKsQZBL5cY8ePm3tCRKt/OGxDGsrdNERSg1y4aX9HyI9uJHQnxYsUOKxh9W074paYC3U8RvGkuxRXKdT1zUeM3Y2CW3FZqEz77fMhAbIVjf4dG+9VDsSygFqYdxGeri/t7nkivyxtvV7saZFb5FK28zj93b2JBRN4LJjPZOhwz1l1OIjoWcb5eK0lYFADdb2ups23Kmx6MOLM4eC5Z0zPdALe5v5sMMwRZRFTuKtac/wQSFCVrp3cfzoCsUgEXjqtB0HH70wrnli3pFJrMAu3121Kg7unJWYH7PfGVQlx/FUg06loCs06Og2l7C0eQM691a2dBOBotWwbtskK1orSdj1nEu2Q0OjQYhakQ3siXoRhBiZtWAiTEhgO8CzIVhiWz651qO5lZGScRnptqHEkljjAClVzFRVa9S2UESm3HYWBod60LAf4IYGD9lQrzkuQn47srHGSi47Di6sRRbBCNWaAZtRINlfNRfYQI2llyvmpajV3I6pGAdoLX1PhkJIKcNCxpIhv5UnAaPuSx40qR9NRSBjJMtqUz1pGIzORt0o6ISVta8Kw1rQLK1ouRIVVpAyhV046Xnu9BCn9lEatlDAYoNm5hmgIXXJ7IwWUpGeCSNRf7yoOin8GINawSeYWNV74s/lsRPIAXwhcPvukJ0J/Vsn8FTwonqExnffGq1TuaM7OgzCviQHwccs5YLs6GyTRO0m8M3g14A3wP+ScyCYWsWNKgh6rlp1RYHfjJFQENZIcsTtM+T0eHZsWyrd4ef1k0fVR+0r/Hxhp4R2H49OqX6kdBwD9whLh+MsbA2ksPwMBQsHcEOGxYdlErQHmuA9xwbj/Gx/n0C9EcOjcv9j93KteEQl65ZNY8vZVM78ABbWrUZeIepa8OCeBochnNb7UA4vInAxQweG9+XbLsjZe3jx6GYSDHGIu5EMzQ/QrHwpzJcNuEydsH0ws1m6zja6KoRMqMjRmayOxTLpdQLLxlZ4xZ4iqR/JPZVDTyKzXVpyltWL8lqLkGEvXFpsc/V7yr2n2VWCAW3shJoDR9BVzTT3ij2Q0vms9SwrSs/FcAKcF0t3SuJmDBfjlxoQ5uqCcCKmwCYSO89VL2BWHcB460Yvhnmm9DS7jPYcs4TMBkpXczAb+KXzkp2boMNWw05DEk87d7hJCjOPUd7dBDQh1QuQi7MKmt0ZsmxvlxL+i1u24xSoRalBI9OknUV1uzs/oMjzXo8ePek41KXWtXvHFXyfEnsc106AfwhLTwoQDF+CBFIWIGHi5AgII3LX1LjQxhW6uQlSILiuUcaxRK6xHKO0S8Xwold8Lzyva+TD0nq70Gb9S9z5WX9QshKa/cV2a7TiUAhcYZKRbDcocqC8sEGo1eqBcLC3WVizSxxQC03C1gzbl7ZmG74Ye9nyECe6vsaQeKIJl8woob5xqhAwQ+WCLhW8vXp6SavS6NkUOrAS7I+RQlEy87YVi/4AXuzIpuf7N1UVNqki5ComNqcnZ8sUGuyWdg5lcu190QvtDxFwSjbSDfYlmR4qGjsmZ9m8iqVOtI1NOJRMw8wdIUUHFguidFQxFb10pszJKF4pPLgVDWlnQcpgj4TfbupKVVbLdqoCNFWVNH0LqbqJTdvFuo/IIthEvnijATyqRrrlMppjaFFSSSGqSCw5hLYOGUikLa3MbSSAuzYB61kLKeBopU6DVuSX7bR6I8v3UV01iU8tbBkNrEHxTDTOk6y5bjNrlckW19jo0710xYaorHmUcyqVUYxSYTUXt5GGsSSNgF+zfGJNp+GgR7rRwGldsKbah62xZtXzVF3cjoI4anUYTDnOdzKIY/i5mT2maxPXGhbpQ8TdEy6XvzTecADeuEBLMjYUuMZqsZAkDO95xW9fjeNkh7zfAEGSFUjoVVryvp57QeZoN5Mb298vLX0402kiWOVe9iUtNzQv31L/KIZjlQnIy+4PyUAFpnHfTOE9wvLVwUxYG2HciXR+m97BJKzHC3mhK6iV+m1rPBofIEj6NVBPwZ12s817TY1RR+dRhWyltUqam1O5eYBOxkxFQvZ1XZGJiy8XZuZYoE7t+ysrBLqpoGW+2keY7Km2s6M9U6M5iiMY4CKHepMsUZqQcrPNYzIaBka3+6r1PpyalFNNjefmOj9b3n9N+f+KYw16KMlMFBlqMj/Q1z7omuIvzM2G7rP5Y5Rlvbdaf3kSODylY2hosiPrBC0DS/6fKxdYY7qF16Q6JwxiJQIEWTezdwQk50cxxzELp75hyx/zfu9FsCiEmf8w37TNA0Dr+6YBRnpzW3x0zjhMgdLr9GjlZxS4YXsxxjr1k+v8YEb9Qj9lSqFcRZ6UPwYi4uSCSx8OwaxqH4qweagn4P5HXS+fORcAIF0HJR6JIaxaxMd1PLBj8Kq86fs5+bg+puN6XBGuwe0fFz2u8kMJ3Aff5fpJ3+1vX/ZWFxJbtyaSF8ATQpMqffCjPrV7noXGbS1lcm3rKcAlo6fQwbBNKbFoq8KBdd3tPi7ZBtoolQy/lOZY/zf2lf6jLhn9kct6SIUnrCBVTel7VW8FBRqEa2EOzsChcNYrzgwuBY0ddZ2x7qRbUGlmWsVzhLRd3Ptvj9GUu5A2bgWr8o/rJ4FfWfKrwYrf26Ei58CcvhVyHIMJ7qTIrNo4HCymx4/+zRLfnD4iNO1i6cjIPN5TB4XjPVHWvd3Ruf1FFi3Q2IuctDsOSl3oIWTqFERp2LBCs7fSw0TnBqcpZAyD8+9XNB6lWJwoD0n6sZk3alezePvfhpRVXq93fq7WQKwiLgl69ZmCb725HbOQLxenbemWeMl0w7gZzLbK6WnkpvRUBszXrHwmKemTIBUnCVeV1X62OdIt1GYSJ7m0c7p2QW/ZJheQ43TT1MWkeb3cIBLCbtqde70wbB7qHEpnQjXgh4SmfFDIbRJZxjy3HeDIoDXiGJvQnwVdSqL/trHIWKvD5HYMSsw3ZqgrvKbPUrExKvv22vtX+jDLTeUkcgaLivfV8uZsP61LJBXcLHNp+lkIjNeP4VeaSaI21088az+OlD6C33Wgx2MbHY33oR9PiMR0QtNWu+p33aBDZQQpvW7wGcTOIQR6O89OnHFvcWB2MU1aS00ofHF9lrz0SjhIhvUALpv0hJK7e6zFGltOnSqvWyXx4PXWKFvhRPWjKjxPPWi0lUnfYV/35zXyr3FT753cNc/iaD0zZXa3rae2i545QYJNWM6GqZ/DeceIgyU3g58paKRj27JXB8FXVBik7hYch/BSARi5OK/47fYw2l4+QiHtcMzb0qaoJ/cKEpNOXNEirHg7vpRexT0nSVEf5C/t3adwvmRPBgNibM2didbHmo00Q1XvohQYayBfWAeKuJswUvGBfJkxkJM/MeBdl07hpKwHb24xcNTBmJhgTvGUNuplipX6idYrRSZ1XyU87kelNUOWk/pp3GAaJPvdpxiakloOcXww6lm+76BNHNClAz1eVgiMju/NRsvv1PTLst7WQZ9Mp3Ip/+jY7qJ1cnK8UsxKLFbGJ3uFElezPR2P5AVelVegqSPHtntOtmh8z1zwaTjBCntsXh6EiDK/SIE4nJKWeL+KGFqELEBclZNJHa2jst3yv3ebExsXsek22KYTV93ZnJmPY6n7jXlW8EsL/EPLUgoh8M+bMjvuJpn3AgE6SJgCJvDLZcVI8y/AvulpK+/D3i8BviVM4gEAF23BFsCXavERn4FZQBggBApbC/6s/i4HwAX+/qfUJE7Eawe1KTw0EhL8GrAfp3Aj4Ee/8AK1mnKwLVKgGYOA6GQprlg5B88Z19AjAkiggAADZAnz8Bfx/hrkAB+nQGUR4xNUQuLAMUguIm3AryiCGT+Vh+0Is7C9Hw3YpJMkcqjMtN8h1rA7LvZlfptHjtyEXOP1P6jV/2usHt914qtez5eWXe0D8VrwIsmnVXFLNVAORmiVrVuojP/DF0E21jQjSPaicc80ncrKWp4tmoz8VCBIC/iENQXMsfacdY+OJuJnvaaBpMM0DM6lwa0K60BXffthZyCBnPnm6qujFeL30FHB1WUQ5gZg2bIpmJ4UOlXjdwBTbyTuBTmeis54Kn5+a3HE61PSiKqDwk4Ft6+1f95HR4LenFVEQ3TKCKIq7XHhzAOkkYpV2w7BAjM3tb8/m7xG20QJ2j1QvuI8bL+NzYAbPdqryf8YLWetZbc8dSg3oWp4Vo13FtscKwyWivqCtjCZ8an/g1x+J02b26yuhx/NMmdEf4z5dHiUDvh0+j/4p9IHvOuetyGSLGaBeWAqEtH5PsuXv6kEMrFsnif2YJxeQ71vw+8l1IvljZTq90hJjikGnGQgsfCkWNUME6Q4WNdtBkxLZKfuf1AgjpkIO5HJPDhqJ8EKLbPfOz/OMmfEXpgikA3S35GeP8kDcPNn42eZ7jyVKMFZl2/SJ3zId035Ufb7AItB+7wYZ+ZuUXbtle1+WcHCAmrwQhivHrsCp8QfT/rUHI2tyqNtKRYuHAQTQ/pNYy9atiZxMLTrWmhOfWuS+pKZ8KX8VD2jUpGC/jSh9UBhZn2QFwO+YdynmIvOmr7tNKaTL1DsvcLIWqdwFZ2Byf7+uU66O3p8lh3Z7HlHQQ9epyxo0Xnkt0AothTJldmaLNL95RxnJEFtPjnQYPo/FhCRJCjye+ZZ51zGdF6inftzz+uHV8L5TAd2BEFHt9Jdw4yMydfIZTwCsqScZT4BNSHBjnaHvrl8RCe+/Pb9xI8P9EiQReBh4DOgpzMpvFoPXj9VoiwowubGnv917zJP7h6oXjUoNy8+yxJ/ArVuvE2/kX3NmKxYigEANn4N08n9As5nGOQtxx+iUERUsdh8MrIdP1RmdKux2ibPgNH3CB+VlzmeC70kBWS1PaQMbC0JafvGmXhNTiFnaTX/k/jZeJlyw1n19gTGdDzL3YC2Tka9u2Jz4aJU4mh24hR6pYRrBFt78UO07+Kx92H00lN0E+ytT2hu+8eio78yXxobx3E0V6VMpflnHbkWz+Pn6JTto0ii6cBrWUEGIgQKkgwJldcgtuO0vIGb1Ex8TLnhVdLcFnmNbtl1qHxerde2uddzBA6WmEHCseurOZJvYc48jCuYAYijIGO8GbCZot5su2hMfhYGweSLNFMCS8dHN6NCtINwCNTwcDLswvNcChLA9PwBAZK2d98ZgBAc7EwYAfYlAu2uJxJ5nyIKC/zY0HPBxwZRgAhpYiApSGQiISBpKkkDkXqQDKBoc6tGpw4kC2jakeSAQItJLSDpeFIHEO0h9YCiC4wG0KckDyz6lzQChXJJE2BpGWkGKkmkBRhsJa1A4gEkAiZPJxOAwrvIRID4fTIJQP6ZTAYCnyNTgMReMhWQ/KMxDbQUpqNlMAOtg5moosyaLxjakENePe+YED5YwRGhSVCoVmlmTZuhs3Cyn3RZ5B6g5HaS6VdDC6P/3KWY660ppBu3SG+5rUJTKVxeyfR8p2hiPTM/ow5IBnUZrmvPSWVevkE7V0/gW7JYeYFbMUtZ7m/hZmUfyVCvxVXTdahpqUMZFHZ39VHDnTVlYsGyKJdGz32w7CxZ0oqqmUhxEjMnbo+S4tFdJMn2IPW0YCnEOcGFAq+YEYlNmUe7K9TF9assen1FldDwIioU+h54SPuKy1nhraxUJOhVWi2snokUhIVef7+J3DdcKNvt4BbSirzIF/Dv7mRHbn1fdhYWeK7M5SmkSVG2F+VRYQ8ZAAAA);} diff --git a/themes/tabi-lean/static/isso.css b/themes/tabi-lean/static/isso.css new file mode 100644 index 0000000..c5a7329 --- /dev/null +++ b/themes/tabi-lean/static/isso.css @@ -0,0 +1,375 @@ +/* ========================================================================== */ +/* Generic styling */ +/* ========================================================================== */ +#isso-thread * { + /* Reset */ + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* ========================================================================== */ +/* Thread heading area */ +/* ========================================================================== */ +#isso-thread { + margin: 0 auto; + padding: 0; + width: 100%; + color: var(--text-color); + font-size: 0.9em; + font-family: var(--sans-serif-font); +} + +h4.isso-thread-heading { + padding-bottom: 0.2em; + color: var(--text-color); + font-size: 1.2rem; +} + +.isso-feedlink { + float: inline-end; + padding-inline-start: 1em; +} + +.isso-feedlink a { + vertical-align: bottom; + font-size: 0.8em; +} + +/* ========================================================================== */ +/* Comments */ +/* ========================================================================== */ + +.isso-comment { + margin: 0 auto; + max-width: 68em; +} + +.isso-preview .isso-comment { + margin: 0; + padding-top: 0; +} + +.isso-comment:not(:first-of-type), +.isso-follow-up .isso-comment { + margin-block-end: 0.5em; + border-top: 1px solid var(--divider-color); +} + +.isso-avatar { + display: block; + float: inline-start; + margin: 0.95em 0.95em 0; +} + +.isso-avatar svg { + border: 1px solid var(--divider-color); + border-radius: 3px; + width: 100%; + max-width: 48px; + height: 100%; + max-height: 48px; +} + +.isso-text-wrapper { + display: block; + padding: 0.3em; +} + +.isso-follow-up { + padding-inline-start: calc(7% + 20px); +} + +.isso-comment-footer { + font-size: 0.95em; +} + +.isso-comment-header { + font-size: 0.85em; +} + +.isso-comment-header a { + text-decoration: none; +} + +/* Only for comment header, spacer between up-/downvote should have no padding */ +.isso-comment-header .isso-spacer { + padding-inline: 6px; +} + +.isso-spacer, +.isso-permalink, +.isso-note, +.isso-parent { + color: var(--meta-color); + font-weight: normal; + text-shadow: none; +} + +.isso-permalink:hover, +.isso-note:hover, +.isso-parent:hover { + color: var(--hover-color); +} + +.isso-note { + float: inline-end; +} + +.isso-author { + color: var(--text-color); + font-weight: 500; +} + +.isso-page-author-suffix { + color: var(--text-color-high-contrast); + font-weight: bold; +} + +/* Style author comments and replies */ +.isso-is-page-author>.isso-text-wrapper { + background-color: var(--bg-1); +} + +.isso-textarea, +.isso-preview { + background-color: var(--bg-2); + padding: 10px; + width: 100%; + color: var(--text-color); + font-size: 0.8em; + font-family: var(--sans-serif-font); +} + +.isso-text p { + margin-top: -0.4em; +} + +.isso-text p:last-child { + margin-block-end: 0.2em; +} + +.isso-text h1, +.isso-text h2, +.isso-text h3, +.isso-text h4, +.isso-text h5, +.isso-text h6 { + font-weight: bold; + font-size: 130%; +} + +.isso-comment-footer { + clear: left; + color: var(--meta-color); + font-size: 0.80em; +} + +.isso-feedlink, +.isso-comment-footer a { + margin: 0.4em; + padding: 0.1em; + font-weight: bold; + text-decoration: none; +} + +.isso-comment-footer .isso-votes { + color: var(--meta-color); +} + +.isso-upvote svg, +.isso-downvote svg { + position: relative; + top: .2em; +} + +.isso-upvote:hover svg, +.isso-downvote:hover svg { + fill: var(--hover-color); +} + +/* Reply postbox under existing comment */ +.isso-comment .isso-postbox { + margin-top: 0.8em; +} + +.isso-comment.isso-no-votes>*>.isso-comment-footer .isso-votes { + display: none; +} + +/* ========================================================================== */ +/* Postbox */ +/* ========================================================================== */ +.isso-postbox { + clear: right; + margin: 0 auto 2em; +} + +.isso-form-wrapper { + display: flex; + flex-direction: column; +} + +.isso-textarea, +.isso-preview { + margin-top: 0.2em; + border: 1px solid var(--divider-color); + border-radius: 5px; + width: 100%; +} + +.isso-textarea { + outline: 0; + width: 100%; + resize: none; +} + +.isso-form-wrapper input[type=checkbox] { + position: relative; + bottom: 1px; + vertical-align: middle; + margin-inline-end: 0; +} + +.isso-notification-section { + display: none; + padding-top: .3em; + padding-bottom: 10px; + font-size: 0.90em; +} + +.isso-auth-section { + display: flex; + flex-direction: row; +} + +.isso-input-wrapper, +.isso-post-action { + display: flex; + flex-direction: column; + justify-content: flex-end; + align-items: center; + margin: 0 auto; + max-width: 35%; + font-size: 0.8em; + font-family: var(--sans-serif-font); + text-align: center; +} + +.isso-input-wrapper { + margin-inline-end: 0.5em; +} + +.isso-input-wrapper input, +.isso-post-action input { + margin-top: auto; +} + +.isso-input-wrapper label { + display: inline-block; + margin-top: auto; + height: auto; + line-height: 1.4em; +} + +.isso-input-wrapper input { + border: 1px solid var(--divider-color); + border-radius: 5px; + background-color: var(--bg-2); + padding: 0.3em; + width: 100%; + color: var(--text-color); + line-height: 1.2em; + font-family: var(--sans-serif-font); +} + +.isso-post-action input { + cursor: pointer; + margin: 0.1em; + border: none; + border-radius: 5px; + background-color: var(--primary-color); + padding-inline: 1em; + padding-block: 0.6em; + color: var(--background-color); + font-size: 0.8rem; +} + +.isso-post-action { + display: block; + align-self: flex-end; + margin: 0 auto; +} + +.isso-post-action>input:hover { + opacity: 0.8; +} + +/* ========================================================================== */ +/* Postbox (preview mode) */ +/* ========================================================================== */ +.isso-preview, +.isso-post-action input[name="edit"], +.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name="preview"], +.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-textarea { + display: none; +} + +.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-preview { + display: block; +} + +.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name="edit"] { + display: inline; +} + +.isso-preview { + background: repeating-linear-gradient(-45deg, + var(--bg-0), + var(--bg-0) 10px, + var(--bg-2) 10px, + var(--bg-2) 20px); + background-color: var(--bg-0); +} + +/* ========================================================================== */ +/* Animations */ +/* ========================================================================== */ + +/* "target" means the comment that's being linked to, for example: + * https://example.com/blog/example/#isso-15 + */ +.isso-target { + animation: isso-target-fade 5s ease-out; +} + +@keyframes isso-target-fade { + 0% { + background-color: var(--divider-color) + } +} + +/* ========================================================================== */ +/* Media queries */ +/* ========================================================================== */ +@media screen and (max-width:600px) { + .isso-auth-section { + flex-direction: column; + text-align: center; + } + + .isso-input-wrapper { + display: block; + margin: 0 0 .4em; + max-width: 100%; + } + + .isso-input-wrapper input { + width: 100%; + } + + .isso-post-action { + margin: 0.4em auto; + width: 60%; + } +} diff --git a/themes/tabi-lean/static/isso.min.css b/themes/tabi-lean/static/isso.min.css new file mode 100644 index 0000000..2d7b16c --- /dev/null +++ b/themes/tabi-lean/static/isso.min.css @@ -0,0 +1 @@ +.isso-avatar svg,.isso-preview,.isso-textarea{border:1px solid var(--divider-color);width:100%}#isso-thread *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#isso-thread{margin:0 auto;padding:0;width:100%;color:var(--text-color);font-size:.9em;font-family:var(--sans-serif-font)}h4.isso-thread-heading{padding-bottom:.2em;color:var(--text-color);font-size:1.2rem}.isso-feedlink,.isso-note{float:right}.isso-feedlink a{vertical-align:bottom;font-size:.8em}.isso-comment{margin:0 auto;max-width:68em}.isso-preview .isso-comment{margin:0;padding-top:0}.isso-comment:not(:first-of-type),.isso-follow-up .isso-comment{margin-bottom:.5em;border-top:1px solid var(--divider-color)}.isso-avatar{display:block;float:left;margin:.95em .95em 0}.isso-avatar svg{border-radius:3px;max-width:48px;height:100%;max-height:48px}.isso-text-wrapper{display:block;padding:.3em}.isso-follow-up{padding-inline-start:calc(7% + 20px)}.isso-comment-header{font-size:.85em}.isso-comment-header a{text-decoration:none}.isso-comment-header .isso-spacer{padding:0 6px}.isso-note,.isso-parent,.isso-permalink,.isso-spacer{color:var(--meta-color);font-weight:400;text-shadow:none}.isso-note:hover,.isso-parent:hover,.isso-permalink:hover{color:var(--hover-color)}.isso-author{color:var(--text-color);font-weight:500}.isso-page-author-suffix{color:var(--text-color-high-contrast);font-weight:700}.isso-input-wrapper input,.isso-preview,.isso-textarea{background-color:var(--bg-2);color:var(--text-color);font-family:var(--sans-serif-font)}.isso-is-page-author>.isso-text-wrapper{background-color:var(--bg-1)}.isso-preview,.isso-textarea{padding:10px;font-size:.8em}.isso-comment-footer,.isso-comment-footer .isso-votes{color:var(--meta-color)}.isso-text p{margin-top:-.4em}.isso-text p:last-child{margin-bottom:.2em}.isso-text h1,.isso-text h2,.isso-text h3,.isso-text h4,.isso-text h5,.isso-text h6{font-weight:700;font-size:130%}.isso-comment-footer{clear:left;font-size:.8em}.isso-comment-footer a,.isso-feedlink{margin:.4em;padding:.1em;font-weight:700;text-decoration:none}.isso-downvote svg,.isso-upvote svg{position:relative;top:.2em}.isso-downvote:hover svg,.isso-upvote:hover svg{fill:var(--hover-color)}.isso-comment .isso-postbox{margin-top:.8em}.isso-comment.isso-no-votes>*>.isso-comment-footer .isso-votes,.isso-post-action input[name=edit],.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-textarea,.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=preview],.isso-preview{display:none}.isso-postbox{clear:right;margin:0 auto 2em}.isso-form-wrapper{display:flex;flex-direction:column}.isso-preview,.isso-textarea{margin-top:.2em;border-radius:5px}.isso-textarea{outline:0;width:100%;resize:none}.isso-form-wrapper input[type=checkbox]{position:relative;bottom:1px;vertical-align:middle;margin-inline-end:0}.isso-notification-section{display:none;padding-top:.3em;padding-bottom:10px;font-size:.9em}.isso-auth-section{display:flex;flex-direction:row}.isso-input-wrapper,.isso-post-action{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;margin:0 auto;max-width:35%;font-size:.8em;font-family:var(--sans-serif-font);text-align:center}.isso-input-wrapper{margin-inline-end:.5em}.isso-input-wrapper input,.isso-post-action input{margin-top:auto}.isso-input-wrapper label{display:inline-block;margin-top:auto;height:auto;line-height:1.4em}.isso-input-wrapper input{border:1px solid var(--divider-color);border-radius:5px;padding:.3em;width:100%;line-height:1.2em}.isso-post-action input{cursor:pointer;margin:.1em;border:none;border-radius:5px;background-color:var(--primary-color);padding:.6em 1em;color:var(--background-color);font-size:.8rem}.isso-post-action{display:block;align-self:flex-end;margin:0 auto}.isso-post-action>input:hover{opacity:.8}.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-preview{display:block}.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=edit]{display:inline}.isso-preview{background:repeating-linear-gradient(-45deg,var(--bg-0),var(--bg-0) 10px,var(--bg-2) 10px,var(--bg-2) 20px);background-color:var(--bg-0)}.isso-target{animation:5s ease-out isso-target-fade}@keyframes isso-target-fade{0%{background-color:var(--divider-color)}}@media screen and (max-width:600px){.isso-auth-section{flex-direction:column;text-align:center}.isso-input-wrapper{display:block;margin:0 0 .4em;max-width:100%}.isso-input-wrapper input{width:100%}.isso-post-action{margin:.4em auto;width:60%}} diff --git a/themes/tabi-lean/static/js/codeBlockNameLinks.js b/themes/tabi-lean/static/js/codeBlockNameLinks.js new file mode 100644 index 0000000..ea0b678 --- /dev/null +++ b/themes/tabi-lean/static/js/codeBlockNameLinks.js @@ -0,0 +1,36 @@ +document.addEventListener("DOMContentLoaded", function() { + // Convert URLs in data-name to links. + document.querySelectorAll('code[data-name]').forEach(function(code) { + const name = code.getAttribute('data-name'); + if (name.startsWith('http')) { + const link = document.createElement('a'); + link.href = name; + link.className = 'source-path'; + link.textContent = name; + code.insertBefore(link, code.firstChild); + // Remove data-name to avoid overlap with Zola's native display. + code.removeAttribute('data-name'); + code.parentElement?.removeAttribute('data-name'); + } + }); + + // Legacy support for old shortcode. https://github.com/welpo/tabi/pull/489 + document.querySelectorAll('.code-source').forEach(function(marker) { + const sourceUrl = marker.getAttribute('data-source'); + const nextPre = marker.nextElementSibling; + if (nextPre?.tagName === 'PRE') { + const code = nextPre.querySelector('code'); + if (code) { + if (sourceUrl.startsWith('http')) { + const link = document.createElement('a'); + link.href = sourceUrl; + link.className = 'source-path'; + link.textContent = sourceUrl; + code.insertBefore(link, code.firstChild); + } else { + code.setAttribute('data-name', sourceUrl); + } + } + } + }); +}); diff --git a/themes/tabi-lean/static/js/codeBlockNameLinks.min.js b/themes/tabi-lean/static/js/codeBlockNameLinks.min.js new file mode 100644 index 0000000..df1f999 --- /dev/null +++ b/themes/tabi-lean/static/js/codeBlockNameLinks.min.js @@ -0,0 +1 @@ +document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("code[data-name]").forEach(function(e){var t,a=e.getAttribute("data-name");a.startsWith("http")&&((t=document.createElement("a")).href=a,t.className="source-path",t.textContent=a,e.insertBefore(t,e.firstChild),e.removeAttribute("data-name"),e.parentElement?.removeAttribute("data-name"))}),document.querySelectorAll(".code-source").forEach(function(e){var t,a=e.getAttribute("data-source");"PRE"===(e=e.nextElementSibling)?.tagName&&(e=e.querySelector("code"))&&(a.startsWith("http")?((t=document.createElement("a")).href=a,t.className="source-path",t.textContent=a,e.insertBefore(t,e.firstChild)):e.setAttribute("data-name",a))})}); diff --git a/themes/tabi-lean/static/js/copyCodeToClipboard.js b/themes/tabi-lean/static/js/copyCodeToClipboard.js new file mode 100644 index 0000000..805eb59 --- /dev/null +++ b/themes/tabi-lean/static/js/copyCodeToClipboard.js @@ -0,0 +1,47 @@ +const copiedText = document.getElementById('copy-success').textContent; +const initCopyText = document.getElementById('copy-init').textContent; + +const changeIcon = (copyDiv, className) => { + copyDiv.classList.add(className); + copyDiv.setAttribute('aria-label', copiedText); + setTimeout(() => { + copyDiv.classList.remove(className); + copyDiv.setAttribute('aria-label', initCopyText); + }, 2500); +}; + +const addCopyEventListenerToDiv = (copyDiv, block) => { + copyDiv.addEventListener('click', () => copyCodeAndChangeIcon(copyDiv, block)); +}; + +const copyCodeAndChangeIcon = async (copyDiv, block) => { + const code = block.querySelector('table') + ? getTableCode(block) + : getNonTableCode(block); + try { + await navigator.clipboard.writeText(code); + changeIcon(copyDiv, 'checked'); + } catch (error) { + changeIcon(copyDiv, 'error'); + } +}; + +const getNonTableCode = (block) => { + return [...block.querySelectorAll('code')].map((code) => code.textContent).join(''); +}; + +const getTableCode = (block) => { + return [...block.querySelectorAll('tr')] + .map((row) => row.querySelector('td:last-child')?.innerText ?? '') + .join(''); +}; + +document.querySelectorAll('pre:not(.mermaid)').forEach((block) => { + const copyDiv = document.createElement('div'); + copyDiv.setAttribute('role', 'button'); + copyDiv.setAttribute('aria-label', initCopyText); + copyDiv.setAttribute('title', initCopyText); + copyDiv.className = 'copy-code'; + block.prepend(copyDiv); + addCopyEventListenerToDiv(copyDiv, block); +}); diff --git a/themes/tabi-lean/static/js/copyCodeToClipboard.min.js b/themes/tabi-lean/static/js/copyCodeToClipboard.min.js new file mode 100644 index 0000000..240d4ff --- /dev/null +++ b/themes/tabi-lean/static/js/copyCodeToClipboard.min.js @@ -0,0 +1 @@ +const copiedText=document.getElementById("copy-success").textContent,initCopyText=document.getElementById("copy-init").textContent,changeIcon=(e,t)=>{e.classList.add(t),e.setAttribute("aria-label",copiedText),setTimeout(()=>{e.classList.remove(t),e.setAttribute("aria-label",initCopyText)},2500)},addCopyEventListenerToDiv=(e,t)=>{e.addEventListener("click",()=>copyCodeAndChangeIcon(e,t))},copyCodeAndChangeIcon=async(t,e)=>{e=(e.querySelector("table")?getTableCode:getNonTableCode)(e);try{await navigator.clipboard.writeText(e),changeIcon(t,"checked")}catch(e){changeIcon(t,"error")}},getNonTableCode=e=>[...e.querySelectorAll("code")].map(e=>e.textContent).join(""),getTableCode=e=>[...e.querySelectorAll("tr")].map(e=>e.querySelector("td:last-child")?.innerText??"").join("");document.querySelectorAll("pre:not(.mermaid)").forEach(e=>{var t=document.createElement("div");t.setAttribute("role","button"),t.setAttribute("aria-label",initCopyText),t.setAttribute("title",initCopyText),t.className="copy-code",e.prepend(t),addCopyEventListenerToDiv(t,e)}); diff --git a/themes/tabi-lean/static/js/decodeMail.js b/themes/tabi-lean/static/js/decodeMail.js new file mode 100644 index 0000000..f26ac68 --- /dev/null +++ b/themes/tabi-lean/static/js/decodeMail.js @@ -0,0 +1,44 @@ +(function () { + 'use strict'; + + // Utility function: Base64 Decoding. + function decodeBase64(encodedString) { + try { + // Can't use atob() directly because it doesn't support non-ascii characters. + // And non-ascii characters are allowed in email addresses and domains. + // See https://en.wikipedia.org/wiki/Email_address#Internationalization + // Code below adapted from Jackie Han: https://stackoverflow.com/a/64752311 + const byteString = atob(encodedString); + + // Convert byteString to an array of char codes. + const charCodes = [...byteString].map((char) => char.charCodeAt(0)); + + // Use TypedArray.prototype.set() to copy the char codes into a Uint8Array. + const bytes = new Uint8Array(charCodes.length); + bytes.set(charCodes); + + const decoder = new TextDecoder('utf-8'); + return decoder.decode(bytes); + } catch (e) { + console.error('Failed to decode Base64 string: ', e); + return null; + } + } + + // Utility function: Update href of an element with a decoded email. + function updateEmailHref(element) { + const encodedEmail = element.getAttribute('data-encoded-email'); + const decodedEmail = decodeBase64(encodedEmail); + + if (decodedEmail) { + element.setAttribute('href', `mailto:${decodedEmail}`); + } else { + // If the decoding fails, hide the email link. + element.style.display = 'none'; + } + } + + // Fetch and process email elements with the "data-encoded-email" attribute. + const encodedEmailElements = document.querySelectorAll('[data-encoded-email]'); + encodedEmailElements.forEach(updateEmailHref); +})(); diff --git a/themes/tabi-lean/static/js/decodeMail.min.js b/themes/tabi-lean/static/js/decodeMail.min.js new file mode 100644 index 0000000..2b766a0 --- /dev/null +++ b/themes/tabi-lean/static/js/decodeMail.min.js @@ -0,0 +1 @@ +!function(){"use strict";document.querySelectorAll("[data-encoded-email]").forEach(function(e){var t=function(e){try{var t=[...atob(e)].map(e=>e.charCodeAt(0)),r=new Uint8Array(t.length);return r.set(t),new TextDecoder("utf-8").decode(r)}catch(e){return console.error("Failed to decode Base64 string: ",e),null}}(e.getAttribute("data-encoded-email"));t?e.setAttribute("href","mailto:"+t):e.style.display="none"})}(); diff --git a/themes/tabi-lean/static/js/filterCards.js b/themes/tabi-lean/static/js/filterCards.js new file mode 100644 index 0000000..a24137f --- /dev/null +++ b/themes/tabi-lean/static/js/filterCards.js @@ -0,0 +1,99 @@ +document.addEventListener('DOMContentLoaded', () => { + const cards = document.querySelectorAll('.card'); + const filterLinks = document.querySelectorAll('.filter-controls a'); + const allProjectsFilter = document.querySelector('#all-projects-filter'); + if (!cards.length || !filterLinks.length) return; + allProjectsFilter.style.display = 'block'; + + // Create a Map for O(1) lookups of links by filter value. + const linkMap = new Map( + Array.from(filterLinks).map(link => [link.dataset.filter, link]) + ); + + // Pre-process cards data for faster filtering. + const cardData = Array.from(cards).map(card => ({ + element: card, + tags: card.dataset.tags?.toLowerCase().split(',').filter(Boolean) ?? [] + })); + + function getTagSlugFromUrl(url) { + return url.split('/').filter(Boolean).pop(); + } + + function getFilterFromHash() { + if (!window.location.hash) return 'all'; + const hash = decodeURIComponent(window.location.hash.slice(1)); + const matchingLink = Array.from(filterLinks).find(link => + getTagSlugFromUrl(link.getAttribute('href')) === hash + ); + return matchingLink?.dataset.filter ?? 'all'; + } + + function setActiveFilter(filterValue, updateHash = true) { + if (updateHash) { + if (filterValue === 'all') { + history.pushState(null, '', window.location.pathname); + } else { + const activeLink = linkMap.get(filterValue); + if (activeLink) { + const tagSlug = getTagSlugFromUrl(activeLink.getAttribute('href')); + history.pushState(null, '', `#${tagSlug}`); + } + } + } + const isAll = filterValue === 'all'; + const display = isAll ? '' : 'none'; + const ariaHidden = isAll ? 'false' : 'true'; + requestAnimationFrame(() => { + filterLinks.forEach(link => { + const isActive = link.dataset.filter === filterValue; + link.classList.toggle('active', isActive); + link.setAttribute('aria-pressed', isActive); + }); + if (isAll) { + cardData.forEach(({ element }) => { + element.style.display = display; + element.setAttribute('aria-hidden', ariaHidden); + }); + } else { + cardData.forEach(({ element, tags }) => { + const shouldShow = tags.includes(filterValue); + element.style.display = shouldShow ? '' : 'none'; + element.setAttribute('aria-hidden', !shouldShow); + }); + } + }); + } + + const filterContainer = filterLinks[0].parentElement.parentElement; + filterContainer.addEventListener('click', e => { + const link = e.target.closest('a'); + if (!link) return; + e.preventDefault(); + const filterValue = link.dataset.filter; + if (filterValue) setActiveFilter(filterValue); + }); + + filterContainer.addEventListener('keydown', e => { + const link = e.target.closest('a'); + if (!link) return; + if (e.key === ' ' || e.key === 'Enter') { + e.preventDefault(); + link.click(); + } + }); + + filterLinks.forEach(link => { + link.setAttribute('role', 'button'); + link.setAttribute('aria-pressed', link.classList.contains('active')); + }); + + window.addEventListener('popstate', () => { + setActiveFilter(getFilterFromHash(), false); + }); + + const initialFilter = getFilterFromHash(); + if (initialFilter !== 'all') { + setActiveFilter(initialFilter, false); + } +}); diff --git a/themes/tabi-lean/static/js/filterCards.min.js b/themes/tabi-lean/static/js/filterCards.min.js new file mode 100644 index 0000000..b150e70 --- /dev/null +++ b/themes/tabi-lean/static/js/filterCards.min.js @@ -0,0 +1 @@ +document.addEventListener("DOMContentLoaded",()=>{var t=document.querySelectorAll(".card");const l=document.querySelectorAll(".filter-controls a");var e=document.querySelector("#all-projects-filter");if(t.length&&l.length){e.style.display="block";const s=new Map(Array.from(l).map(t=>[t.dataset.filter,t])),i=Array.from(t).map(t=>({element:t,tags:t.dataset.tags?.toLowerCase().split(",").filter(Boolean)??[]}));function o(t){return t.split("/").filter(Boolean).pop()}function a(){if(!window.location.hash)return"all";const e=decodeURIComponent(window.location.hash.slice(1));return Array.from(l).find(t=>o(t.getAttribute("href"))===e)?.dataset.filter??"all"}function r(a,t=!0){t&&("all"===a?history.pushState(null,"",window.location.pathname):(t=s.get(a))&&(t=o(t.getAttribute("href")),history.pushState(null,"","#"+t)));const e="all"===a,r=e?"":"none",n=e?"false":"true";requestAnimationFrame(()=>{l.forEach(t=>{var e=t.dataset.filter===a;t.classList.toggle("active",e),t.setAttribute("aria-pressed",e)}),e?i.forEach(({element:t})=>{t.style.display=r,t.setAttribute("aria-hidden",n)}):i.forEach(({element:t,tags:e})=>{e=e.includes(a),t.style.display=e?"":"none",t.setAttribute("aria-hidden",!e)})})}(e=l[0].parentElement.parentElement).addEventListener("click",t=>{var e=t.target.closest("a");e&&(t.preventDefault(),t=e.dataset.filter)&&r(t)}),e.addEventListener("keydown",t=>{var e=t.target.closest("a");!e||" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),e.click())}),l.forEach(t=>{t.setAttribute("role","button"),t.setAttribute("aria-pressed",t.classList.contains("active"))}),window.addEventListener("popstate",()=>{r(a(),!1)}),"all"!==(t=a())&&r(t,!1)}}); diff --git a/themes/tabi-lean/static/js/footnoteBacklinks.js b/themes/tabi-lean/static/js/footnoteBacklinks.js new file mode 100644 index 0000000..8c20098 --- /dev/null +++ b/themes/tabi-lean/static/js/footnoteBacklinks.js @@ -0,0 +1,33 @@ +// Assign unique IDs to the footnote references based on their hashes. +function assignReferenceIds() { + const references = document.querySelectorAll('.footnote-reference'); + for (const ref of references) { + ref.id = `ref:${ref.children[0].hash.substring(1)}`; + } +} + +// Create backlinks for each footnote definition if a corresponding reference exists. +function createFootnoteBacklinks() { + const footnotes = document.querySelectorAll('.footnote-definition'); + for (const footnote of footnotes) { + const backlinkId = `ref:${footnote.id}`; + + // Skip if there's no corresponding reference in the text (i.e. the footnote doesn't reference anything). + if (!document.getElementById(backlinkId)) continue; + + const backlink = document.createElement('a'); + backlink.href = `#${backlinkId}`; + backlink.className = 'footnote-backlink'; + backlink.textContent = '↩'; + footnote.lastElementChild.appendChild(backlink); + } +} + +// Initialise the handlers for the footnote references and definitions. +function initFootnotes() { + assignReferenceIds(); + createFootnoteBacklinks(); +} + +// Wait for the window to load, then execute the main function. +window.addEventListener('load', initFootnotes); diff --git a/themes/tabi-lean/static/js/footnoteBacklinks.min.js b/themes/tabi-lean/static/js/footnoteBacklinks.min.js new file mode 100644 index 0000000..c2175a7 --- /dev/null +++ b/themes/tabi-lean/static/js/footnoteBacklinks.min.js @@ -0,0 +1 @@ +function assignReferenceIds(){for(const e of document.querySelectorAll(".footnote-reference"))e.id="ref:"+e.children[0].hash.substring(1)}function createFootnoteBacklinks(){for(const n of document.querySelectorAll(".footnote-definition")){var e,t="ref:"+n.id;document.getElementById(t)&&((e=document.createElement("a")).href="#"+t,e.className="footnote-backlink",e.textContent="↩",n.lastElementChild.appendChild(e))}}function initFootnotes(){assignReferenceIds(),createFootnoteBacklinks()}window.addEventListener("load",initFootnotes); diff --git a/themes/tabi-lean/static/js/giscus.js b/themes/tabi-lean/static/js/giscus.js new file mode 100644 index 0000000..1fbe837 --- /dev/null +++ b/themes/tabi-lean/static/js/giscus.js @@ -0,0 +1,81 @@ +function setGiscusTheme(newTheme) { + // Get the giscus iframe. + const frame = document.querySelector('iframe.giscus-frame'); + + if (frame) { + // If the iframe exists, send a message to set the theme. + frame.contentWindow.postMessage( + { giscus: { setConfig: { theme: newTheme } } }, + 'https://giscus.app' + ); + } +} + +// Function to initialize Giscus. This function is run when the window loads. +function initGiscus() { + // Get the div that will contain the comments. + const commentsDiv = document.querySelector('.comments'); + if (commentsDiv) { + // Get the various settings from data attributes on the div. + const repo = commentsDiv.getAttribute('data-repo'); + const repoId = commentsDiv.getAttribute('data-repo-id'); + const category = commentsDiv.getAttribute('data-category'); + const categoryId = commentsDiv.getAttribute('data-category-id'); + const strictTitleMatching = commentsDiv.getAttribute('data-strict'); + const term = commentsDiv.getAttribute('data-term'); + const reactionsEnabled = commentsDiv.getAttribute('data-reactions-enabled'); + const inputPosition = commentsDiv.getAttribute('data-input-position'); + const lightTheme = commentsDiv.getAttribute('data-light-theme'); + const darkTheme = commentsDiv.getAttribute('data-dark-theme'); + const lang = commentsDiv.getAttribute('data-lang'); + const lazyLoading = commentsDiv.getAttribute('data-lazy-loading'); + + // Create a new script tag that will load the Giscus script. + const script = document.createElement('script'); + script.src = 'https://giscus.app/client.js'; + script.async = true; + + // Set the various settings as data attributes on the script tag. + script.setAttribute('data-repo', repo); + script.setAttribute('data-repo-id', repoId); + script.setAttribute('data-category', category); + script.setAttribute('data-category-id', categoryId); + script.setAttribute('data-term', term); + script.setAttribute('data-strict', strictTitleMatching); + script.setAttribute('data-reactions-enabled', reactionsEnabled); + script.setAttribute('data-emit-metadata', '0'); + script.setAttribute('data-input-position', inputPosition); + script.setAttribute('data-lang', lang); + script.setAttribute('crossorigin', 'anonymous'); + + // Set the mapping if it is provided. + const mapping = commentsDiv.getAttribute('data-mapping'); + if (mapping) { + script.setAttribute('data-mapping', mapping); + } + + // Choose the correct theme based on the current theme of the document. + const currentTheme = + document.documentElement.getAttribute('data-theme') || 'light'; + const selectedTheme = currentTheme === 'dark' ? darkTheme : lightTheme; + script.setAttribute('data-theme', selectedTheme); + + // Set the loading attribute if lazy loading is enabled. + if (lazyLoading === 'true') { + script.setAttribute('data-loading', 'lazy'); + } + + // Add the script tag to the div. + commentsDiv.appendChild(script); + + // Listen for theme changes and update the Giscus theme when they occur. + window.addEventListener('themeChanged', (event) => { + const selectedTheme = + event.detail.theme === 'dark' ? darkTheme : lightTheme; + setGiscusTheme(selectedTheme); + }); + } +} + +// Initialize Giscus. +initGiscus(); diff --git a/themes/tabi-lean/static/js/giscus.min.js b/themes/tabi-lean/static/js/giscus.min.js new file mode 100644 index 0000000..2846f22 --- /dev/null +++ b/themes/tabi-lean/static/js/giscus.min.js @@ -0,0 +1 @@ +function setGiscusTheme(t){var e=document.querySelector("iframe.giscus-frame");e&&e.contentWindow.postMessage({giscus:{setConfig:{theme:t}}},"https://giscus.app")}function initGiscus(){var t=document.querySelector(".comments");if(t){var e=t.getAttribute("data-repo"),a=t.getAttribute("data-repo-id"),i=t.getAttribute("data-category"),r=t.getAttribute("data-category-id"),d=t.getAttribute("data-strict"),s=t.getAttribute("data-term"),u=t.getAttribute("data-reactions-enabled"),n=t.getAttribute("data-input-position");const b=t.getAttribute("data-light-theme"),A=t.getAttribute("data-dark-theme");var o=t.getAttribute("data-lang"),c=t.getAttribute("data-lazy-loading"),g=document.createElement("script"),e=(g.src="https://giscus.app/client.js",g.async=!0,g.setAttribute("data-repo",e),g.setAttribute("data-repo-id",a),g.setAttribute("data-category",i),g.setAttribute("data-category-id",r),g.setAttribute("data-term",s),g.setAttribute("data-strict",d),g.setAttribute("data-reactions-enabled",u),g.setAttribute("data-emit-metadata","0"),g.setAttribute("data-input-position",n),g.setAttribute("data-lang",o),g.setAttribute("crossorigin","anonymous"),t.getAttribute("data-mapping")),a=(e&&g.setAttribute("data-mapping",e),document.documentElement.getAttribute("data-theme")||"light"),i="dark"===a?A:b;g.setAttribute("data-theme",i),"true"===c&&g.setAttribute("data-loading","lazy"),t.appendChild(g),window.addEventListener("themeChanged",t=>{setGiscusTheme("dark"===t.detail.theme?A:b)})}}initGiscus(); diff --git a/themes/tabi-lean/static/js/hyvortalk.js b/themes/tabi-lean/static/js/hyvortalk.js new file mode 100644 index 0000000..3f9959d --- /dev/null +++ b/themes/tabi-lean/static/js/hyvortalk.js @@ -0,0 +1,44 @@ +function initHyvorTalk() { + // Get the div that will contain the comments. + const commentsDiv = document.querySelector('.comments'); + if (commentsDiv) { + // Get the various settings from data attributes on the div. + const websiteId = commentsDiv.getAttribute('data-website-id'); + const pageId = commentsDiv.getAttribute('data-page-id'); + const pageLanguage = commentsDiv.getAttribute('data-page-language'); + const loading = commentsDiv.getAttribute('data-loading'); + const pageAuthor = commentsDiv.getAttribute('data-page-author'); + + // Create a new script tag that will load the Hyvor Talk script. + const script = document.createElement('script'); + script.src = 'https://talk.hyvor.com/embed/embed.js'; + script.async = true; + script.type = 'module'; + document.head.appendChild(script); + + // Create a new Hyvor Talk comments tag. + const comments = document.createElement('hyvor-talk-comments'); + comments.setAttribute('website-id', websiteId); + comments.setAttribute('page-id', pageId); + comments.setAttribute('page-language', pageLanguage); + comments.setAttribute('loading', loading); + comments.setAttribute('page-author', pageAuthor); + + // Choose the correct theme based on the current theme of the document. + const currentTheme = + document.documentElement.getAttribute('data-theme') || 'light'; + comments.setAttribute('colors', currentTheme); + + // Add the Hyvor Talk comments tag to the div. + commentsDiv.appendChild(comments); + + // Listen for theme changes and update the Hyvor Talk theme when they occur. + window.addEventListener('themeChanged', (event) => { + const selectedTheme = event.detail.theme; + comments.setAttribute('colors', selectedTheme); + }); + } +} + +// Initialize HyvorTalk. +initHyvorTalk(); diff --git a/themes/tabi-lean/static/js/hyvortalk.min.js b/themes/tabi-lean/static/js/hyvortalk.min.js new file mode 100644 index 0000000..f4ea4f5 --- /dev/null +++ b/themes/tabi-lean/static/js/hyvortalk.min.js @@ -0,0 +1 @@ +function initHyvorTalk(){var t=document.querySelector(".comments");if(t){var e=t.getAttribute("data-website-id"),a=t.getAttribute("data-page-id"),i=t.getAttribute("data-page-language"),d=t.getAttribute("data-loading"),r=t.getAttribute("data-page-author"),n=document.createElement("script");n.src="https://talk.hyvor.com/embed/embed.js",n.async=!0,n.type="module",document.head.appendChild(n);const o=document.createElement("hyvor-talk-comments");o.setAttribute("website-id",e),o.setAttribute("page-id",a),o.setAttribute("page-language",i),o.setAttribute("loading",d),o.setAttribute("page-author",r);n=document.documentElement.getAttribute("data-theme")||"light";o.setAttribute("colors",n),t.appendChild(o),window.addEventListener("themeChanged",t=>{t=t.detail.theme;o.setAttribute("colors",t)})}}initHyvorTalk(); diff --git a/themes/tabi-lean/static/js/initializeTheme.js b/themes/tabi-lean/static/js/initializeTheme.js new file mode 100644 index 0000000..95e754c --- /dev/null +++ b/themes/tabi-lean/static/js/initializeTheme.js @@ -0,0 +1,25 @@ +(function () { + // Get the default theme from the HTML data-theme attribute. + const defaultTheme = document.documentElement.getAttribute('data-theme'); + + // Set the data-default-theme attribute only if defaultTheme is not null. + if (defaultTheme) { + document.documentElement.setAttribute('data-default-theme', defaultTheme); + } + + // Attempt to retrieve the current theme from the browser's local storage. + const storedTheme = localStorage.getItem('theme'); + + if (storedTheme) { + document.documentElement.setAttribute('data-theme', storedTheme); + } else if (defaultTheme) { + document.documentElement.setAttribute('data-theme', defaultTheme); + } else { + // If no theme is found in local storage and no default theme is set, use user's system preference. + const isSystemDark = window.matchMedia('(prefers-color-scheme: dark)').matches; + document.documentElement.setAttribute( + 'data-theme', + isSystemDark ? 'dark' : 'light' + ); + } +})(); diff --git a/themes/tabi-lean/static/js/initializeTheme.min.js b/themes/tabi-lean/static/js/initializeTheme.min.js new file mode 100644 index 0000000..3f65952 --- /dev/null +++ b/themes/tabi-lean/static/js/initializeTheme.min.js @@ -0,0 +1 @@ +!function(){var t=document.documentElement.getAttribute("data-theme"),e=(t&&document.documentElement.setAttribute("data-default-theme",t),localStorage.getItem("theme"));e?document.documentElement.setAttribute("data-theme",e):t?document.documentElement.setAttribute("data-theme",t):(e=window.matchMedia("(prefers-color-scheme: dark)").matches,document.documentElement.setAttribute("data-theme",e?"dark":"light"))}(); diff --git a/themes/tabi-lean/static/js/isso.js b/themes/tabi-lean/static/js/isso.js new file mode 100644 index 0000000..4666604 --- /dev/null +++ b/themes/tabi-lean/static/js/isso.js @@ -0,0 +1,81 @@ +// Function to initialise Isso. +function initIsso() { + // Get the div that will contain the comments. + const commentsDiv = document.querySelector('.comments'); + if (commentsDiv) { + // Get the lazy-loading setting from the div. + const lazyLoading = commentsDiv.getAttribute('data-lazy-loading') === 'true'; + + // If lazy-loading is enabled, create an Intersection Observer and use it. + if (lazyLoading) { + const observer = new IntersectionObserver((entries) => { + // Loop over the entries. + entries.forEach((entry) => { + // If the element is in the viewport, initialize Isso. + if (entry.isIntersecting) { + loadIsso(commentsDiv); + // Once the Isso is loaded, we don't need to observe the element anymore. + observer.unobserve(commentsDiv); + } + }); + }); + + // Start observing the comments div. + observer.observe(commentsDiv); + } else { + // If lazy-loading is not enabled, initialise Isso immediately. + loadIsso(commentsDiv); + } + } +} + +// Function to load Isso. +function loadIsso(commentsDiv) { + // Get the various settings from data attributes on the div. + const endpointUrl = commentsDiv.getAttribute('data-endpoint-url'); + const pageId = commentsDiv.getAttribute('data-isso-id'); + const title = commentsDiv.getAttribute('data-title'); + const lang = commentsDiv.getAttribute('data-page-language'); + const maxCommentsTop = commentsDiv.getAttribute('data-max-comments-top'); + const maxCommentsNested = commentsDiv.getAttribute('data-max-comments-nested'); + const avatar = commentsDiv.getAttribute('data-avatar'); + const voting = commentsDiv.getAttribute('data-voting'); + const hashes = commentsDiv.getAttribute('data-page-author-hashes'); + + // Create a new script tag that will load the Isso script. + const script = document.createElement('script'); + script.src = endpointUrl + 'js/embed.min.js'; + script.async = true; + + // Set the various settings as data attributes on the script tag. + script.setAttribute('data-isso', endpointUrl); + script.setAttribute('data-isso-lang', lang); + script.setAttribute('data-isso-max-comments-top', maxCommentsTop); + script.setAttribute('data-isso-max-comments-nested', maxCommentsNested); + script.setAttribute('data-isso-avatar', avatar); + script.setAttribute('data-isso-vote', voting); + script.setAttribute('data-isso-page-author-hashes', hashes); + script.setAttribute('data-isso-css', 'false'); + + // Set the id and data-isso-id of the Isso thread. + const section = document.createElement('section'); + section.id = 'isso-thread'; + section.setAttribute('data-isso-id', pageId); + section.setAttribute('data-title', title); + commentsDiv.appendChild(section); + + // Add the script tag to the div. + commentsDiv.appendChild(script); + + // Create a link tag for the Isso CSS. + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.type = 'text/css'; + link.href = '/isso.min.css'; + + // Add the CSS link tag to the head of the document. + document.head.appendChild(link); +} + +// Initialize Isso. +initIsso(); diff --git a/themes/tabi-lean/static/js/isso.min.js b/themes/tabi-lean/static/js/isso.min.js new file mode 100644 index 0000000..833eaff --- /dev/null +++ b/themes/tabi-lean/static/js/isso.min.js @@ -0,0 +1 @@ +function initIsso(){const e=document.querySelector(".comments");if(e)if("true"===e.getAttribute("data-lazy-loading")){const a=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(loadIsso(e),a.unobserve(e))})});a.observe(e)}else loadIsso(e)}function loadIsso(t){var e=t.getAttribute("data-endpoint-url"),a=t.getAttribute("data-isso-id"),s=t.getAttribute("data-title"),i=t.getAttribute("data-page-language"),o=t.getAttribute("data-max-comments-top"),r=(t.getAttribute("data-max-comments-nested"),t.getAttribute("data-avatar")),d=t.getAttribute("data-voting"),n=t.getAttribute("data-page-author-hashes"),u=document.createElement("script");u.src=e+"js/embed.min.js",u.async=!0,u.setAttribute("data-isso",e),u.setAttribute("data-isso-lang",i),u.setAttribute("data-isso-max-comments-top",o),u.setAttribute("data-isso-avatar",r),u.setAttribute("data-isso-vote",d),u.setAttribute("data-isso-page-author-hashes",n),u.setAttribute("data-isso-css","false"),(e=document.createElement("section")).id="isso-thread",e.setAttribute("data-isso-id",a),e.setAttribute("data-title",s),t.appendChild(e),t.appendChild(u),(i=document.createElement("link")).rel="stylesheet",i.type="text/css",i.href="/isso.min.css",document.head.appendChild(i)}initIsso(); diff --git a/themes/tabi-lean/static/js/katex.min.js b/themes/tabi-lean/static/js/katex.min.js new file mode 100644 index 0000000..f0f08ba --- /dev/null +++ b/themes/tabi-lean/static/js/katex.min.js @@ -0,0 +1 @@ +((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()})("undefined"!=typeof self?self:this,function(){{var Jt={d:function(e,t){for(var r in t)Jt.o(t,r)&&!Jt.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},Qt={};Jt.d(Qt,{default:function(){return gr}});class fr{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let r,n,a="KaTeX parse error: "+e;var i,o,s=t&&t.loc;return s&&s.start<=s.end&&(o=s.lexer.input,r=s.start,n=s.end,r===o.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ",i=o.slice(r,n).replace(/[^]/g,"$&̲"),s=15<r?"…"+o.slice(r-15,r):o.slice(0,r),o=n+15<o.length?o.slice(n,n+15)+"…":o.slice(n),a+=s+i+o),(t=new Error(a)).name="ParseError",t.__proto__=fr.prototype,null!=(t.position=r)&&null!=n&&(t.length=n-r),t.rawMessage=e,t}}fr.prototype.__proto__=Error.prototype;var ft=fr;function e0(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?e0(e.body[0]):e:"font"===e.type?e0(e.body):e}let H=/([A-Z])/g,O={"&":"&",">":">","<":"<",'"':""","'":"'"},E=/[&><"']/g;var bt={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(E,e=>O[e])},hyphenate:function(e){return e.replace(H,"-$1").toLowerCase()},getBaseElem:e0,isCharacterBox:function(e){return"mathord"===(e=e0(e)).type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(e){return(e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e))?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}};let n={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};class br{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},n){var r;n.hasOwnProperty(t)&&(r=n[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:(e=>{if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}})(r))}}reportNonstrict(e,t,r){let n=this.strict;if((n="function"==typeof n?n(e,t,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new ft("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){let n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){var t=bt.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return t="function"==typeof this.trust?this.trust(e):this.trust,Boolean(t)}}class yr{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return e[L[this.id]]}sub(){return e[V[this.id]]}fracNum(){return e[F[this.id]]}fracDen(){return e[G[this.id]]}cramp(){return e[U[this.id]]}text(){return e[Y[this.id]]}isTight(){return 2<=this.size}}let e=[new yr(0,0,!1),new yr(1,0,!0),new yr(2,1,!1),new yr(3,1,!0),new yr(4,2,!1),new yr(5,2,!0),new yr(6,3,!1),new yr(7,3,!0)],L=[4,5,4,5,6,7,6,7],V=[5,5,5,5,7,7,7,7],F=[2,3,4,5,6,7,6,7],G=[3,3,5,5,7,7,7,7],U=[1,1,3,3,5,5,7,7],Y=[0,1,2,3,2,3,2,3];var yt={DISPLAY:e[0],TEXT:e[2],SCRIPT:e[4],SCRIPTSCRIPT:e[6]};let l=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],r=[];function t0(t){for(let e=0;e<r.length;e+=2)if(t>=r[e]&&t<=r[e+1])return 1}l.forEach(e=>e.blocks.forEach(e=>r.push(...e)));let X={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class xr{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return bt.contains(this.classes,e)}toNode(){var t=document.createDocumentFragment();for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t="";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){return this.children.map(e=>e.toText()).join("")}}var xt={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};let a={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},W={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function r0(e,t,r){if(!xt[t])throw new Error("Font metrics not found for font: "+t+".");let n=e.charCodeAt(0),a=xt[t][n];if(!a&&e[0]in W&&(n=W[e[0]].charCodeAt(0),a=xt[t][n]),a||"text"!==r||t0(n)&&(a=xt[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}function n0(e,t){return t.size<2?e:j[e-1][t.size-1]}let i={},j=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],_=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488];class wr{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||wr.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=_[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t,r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return new wr(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:n0(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:_[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=n0(wr.BASESIZE,e);return this.size===t&&this.textSize===wr.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==wr.BASESIZE?["sizing","reset-size"+this.size,"size"+wr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=(e=>{var t=5<=e?0:3<=e?1:2;if(!i[t]){var r,n=i[t]={cssEmPerMu:a.quad[t]/18};for(r in a)a.hasOwnProperty(r)&&(n[r]=a[r][t])}return i[t]})(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}wr.BASESIZE=6;var a0=wr;function i0(e){return(e="string"!=typeof e?e.unit:e)in o||e in $||"ex"===e}function wt(e,t){let r;if(e.unit in o)r=o[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new ft("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)}function o0(e){return e.filter(e=>e).join(" ")}function s0(e,t,r){this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t&&(t.style.isTight()&&this.classes.push("mtight"),e=t.getColor())&&(this.style.color=e)}function l0(e){var t,r,n=document.createElement(e);for(t in n.className=o0(this.classes),this.style)this.style.hasOwnProperty(t)&&(n.style[t]=this.style[t]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(let e=0;e<this.children.length;e++)n.appendChild(this.children[e].toNode());return n}function h0(e){let t="<"+e,r=(this.classes.length&&(t+=' class="'+bt.escape(o0(this.classes))+'"'),"");for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=bt.hyphenate(n)+":"+this.style[n]+";");for(var a in r&&(t+=' style="'+bt.escape(r)+'"'),this.attributes)if(this.attributes.hasOwnProperty(a)){if(Z.test(a))throw new ft("Invalid attribute name '"+a+"'");t+=" "+a+'="'+bt.escape(this.attributes[a])+'"'}t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+e+">"}let o={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},$={ex:!0,em:!0,mu:!0},D=function(e){return+e.toFixed(4)+"em"},Z=/[\s"'>/=\x00-\x1f]/;class vr{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,s0.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return bt.contains(this.classes,e)}toNode(){return l0.call(this,"span")}toMarkup(){return h0.call(this,"span")}}class kr{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,s0.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return bt.contains(this.classes,e)}toNode(){return l0.call(this,"a")}toMarkup(){return h0.call(this,"a")}}class Sr{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return bt.contains(this.classes,e)}toNode(){var e,t=document.createElement("img");for(e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t}toMarkup(){let e='<img src="'+bt.escape(this.src)+'" alt="'+bt.escape(this.alt)+'"',t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=bt.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+bt.escape(t)+'"'),e+="'/>"}}let K={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class jt{constructor(e,t,r,n,a,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=a||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0,(e=(t=>{for(let e=0;e<l.length;e++){var r=l[e];for(let e=0;e<r.blocks.length;e++){var n=r.blocks[e];if(t>=n[0]&&t<=n[1])return r.name}}return null})(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=K[this.text])}hasClass(e){return bt.contains(this.classes,e)}toNode(){let e=document.createTextNode(this.text),t=null;for(var r in 0<this.italic&&((t=document.createElement("span")).style.marginRight=D(this.italic)),0<this.classes.length&&((t=t||document.createElement("span")).className=o0(this.classes)),this.style)this.style.hasOwnProperty(r)&&(t=t||document.createElement("span"),t.style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="<span",r=(this.classes.length&&(e=!0,t=(t+=' class="')+bt.escape(o0(this.classes))+'"'),"");for(var n in 0<this.italic&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=bt.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+bt.escape(r)+'"');var a=bt.escape(this.text);return e?t=(t+=">")+a+"</span>":a}}class Mr{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t='<svg xmlns="http://www.w3.org/2000/svg"';for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+bt.escape(this.attributes[e])+'"');t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</svg>"}}class zr{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",X[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+bt.escape(this.alternate)+'"/>':'<path d="'+bt.escape(X[this.pathName])+'"/>'}}class Ar{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","line");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t}toMarkup(){let e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+bt.escape(this.attributes[t])+'"');return e+="/>"}}function m0(e){if(e instanceof jt)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}let J={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Q={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},s={math:{},text:{}};var vt=s;function kt(e,t,r,n,a,i){s[e][a]={font:t,group:r,replace:n},i&&n&&(s[e][n]=s[e][a])}var St="math",Mt="text",zt="main",At="ams",Tt="accent-token",Bt="bin",Ct="close",c0="inner",Nt="mathord",qt="op-token",It="open",p0="punct",Rt="rel",Ht="spacing",Ot="textord";kt(St,zt,Rt,"≡","\\equiv",!0),kt(St,zt,Rt,"≺","\\prec",!0),kt(St,zt,Rt,"≻","\\succ",!0),kt(St,zt,Rt,"∼","\\sim",!0),kt(St,zt,Rt,"⊥","\\perp"),kt(St,zt,Rt,"⪯","\\preceq",!0),kt(St,zt,Rt,"⪰","\\succeq",!0),kt(St,zt,Rt,"≃","\\simeq",!0),kt(St,zt,Rt,"∣","\\mid",!0),kt(St,zt,Rt,"≪","\\ll",!0),kt(St,zt,Rt,"≫","\\gg",!0),kt(St,zt,Rt,"≍","\\asymp",!0),kt(St,zt,Rt,"∥","\\parallel"),kt(St,zt,Rt,"⋈","\\bowtie",!0),kt(St,zt,Rt,"⌣","\\smile",!0),kt(St,zt,Rt,"⊑","\\sqsubseteq",!0),kt(St,zt,Rt,"⊒","\\sqsupseteq",!0),kt(St,zt,Rt,"≐","\\doteq",!0),kt(St,zt,Rt,"⌢","\\frown",!0),kt(St,zt,Rt,"∋","\\ni",!0),kt(St,zt,Rt,"∝","\\propto",!0),kt(St,zt,Rt,"⊢","\\vdash",!0),kt(St,zt,Rt,"⊣","\\dashv",!0),kt(St,zt,Rt,"∋","\\owns"),kt(St,zt,p0,".","\\ldotp"),kt(St,zt,p0,"⋅","\\cdotp"),kt(St,zt,Ot,"#","\\#"),kt(Mt,zt,Ot,"#","\\#"),kt(St,zt,Ot,"&","\\&"),kt(Mt,zt,Ot,"&","\\&"),kt(St,zt,Ot,"ℵ","\\aleph",!0),kt(St,zt,Ot,"∀","\\forall",!0),kt(St,zt,Ot,"ℏ","\\hbar",!0),kt(St,zt,Ot,"∃","\\exists",!0),kt(St,zt,Ot,"∇","\\nabla",!0),kt(St,zt,Ot,"♭","\\flat",!0),kt(St,zt,Ot,"ℓ","\\ell",!0),kt(St,zt,Ot,"♮","\\natural",!0),kt(St,zt,Ot,"♣","\\clubsuit",!0),kt(St,zt,Ot,"℘","\\wp",!0),kt(St,zt,Ot,"♯","\\sharp",!0),kt(St,zt,Ot,"♢","\\diamondsuit",!0),kt(St,zt,Ot,"ℜ","\\Re",!0),kt(St,zt,Ot,"♡","\\heartsuit",!0),kt(St,zt,Ot,"ℑ","\\Im",!0),kt(St,zt,Ot,"♠","\\spadesuit",!0),kt(St,zt,Ot,"§","\\S",!0),kt(Mt,zt,Ot,"§","\\S"),kt(St,zt,Ot,"¶","\\P",!0),kt(Mt,zt,Ot,"¶","\\P"),kt(St,zt,Ot,"†","\\dag"),kt(Mt,zt,Ot,"†","\\dag"),kt(Mt,zt,Ot,"†","\\textdagger"),kt(St,zt,Ot,"‡","\\ddag"),kt(Mt,zt,Ot,"‡","\\ddag"),kt(Mt,zt,Ot,"‡","\\textdaggerdbl"),kt(St,zt,Ct,"⎱","\\rmoustache",!0),kt(St,zt,It,"⎰","\\lmoustache",!0),kt(St,zt,Ct,"⟯","\\rgroup",!0),kt(St,zt,It,"⟮","\\lgroup",!0),kt(St,zt,Bt,"∓","\\mp",!0),kt(St,zt,Bt,"⊖","\\ominus",!0),kt(St,zt,Bt,"⊎","\\uplus",!0),kt(St,zt,Bt,"⊓","\\sqcap",!0),kt(St,zt,Bt,"∗","\\ast"),kt(St,zt,Bt,"⊔","\\sqcup",!0),kt(St,zt,Bt,"◯","\\bigcirc",!0),kt(St,zt,Bt,"∙","\\bullet",!0),kt(St,zt,Bt,"‡","\\ddagger"),kt(St,zt,Bt,"≀","\\wr",!0),kt(St,zt,Bt,"⨿","\\amalg"),kt(St,zt,Bt,"&","\\And"),kt(St,zt,Rt,"⟵","\\longleftarrow",!0),kt(St,zt,Rt,"⇐","\\Leftarrow",!0),kt(St,zt,Rt,"⟸","\\Longleftarrow",!0),kt(St,zt,Rt,"⟶","\\longrightarrow",!0),kt(St,zt,Rt,"⇒","\\Rightarrow",!0),kt(St,zt,Rt,"⟹","\\Longrightarrow",!0),kt(St,zt,Rt,"↔","\\leftrightarrow",!0),kt(St,zt,Rt,"⟷","\\longleftrightarrow",!0),kt(St,zt,Rt,"⇔","\\Leftrightarrow",!0),kt(St,zt,Rt,"⟺","\\Longleftrightarrow",!0),kt(St,zt,Rt,"↦","\\mapsto",!0),kt(St,zt,Rt,"⟼","\\longmapsto",!0),kt(St,zt,Rt,"↗","\\nearrow",!0),kt(St,zt,Rt,"↩","\\hookleftarrow",!0),kt(St,zt,Rt,"↪","\\hookrightarrow",!0),kt(St,zt,Rt,"↘","\\searrow",!0),kt(St,zt,Rt,"↼","\\leftharpoonup",!0),kt(St,zt,Rt,"⇀","\\rightharpoonup",!0),kt(St,zt,Rt,"↙","\\swarrow",!0),kt(St,zt,Rt,"↽","\\leftharpoondown",!0),kt(St,zt,Rt,"⇁","\\rightharpoondown",!0),kt(St,zt,Rt,"↖","\\nwarrow",!0),kt(St,zt,Rt,"⇌","\\rightleftharpoons",!0),kt(St,At,Rt,"≮","\\nless",!0),kt(St,At,Rt,"","\\@nleqslant"),kt(St,At,Rt,"","\\@nleqq"),kt(St,At,Rt,"⪇","\\lneq",!0),kt(St,At,Rt,"≨","\\lneqq",!0),kt(St,At,Rt,"","\\@lvertneqq"),kt(St,At,Rt,"⋦","\\lnsim",!0),kt(St,At,Rt,"⪉","\\lnapprox",!0),kt(St,At,Rt,"⊀","\\nprec",!0),kt(St,At,Rt,"⋠","\\npreceq",!0),kt(St,At,Rt,"⋨","\\precnsim",!0),kt(St,At,Rt,"⪹","\\precnapprox",!0),kt(St,At,Rt,"≁","\\nsim",!0),kt(St,At,Rt,"","\\@nshortmid"),kt(St,At,Rt,"∤","\\nmid",!0),kt(St,At,Rt,"⊬","\\nvdash",!0),kt(St,At,Rt,"⊭","\\nvDash",!0),kt(St,At,Rt,"⋪","\\ntriangleleft"),kt(St,At,Rt,"⋬","\\ntrianglelefteq",!0),kt(St,At,Rt,"⊊","\\subsetneq",!0),kt(St,At,Rt,"","\\@varsubsetneq"),kt(St,At,Rt,"⫋","\\subsetneqq",!0),kt(St,At,Rt,"","\\@varsubsetneqq"),kt(St,At,Rt,"≯","\\ngtr",!0),kt(St,At,Rt,"","\\@ngeqslant"),kt(St,At,Rt,"","\\@ngeqq"),kt(St,At,Rt,"⪈","\\gneq",!0),kt(St,At,Rt,"≩","\\gneqq",!0),kt(St,At,Rt,"","\\@gvertneqq"),kt(St,At,Rt,"⋧","\\gnsim",!0),kt(St,At,Rt,"⪊","\\gnapprox",!0),kt(St,At,Rt,"⊁","\\nsucc",!0),kt(St,At,Rt,"⋡","\\nsucceq",!0),kt(St,At,Rt,"⋩","\\succnsim",!0),kt(St,At,Rt,"⪺","\\succnapprox",!0),kt(St,At,Rt,"≆","\\ncong",!0),kt(St,At,Rt,"","\\@nshortparallel"),kt(St,At,Rt,"∦","\\nparallel",!0),kt(St,At,Rt,"⊯","\\nVDash",!0),kt(St,At,Rt,"⋫","\\ntriangleright"),kt(St,At,Rt,"⋭","\\ntrianglerighteq",!0),kt(St,At,Rt,"","\\@nsupseteqq"),kt(St,At,Rt,"⊋","\\supsetneq",!0),kt(St,At,Rt,"","\\@varsupsetneq"),kt(St,At,Rt,"⫌","\\supsetneqq",!0),kt(St,At,Rt,"","\\@varsupsetneqq"),kt(St,At,Rt,"⊮","\\nVdash",!0),kt(St,At,Rt,"⪵","\\precneqq",!0),kt(St,At,Rt,"⪶","\\succneqq",!0),kt(St,At,Rt,"","\\@nsubseteqq"),kt(St,At,Bt,"⊴","\\unlhd"),kt(St,At,Bt,"⊵","\\unrhd"),kt(St,At,Rt,"↚","\\nleftarrow",!0),kt(St,At,Rt,"↛","\\nrightarrow",!0),kt(St,At,Rt,"⇍","\\nLeftarrow",!0),kt(St,At,Rt,"⇏","\\nRightarrow",!0),kt(St,At,Rt,"↮","\\nleftrightarrow",!0),kt(St,At,Rt,"⇎","\\nLeftrightarrow",!0),kt(St,At,Rt,"△","\\vartriangle"),kt(St,At,Ot,"ℏ","\\hslash"),kt(St,At,Ot,"▽","\\triangledown"),kt(St,At,Ot,"◊","\\lozenge"),kt(St,At,Ot,"Ⓢ","\\circledS"),kt(St,At,Ot,"®","\\circledR"),kt(Mt,At,Ot,"®","\\circledR"),kt(St,At,Ot,"∡","\\measuredangle",!0),kt(St,At,Ot,"∄","\\nexists"),kt(St,At,Ot,"℧","\\mho"),kt(St,At,Ot,"Ⅎ","\\Finv",!0),kt(St,At,Ot,"⅁","\\Game",!0),kt(St,At,Ot,"‵","\\backprime"),kt(St,At,Ot,"▲","\\blacktriangle"),kt(St,At,Ot,"▼","\\blacktriangledown"),kt(St,At,Ot,"■","\\blacksquare"),kt(St,At,Ot,"⧫","\\blacklozenge"),kt(St,At,Ot,"★","\\bigstar"),kt(St,At,Ot,"∢","\\sphericalangle",!0),kt(St,At,Ot,"∁","\\complement",!0),kt(St,At,Ot,"ð","\\eth",!0),kt(Mt,zt,Ot,"ð","ð"),kt(St,At,Ot,"╱","\\diagup"),kt(St,At,Ot,"╲","\\diagdown"),kt(St,At,Ot,"□","\\square"),kt(St,At,Ot,"□","\\Box"),kt(St,At,Ot,"◊","\\Diamond"),kt(St,At,Ot,"¥","\\yen",!0),kt(Mt,At,Ot,"¥","\\yen",!0),kt(St,At,Ot,"✓","\\checkmark",!0),kt(Mt,At,Ot,"✓","\\checkmark"),kt(St,At,Ot,"ℶ","\\beth",!0),kt(St,At,Ot,"ℸ","\\daleth",!0),kt(St,At,Ot,"ℷ","\\gimel",!0),kt(St,At,Ot,"ϝ","\\digamma",!0),kt(St,At,Ot,"ϰ","\\varkappa"),kt(St,At,It,"┌","\\@ulcorner",!0),kt(St,At,Ct,"┐","\\@urcorner",!0),kt(St,At,It,"└","\\@llcorner",!0),kt(St,At,Ct,"┘","\\@lrcorner",!0),kt(St,At,Rt,"≦","\\leqq",!0),kt(St,At,Rt,"⩽","\\leqslant",!0),kt(St,At,Rt,"⪕","\\eqslantless",!0),kt(St,At,Rt,"≲","\\lesssim",!0),kt(St,At,Rt,"⪅","\\lessapprox",!0),kt(St,At,Rt,"≊","\\approxeq",!0),kt(St,At,Bt,"⋖","\\lessdot"),kt(St,At,Rt,"⋘","\\lll",!0),kt(St,At,Rt,"≶","\\lessgtr",!0),kt(St,At,Rt,"⋚","\\lesseqgtr",!0),kt(St,At,Rt,"⪋","\\lesseqqgtr",!0),kt(St,At,Rt,"≑","\\doteqdot"),kt(St,At,Rt,"≓","\\risingdotseq",!0),kt(St,At,Rt,"≒","\\fallingdotseq",!0),kt(St,At,Rt,"∽","\\backsim",!0),kt(St,At,Rt,"⋍","\\backsimeq",!0),kt(St,At,Rt,"⫅","\\subseteqq",!0),kt(St,At,Rt,"⋐","\\Subset",!0),kt(St,At,Rt,"⊏","\\sqsubset",!0),kt(St,At,Rt,"≼","\\preccurlyeq",!0),kt(St,At,Rt,"⋞","\\curlyeqprec",!0),kt(St,At,Rt,"≾","\\precsim",!0),kt(St,At,Rt,"⪷","\\precapprox",!0),kt(St,At,Rt,"⊲","\\vartriangleleft"),kt(St,At,Rt,"⊴","\\trianglelefteq"),kt(St,At,Rt,"⊨","\\vDash",!0),kt(St,At,Rt,"⊪","\\Vvdash",!0),kt(St,At,Rt,"⌣","\\smallsmile"),kt(St,At,Rt,"⌢","\\smallfrown"),kt(St,At,Rt,"≏","\\bumpeq",!0),kt(St,At,Rt,"≎","\\Bumpeq",!0),kt(St,At,Rt,"≧","\\geqq",!0),kt(St,At,Rt,"⩾","\\geqslant",!0),kt(St,At,Rt,"⪖","\\eqslantgtr",!0),kt(St,At,Rt,"≳","\\gtrsim",!0),kt(St,At,Rt,"⪆","\\gtrapprox",!0),kt(St,At,Bt,"⋗","\\gtrdot"),kt(St,At,Rt,"⋙","\\ggg",!0),kt(St,At,Rt,"≷","\\gtrless",!0),kt(St,At,Rt,"⋛","\\gtreqless",!0),kt(St,At,Rt,"⪌","\\gtreqqless",!0),kt(St,At,Rt,"≖","\\eqcirc",!0),kt(St,At,Rt,"≗","\\circeq",!0),kt(St,At,Rt,"≜","\\triangleq",!0),kt(St,At,Rt,"∼","\\thicksim"),kt(St,At,Rt,"≈","\\thickapprox"),kt(St,At,Rt,"⫆","\\supseteqq",!0),kt(St,At,Rt,"⋑","\\Supset",!0),kt(St,At,Rt,"⊐","\\sqsupset",!0),kt(St,At,Rt,"≽","\\succcurlyeq",!0),kt(St,At,Rt,"⋟","\\curlyeqsucc",!0),kt(St,At,Rt,"≿","\\succsim",!0),kt(St,At,Rt,"⪸","\\succapprox",!0),kt(St,At,Rt,"⊳","\\vartriangleright"),kt(St,At,Rt,"⊵","\\trianglerighteq"),kt(St,At,Rt,"⊩","\\Vdash",!0),kt(St,At,Rt,"∣","\\shortmid"),kt(St,At,Rt,"∥","\\shortparallel"),kt(St,At,Rt,"≬","\\between",!0),kt(St,At,Rt,"⋔","\\pitchfork",!0),kt(St,At,Rt,"∝","\\varpropto"),kt(St,At,Rt,"◀","\\blacktriangleleft"),kt(St,At,Rt,"∴","\\therefore",!0),kt(St,At,Rt,"∍","\\backepsilon"),kt(St,At,Rt,"▶","\\blacktriangleright"),kt(St,At,Rt,"∵","\\because",!0),kt(St,At,Rt,"⋘","\\llless"),kt(St,At,Rt,"⋙","\\gggtr"),kt(St,At,Bt,"⊲","\\lhd"),kt(St,At,Bt,"⊳","\\rhd"),kt(St,At,Rt,"≂","\\eqsim",!0),kt(St,zt,Rt,"⋈","\\Join"),kt(St,At,Rt,"≑","\\Doteq",!0),kt(St,At,Bt,"∔","\\dotplus",!0),kt(St,At,Bt,"∖","\\smallsetminus"),kt(St,At,Bt,"⋒","\\Cap",!0),kt(St,At,Bt,"⋓","\\Cup",!0),kt(St,At,Bt,"⩞","\\doublebarwedge",!0),kt(St,At,Bt,"⊟","\\boxminus",!0),kt(St,At,Bt,"⊞","\\boxplus",!0),kt(St,At,Bt,"⋇","\\divideontimes",!0),kt(St,At,Bt,"⋉","\\ltimes",!0),kt(St,At,Bt,"⋊","\\rtimes",!0),kt(St,At,Bt,"⋋","\\leftthreetimes",!0),kt(St,At,Bt,"⋌","\\rightthreetimes",!0),kt(St,At,Bt,"⋏","\\curlywedge",!0),kt(St,At,Bt,"⋎","\\curlyvee",!0),kt(St,At,Bt,"⊝","\\circleddash",!0),kt(St,At,Bt,"⊛","\\circledast",!0),kt(St,At,Bt,"⋅","\\centerdot"),kt(St,At,Bt,"⊺","\\intercal",!0),kt(St,At,Bt,"⋒","\\doublecap"),kt(St,At,Bt,"⋓","\\doublecup"),kt(St,At,Bt,"⊠","\\boxtimes",!0),kt(St,At,Rt,"⇢","\\dashrightarrow",!0),kt(St,At,Rt,"⇠","\\dashleftarrow",!0),kt(St,At,Rt,"⇇","\\leftleftarrows",!0),kt(St,At,Rt,"⇆","\\leftrightarrows",!0),kt(St,At,Rt,"⇚","\\Lleftarrow",!0),kt(St,At,Rt,"↞","\\twoheadleftarrow",!0),kt(St,At,Rt,"↢","\\leftarrowtail",!0),kt(St,At,Rt,"↫","\\looparrowleft",!0),kt(St,At,Rt,"⇋","\\leftrightharpoons",!0),kt(St,At,Rt,"↶","\\curvearrowleft",!0),kt(St,At,Rt,"↺","\\circlearrowleft",!0),kt(St,At,Rt,"↰","\\Lsh",!0),kt(St,At,Rt,"⇈","\\upuparrows",!0),kt(St,At,Rt,"↿","\\upharpoonleft",!0),kt(St,At,Rt,"⇃","\\downharpoonleft",!0),kt(St,zt,Rt,"⊶","\\origof",!0),kt(St,zt,Rt,"⊷","\\imageof",!0),kt(St,At,Rt,"⊸","\\multimap",!0),kt(St,At,Rt,"↭","\\leftrightsquigarrow",!0),kt(St,At,Rt,"⇉","\\rightrightarrows",!0),kt(St,At,Rt,"⇄","\\rightleftarrows",!0),kt(St,At,Rt,"↠","\\twoheadrightarrow",!0),kt(St,At,Rt,"↣","\\rightarrowtail",!0),kt(St,At,Rt,"↬","\\looparrowright",!0),kt(St,At,Rt,"↷","\\curvearrowright",!0),kt(St,At,Rt,"↻","\\circlearrowright",!0),kt(St,At,Rt,"↱","\\Rsh",!0),kt(St,At,Rt,"⇊","\\downdownarrows",!0),kt(St,At,Rt,"↾","\\upharpoonright",!0),kt(St,At,Rt,"⇂","\\downharpoonright",!0),kt(St,At,Rt,"⇝","\\rightsquigarrow",!0),kt(St,At,Rt,"⇝","\\leadsto"),kt(St,At,Rt,"⇛","\\Rrightarrow",!0),kt(St,At,Rt,"↾","\\restriction"),kt(St,zt,Ot,"‘","`"),kt(St,zt,Ot,"$","\\$"),kt(Mt,zt,Ot,"$","\\$"),kt(Mt,zt,Ot,"$","\\textdollar"),kt(St,zt,Ot,"%","\\%"),kt(Mt,zt,Ot,"%","\\%"),kt(St,zt,Ot,"_","\\_"),kt(Mt,zt,Ot,"_","\\_"),kt(Mt,zt,Ot,"_","\\textunderscore"),kt(St,zt,Ot,"∠","\\angle",!0),kt(St,zt,Ot,"∞","\\infty",!0),kt(St,zt,Ot,"′","\\prime"),kt(St,zt,Ot,"△","\\triangle"),kt(St,zt,Ot,"Γ","\\Gamma",!0),kt(St,zt,Ot,"Δ","\\Delta",!0),kt(St,zt,Ot,"Θ","\\Theta",!0),kt(St,zt,Ot,"Λ","\\Lambda",!0),kt(St,zt,Ot,"Ξ","\\Xi",!0),kt(St,zt,Ot,"Π","\\Pi",!0),kt(St,zt,Ot,"Σ","\\Sigma",!0),kt(St,zt,Ot,"Υ","\\Upsilon",!0),kt(St,zt,Ot,"Φ","\\Phi",!0),kt(St,zt,Ot,"Ψ","\\Psi",!0),kt(St,zt,Ot,"Ω","\\Omega",!0),kt(St,zt,Ot,"A","Α"),kt(St,zt,Ot,"B","Β"),kt(St,zt,Ot,"E","Ε"),kt(St,zt,Ot,"Z","Ζ"),kt(St,zt,Ot,"H","Η"),kt(St,zt,Ot,"I","Ι"),kt(St,zt,Ot,"K","Κ"),kt(St,zt,Ot,"M","Μ"),kt(St,zt,Ot,"N","Ν"),kt(St,zt,Ot,"O","Ο"),kt(St,zt,Ot,"P","Ρ"),kt(St,zt,Ot,"T","Τ"),kt(St,zt,Ot,"X","Χ"),kt(St,zt,Ot,"¬","\\neg",!0),kt(St,zt,Ot,"¬","\\lnot"),kt(St,zt,Ot,"⊤","\\top"),kt(St,zt,Ot,"⊥","\\bot"),kt(St,zt,Ot,"∅","\\emptyset"),kt(St,At,Ot,"∅","\\varnothing"),kt(St,zt,Nt,"α","\\alpha",!0),kt(St,zt,Nt,"β","\\beta",!0),kt(St,zt,Nt,"γ","\\gamma",!0),kt(St,zt,Nt,"δ","\\delta",!0),kt(St,zt,Nt,"ϵ","\\epsilon",!0),kt(St,zt,Nt,"ζ","\\zeta",!0),kt(St,zt,Nt,"η","\\eta",!0),kt(St,zt,Nt,"θ","\\theta",!0),kt(St,zt,Nt,"ι","\\iota",!0),kt(St,zt,Nt,"κ","\\kappa",!0),kt(St,zt,Nt,"λ","\\lambda",!0),kt(St,zt,Nt,"μ","\\mu",!0),kt(St,zt,Nt,"ν","\\nu",!0),kt(St,zt,Nt,"ξ","\\xi",!0),kt(St,zt,Nt,"ο","\\omicron",!0),kt(St,zt,Nt,"π","\\pi",!0),kt(St,zt,Nt,"ρ","\\rho",!0),kt(St,zt,Nt,"σ","\\sigma",!0),kt(St,zt,Nt,"τ","\\tau",!0),kt(St,zt,Nt,"υ","\\upsilon",!0),kt(St,zt,Nt,"ϕ","\\phi",!0),kt(St,zt,Nt,"χ","\\chi",!0),kt(St,zt,Nt,"ψ","\\psi",!0),kt(St,zt,Nt,"ω","\\omega",!0),kt(St,zt,Nt,"ε","\\varepsilon",!0),kt(St,zt,Nt,"ϑ","\\vartheta",!0),kt(St,zt,Nt,"ϖ","\\varpi",!0),kt(St,zt,Nt,"ϱ","\\varrho",!0),kt(St,zt,Nt,"ς","\\varsigma",!0),kt(St,zt,Nt,"φ","\\varphi",!0),kt(St,zt,Bt,"∗","*",!0),kt(St,zt,Bt,"+","+"),kt(St,zt,Bt,"−","-",!0),kt(St,zt,Bt,"⋅","\\cdot",!0),kt(St,zt,Bt,"∘","\\circ",!0),kt(St,zt,Bt,"÷","\\div",!0),kt(St,zt,Bt,"±","\\pm",!0),kt(St,zt,Bt,"×","\\times",!0),kt(St,zt,Bt,"∩","\\cap",!0),kt(St,zt,Bt,"∪","\\cup",!0),kt(St,zt,Bt,"∖","\\setminus",!0),kt(St,zt,Bt,"∧","\\land"),kt(St,zt,Bt,"∨","\\lor"),kt(St,zt,Bt,"∧","\\wedge",!0),kt(St,zt,Bt,"∨","\\vee",!0),kt(St,zt,Ot,"√","\\surd"),kt(St,zt,It,"⟨","\\langle",!0),kt(St,zt,It,"∣","\\lvert"),kt(St,zt,It,"∥","\\lVert"),kt(St,zt,Ct,"?","?"),kt(St,zt,Ct,"!","!"),kt(St,zt,Ct,"⟩","\\rangle",!0),kt(St,zt,Ct,"∣","\\rvert"),kt(St,zt,Ct,"∥","\\rVert"),kt(St,zt,Rt,"=","="),kt(St,zt,Rt,":",":"),kt(St,zt,Rt,"≈","\\approx",!0),kt(St,zt,Rt,"≅","\\cong",!0),kt(St,zt,Rt,"≥","\\ge"),kt(St,zt,Rt,"≥","\\geq",!0),kt(St,zt,Rt,"←","\\gets"),kt(St,zt,Rt,">","\\gt",!0),kt(St,zt,Rt,"∈","\\in",!0),kt(St,zt,Rt,"","\\@not"),kt(St,zt,Rt,"⊂","\\subset",!0),kt(St,zt,Rt,"⊃","\\supset",!0),kt(St,zt,Rt,"⊆","\\subseteq",!0),kt(St,zt,Rt,"⊇","\\supseteq",!0),kt(St,At,Rt,"⊈","\\nsubseteq",!0),kt(St,At,Rt,"⊉","\\nsupseteq",!0),kt(St,zt,Rt,"⊨","\\models"),kt(St,zt,Rt,"←","\\leftarrow",!0),kt(St,zt,Rt,"≤","\\le"),kt(St,zt,Rt,"≤","\\leq",!0),kt(St,zt,Rt,"<","\\lt",!0),kt(St,zt,Rt,"→","\\rightarrow",!0),kt(St,zt,Rt,"→","\\to"),kt(St,At,Rt,"≱","\\ngeq",!0),kt(St,At,Rt,"≰","\\nleq",!0),kt(St,zt,Ht," ","\\ "),kt(St,zt,Ht," ","\\space"),kt(St,zt,Ht," ","\\nobreakspace"),kt(Mt,zt,Ht," ","\\ "),kt(Mt,zt,Ht," "," "),kt(Mt,zt,Ht," ","\\space"),kt(Mt,zt,Ht," ","\\nobreakspace"),kt(St,zt,Ht,null,"\\nobreak"),kt(St,zt,Ht,null,"\\allowbreak"),kt(St,zt,p0,",",","),kt(St,zt,p0,";",";"),kt(St,At,Bt,"⊼","\\barwedge",!0),kt(St,At,Bt,"⊻","\\veebar",!0),kt(St,zt,Bt,"⊙","\\odot",!0),kt(St,zt,Bt,"⊕","\\oplus",!0),kt(St,zt,Bt,"⊗","\\otimes",!0),kt(St,zt,Ot,"∂","\\partial",!0),kt(St,zt,Bt,"⊘","\\oslash",!0),kt(St,At,Bt,"⊚","\\circledcirc",!0),kt(St,At,Bt,"⊡","\\boxdot",!0),kt(St,zt,Bt,"△","\\bigtriangleup"),kt(St,zt,Bt,"▽","\\bigtriangledown"),kt(St,zt,Bt,"†","\\dagger"),kt(St,zt,Bt,"⋄","\\diamond"),kt(St,zt,Bt,"⋆","\\star"),kt(St,zt,Bt,"◃","\\triangleleft"),kt(St,zt,Bt,"▹","\\triangleright"),kt(St,zt,It,"{","\\{"),kt(Mt,zt,Ot,"{","\\{"),kt(Mt,zt,Ot,"{","\\textbraceleft"),kt(St,zt,Ct,"}","\\}"),kt(Mt,zt,Ot,"}","\\}"),kt(Mt,zt,Ot,"}","\\textbraceright"),kt(St,zt,It,"{","\\lbrace"),kt(St,zt,Ct,"}","\\rbrace"),kt(St,zt,It,"[","\\lbrack",!0),kt(Mt,zt,Ot,"[","\\lbrack",!0),kt(St,zt,Ct,"]","\\rbrack",!0),kt(Mt,zt,Ot,"]","\\rbrack",!0),kt(St,zt,It,"(","\\lparen",!0),kt(St,zt,Ct,")","\\rparen",!0),kt(Mt,zt,Ot,"<","\\textless",!0),kt(Mt,zt,Ot,">","\\textgreater",!0),kt(St,zt,It,"⌊","\\lfloor",!0),kt(St,zt,Ct,"⌋","\\rfloor",!0),kt(St,zt,It,"⌈","\\lceil",!0),kt(St,zt,Ct,"⌉","\\rceil",!0),kt(St,zt,Ot,"\\","\\backslash"),kt(St,zt,Ot,"∣","|"),kt(St,zt,Ot,"∣","\\vert"),kt(Mt,zt,Ot,"|","\\textbar",!0),kt(St,zt,Ot,"∥","\\|"),kt(St,zt,Ot,"∥","\\Vert"),kt(Mt,zt,Ot,"∥","\\textbardbl"),kt(Mt,zt,Ot,"~","\\textasciitilde"),kt(Mt,zt,Ot,"\\","\\textbackslash"),kt(Mt,zt,Ot,"^","\\textasciicircum"),kt(St,zt,Rt,"↑","\\uparrow",!0),kt(St,zt,Rt,"⇑","\\Uparrow",!0),kt(St,zt,Rt,"↓","\\downarrow",!0),kt(St,zt,Rt,"⇓","\\Downarrow",!0),kt(St,zt,Rt,"↕","\\updownarrow",!0),kt(St,zt,Rt,"⇕","\\Updownarrow",!0),kt(St,zt,qt,"∐","\\coprod"),kt(St,zt,qt,"⋁","\\bigvee"),kt(St,zt,qt,"⋀","\\bigwedge"),kt(St,zt,qt,"⨄","\\biguplus"),kt(St,zt,qt,"⋂","\\bigcap"),kt(St,zt,qt,"⋃","\\bigcup"),kt(St,zt,qt,"∫","\\int"),kt(St,zt,qt,"∫","\\intop"),kt(St,zt,qt,"∬","\\iint"),kt(St,zt,qt,"∭","\\iiint"),kt(St,zt,qt,"∏","\\prod"),kt(St,zt,qt,"∑","\\sum"),kt(St,zt,qt,"⨂","\\bigotimes"),kt(St,zt,qt,"⨁","\\bigoplus"),kt(St,zt,qt,"⨀","\\bigodot"),kt(St,zt,qt,"∮","\\oint"),kt(St,zt,qt,"∯","\\oiint"),kt(St,zt,qt,"∰","\\oiiint"),kt(St,zt,qt,"⨆","\\bigsqcup"),kt(St,zt,qt,"∫","\\smallint"),kt(Mt,zt,c0,"…","\\textellipsis"),kt(St,zt,c0,"…","\\mathellipsis"),kt(Mt,zt,c0,"…","\\ldots",!0),kt(St,zt,c0,"…","\\ldots",!0),kt(St,zt,c0,"⋯","\\@cdots",!0),kt(St,zt,c0,"⋱","\\ddots",!0),kt(St,zt,Ot,"⋮","\\varvdots"),kt(Mt,zt,Ot,"⋮","\\varvdots"),kt(St,zt,Tt,"ˊ","\\acute"),kt(St,zt,Tt,"ˋ","\\grave"),kt(St,zt,Tt,"¨","\\ddot"),kt(St,zt,Tt,"~","\\tilde"),kt(St,zt,Tt,"ˉ","\\bar"),kt(St,zt,Tt,"˘","\\breve"),kt(St,zt,Tt,"ˇ","\\check"),kt(St,zt,Tt,"^","\\hat"),kt(St,zt,Tt,"⃗","\\vec"),kt(St,zt,Tt,"˙","\\dot"),kt(St,zt,Tt,"˚","\\mathring"),kt(St,zt,Nt,"","\\@imath"),kt(St,zt,Nt,"","\\@jmath"),kt(St,zt,Ot,"ı","ı"),kt(St,zt,Ot,"ȷ","ȷ"),kt(Mt,zt,Ot,"ı","\\i",!0),kt(Mt,zt,Ot,"ȷ","\\j",!0),kt(Mt,zt,Ot,"ß","\\ss",!0),kt(Mt,zt,Ot,"æ","\\ae",!0),kt(Mt,zt,Ot,"œ","\\oe",!0),kt(Mt,zt,Ot,"ø","\\o",!0),kt(Mt,zt,Ot,"Æ","\\AE",!0),kt(Mt,zt,Ot,"Œ","\\OE",!0),kt(Mt,zt,Ot,"Ø","\\O",!0),kt(Mt,zt,Tt,"ˊ","\\'"),kt(Mt,zt,Tt,"ˋ","\\`"),kt(Mt,zt,Tt,"ˆ","\\^"),kt(Mt,zt,Tt,"˜","\\~"),kt(Mt,zt,Tt,"ˉ","\\="),kt(Mt,zt,Tt,"˘","\\u"),kt(Mt,zt,Tt,"˙","\\."),kt(Mt,zt,Tt,"¸","\\c"),kt(Mt,zt,Tt,"˚","\\r"),kt(Mt,zt,Tt,"ˇ","\\v"),kt(Mt,zt,Tt,"¨",'\\"'),kt(Mt,zt,Tt,"˝","\\H"),kt(Mt,zt,Tt,"◯","\\textcircled");let ee={"--":!0,"---":!0,"``":!0,"''":!0};kt(Mt,zt,Ot,"–","--",!0),kt(Mt,zt,Ot,"–","\\textendash"),kt(Mt,zt,Ot,"—","---",!0),kt(Mt,zt,Ot,"—","\\textemdash"),kt(Mt,zt,Ot,"‘","`",!0),kt(Mt,zt,Ot,"‘","\\textquoteleft"),kt(Mt,zt,Ot,"’","'",!0),kt(Mt,zt,Ot,"’","\\textquoteright"),kt(Mt,zt,Ot,"“","``",!0),kt(Mt,zt,Ot,"“","\\textquotedblleft"),kt(Mt,zt,Ot,"”","''",!0),kt(Mt,zt,Ot,"”","\\textquotedblright"),kt(St,zt,Ot,"°","\\degree",!0),kt(Mt,zt,Ot,"°","\\degree"),kt(Mt,zt,Ot,"°","\\textdegree",!0),kt(St,zt,Ot,"£","\\pounds"),kt(St,zt,Ot,"£","\\mathsterling",!0),kt(Mt,zt,Ot,"£","\\pounds"),kt(Mt,zt,Ot,"£","\\textsterling",!0),kt(St,At,Ot,"✠","\\maltese"),kt(Mt,At,Ot,"✠","\\maltese");for(let e=0;e<14;e++){var d0='0123456789/@."'.charAt(e);kt(St,zt,Ot,d0,d0)}for(let e=0;e<25;e++){var u0='0123456789!@*()-=+";:?/.,'.charAt(e);kt(Mt,zt,Ot,u0,u0)}var g0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<52;e++){var f0=g0.charAt(e);kt(St,zt,Nt,f0,f0),kt(Mt,zt,Ot,f0,f0)}kt(St,At,Ot,"C","ℂ"),kt(Mt,At,Ot,"C","ℂ"),kt(St,At,Ot,"H","ℍ"),kt(Mt,At,Ot,"H","ℍ"),kt(St,At,Ot,"N","ℕ"),kt(Mt,At,Ot,"N","ℕ"),kt(St,At,Ot,"P","ℙ"),kt(Mt,At,Ot,"P","ℙ"),kt(St,At,Ot,"Q","ℚ"),kt(Mt,At,Ot,"Q","ℚ"),kt(St,At,Ot,"R","ℝ"),kt(Mt,At,Ot,"R","ℝ"),kt(St,At,Ot,"Z","ℤ"),kt(Mt,At,Ot,"Z","ℤ"),kt(St,zt,Nt,"h","ℎ"),kt(Mt,zt,Nt,"h","ℎ");let t="";for(let e=0;e<52;e++){var Et=g0.charAt(e);kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56320+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56372+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56424+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56580+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56684+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56736+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56788+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56840+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56944+e)),kt(Mt,zt,Ot,Et,t),e<26&&(kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56632+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56476+e)),kt(Mt,zt,Ot,Et,t))}kt(St,zt,Nt,"k",t=String.fromCharCode(55349,56668)),kt(Mt,zt,Ot,"k",t);for(let e=0;e<10;e++){var b0=e.toString();kt(St,zt,Nt,b0,t=String.fromCharCode(55349,57294+e)),kt(Mt,zt,Ot,b0,t),kt(St,zt,Nt,b0,t=String.fromCharCode(55349,57314+e)),kt(Mt,zt,Ot,b0,t),kt(St,zt,Nt,b0,t=String.fromCharCode(55349,57324+e)),kt(Mt,zt,Ot,b0,t),kt(St,zt,Nt,b0,t=String.fromCharCode(55349,57334+e)),kt(Mt,zt,Ot,b0,t)}for(let e=0;e<3;e++){var y0="ÐÞþ".charAt(e);kt(St,zt,Nt,y0,y0),kt(Mt,zt,Ot,y0,y0)}function x0(e,t,r){return{value:e=vt[r][e]&&vt[r][e].replace?vt[r][e].replace:e,metrics:r0(e,t,r)}}function Lt(t,e,r,n,a){let i=x0(t,e,r),o=i.metrics,s;if(t=i.value,o){let e=o.italic;("text"===r||n&&"mathit"===n.font)&&(e=0),s=new jt(t,o.height,o.depth,e,o.skew,o.width,a)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+r+"'"),s=new jt(t,0,0,0,0,0,a);return n&&(s.maxFontSize=n.sizeMultiplier,n.style.isTight()&&s.classes.push("mtight"),e=n.getColor())&&(s.style.color=e),s}function w0(t){let r=0,n=0,a=0;for(let e=0;e<t.children.length;e++){var i=t.children[e];i.height>r&&(r=i.height),i.depth>n&&(n=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=a}function Dt(e,t,r,n){return w0(e=new vr(e,t,r,n)),e}function v0(e){return w0(e=new xr(e)),e}function k0(e,t,r){let n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")}let c=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],te=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],re=(e,t,r,n)=>new vr(e,t,r,n),ne={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},ae={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var Pt={fontMap:ne,makeSymbol:Lt,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&x0(e,"Main-Bold",t).metrics?Lt(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===vt[t][e].font?Lt(e,"Main-Regular",t,r,n):Lt(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:Dt,makeSvgSpan:re,makeLineSpan:function(e,t,r){return(e=Dt([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=D(e.height),e.maxFontSize=1,e},makeAnchor:function(e,t,r,n){return w0(e=new kr(e,t,r,n)),e},makeFragment:v0,wrapFragment:function(e,t){return e instanceof xr?Dt([],[e],t):e},makeVList:function(e,t){let{children:r,depth:n}=(a=>{if("individualShift"===a.positionType){let t=a.children,r=[t[0]],e=-t[0].shift-t[0].elem.depth,n=e;for(let e=1;e<t.length;e++){var i=-t[e].shift-n-t[e].elem.depth,o=i-(t[e-1].elem.height+t[e-1].elem.depth);n+=i,r.push({type:"kern",size:o}),r.push(t[e])}return{children:r,depth:e}}let e;if("top"===a.positionType){let t=a.positionData;for(let e=0;e<a.children.length;e++){var r=a.children[e];t-="kern"===r.type?r.size:r.elem.height+r.elem.depth}e=t}else if("bottom"===a.positionType)e=-a.positionData;else{var t=a.children[0];if("elem"!==t.type)throw new Error('First child must have type "elem".');if("shift"===a.positionType)e=-t.elem.depth-a.positionData;else{if("firstBaseline"!==a.positionType)throw new Error("Invalid positionType "+a.positionType+".");e=-t.elem.depth}}return{children:a.children,depth:e}})(e),a=0;for(let e=0;e<r.length;e++){var i=r[e];"elem"===i.type&&(i=i.elem,a=Math.max(a,i.maxFontSize,i.height))}a+=2;let o=Dt(["pstrut"],[]),s=(o.style.height=D(a),[]),l=n,h=n,m=n;for(let e=0;e<r.length;e++){var c,p,d=r[e];"kern"===d.type?m+=d.size:(c=d.elem,(p=Dt(d.wrapperClasses||[],[o,c],void 0,d.wrapperStyle||{})).style.top=D(-a-m-c.depth),d.marginLeft&&(p.style.marginLeft=d.marginLeft),d.marginRight&&(p.style.marginRight=d.marginRight),s.push(p),m+=c.height+c.depth),l=Math.min(l,m),h=Math.max(h,m)}var u,g,f=Dt(["vlist"],s);return f.style.height=D(h),g=l<0?(u=Dt([],[]),(u=Dt(["vlist"],[u])).style.height=D(-l),g=Dt(["vlist-s"],[new jt("")]),[Dt(["vlist-r"],[f,g]),Dt(["vlist-r"],[u])]):[Dt(["vlist-r"],[f])],e=Dt(["vlist-t"],g),2===g.length&&e.classes.push("vlist-t2"),e.height=h,e.depth=-l,e},makeOrd:function(e,n,a){let i=e.mode,o=e.text,s=["mord"],l=(e="math"===i||"text"===i&&n.font)?n.font:n.fontFamily,t="",r="";if(55349===o.charCodeAt(0)&&([t,r]=((e,t)=>{var r,n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,t="math"===t?0:1;if(119808<=n&&n<120484)return r=Math.floor((n-119808)/26),[c[r][2],c[r][t]];if(120782<=n&&n<=120831)return r=Math.floor((n-120782)/10),[te[r][2],te[r][t]];if(120485==n||120486==n)return[c[0][2],c[0][t]];if(120486<n&&n<120782)return["",""];throw new ft("Unsupported character: "+e)})(o,i)),0<t.length)return Lt(o,t,i,n,s.concat(r));if(l){let t,r;if(r="boldsymbol"===l?(m="textord"!==a&&x0(o,"Math-BoldItalic",i).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"},t=m.fontName,[m.fontClass]):e?(t=ne[l].fontName,[l]):(t=k0(l,n.fontWeight,n.fontShape),[l,n.fontWeight,n.fontShape]),x0(o,t,i).metrics)return Lt(o,t,i,n,s.concat(r));if(ee.hasOwnProperty(o)&&"Typewriter"===t.slice(0,10)){var h=[];for(let e=0;e<o.length;e++)h.push(Lt(o[e],t,i,n,s.concat(r)));return v0(h)}}if("mathord"===a)return Lt(o,"Math-Italic",i,n,s.concat(["mathnormal"]));if("textord"!==a)throw new Error("unexpected type: "+a+" in makeOrd");var m=vt[i][o]&&vt[i][o].font;return"ams"===m?Lt(o,k0("amsrm",n.fontWeight,n.fontShape),i,n,s.concat("amsrm",n.fontWeight,n.fontShape)):"main"!==m&&m?Lt(o,e=k0(m,n.fontWeight,n.fontShape),i,n,s.concat(e,n.fontWeight,n.fontShape)):Lt(o,k0("textrm",n.fontWeight,n.fontShape),i,n,s.concat(n.fontWeight,n.fontShape))},makeGlue:(e,t)=>{var r=Dt(["mspace"],[],t),e=wt(e,t);return r.style.marginRight=D(e),r},staticSvg:function(e,t){var[e,r,n]=ae[e],e=new zr(e),e=new Mr([e],{width:D(r),height:D(n),style:"width:"+D(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(e=re(["overlay"],[e],t)).height=n,e.style.height=D(n),e.style.width=D(r),e},svgData:ae,tryCombineChars:t=>{for(let e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof jt&&n instanceof jt&&((e,t)=>{if(o0(e.classes)!==o0(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0})(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t}};let h={number:3,unit:"mu"},m={number:4,unit:"mu"},p={number:5,unit:"mu"},ie={mord:{mop:h,mbin:m,mrel:p,minner:h},mop:{mord:h,mop:h,mrel:p,minner:h},mbin:{mord:m,mop:m,mopen:m,minner:m},mrel:{mord:p,mop:p,mopen:p,minner:p},mopen:{},mclose:{mop:h,mbin:m,mrel:p,minner:h},mpunct:{mord:h,mop:h,mrel:p,mopen:h,mclose:h,mpunct:h,minner:h},minner:{mord:h,mop:h,mbin:m,mrel:p,mopen:h,mpunct:h,minner:h}},oe={mord:{mop:h},mop:{mord:h,mop:h},mbin:{},mrel:{},mopen:{},mclose:{mop:h},mpunct:{},minner:{mop:h}},se={},d={},u={};function Vt(e){var{type:e,names:t,props:r,handler:n,htmlBuilder:a,mathmlBuilder:i}=e,o={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n};for(let e=0;e<t.length;++e)se[t[e]]=o;e&&(a&&(d[e]=a),i)&&(u[e]=i)}function S0(e){var{type:e,htmlBuilder:t,mathmlBuilder:r}=e;Vt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:r})}function M0(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e}function Ft(e){return"ordgroup"===e.type?e.body:[e]}function Gt(t,r,e,a){void 0===a&&(a=[null,null]);var i=[];for(let e=0;e<t.length;e++){var n,o=P(t[e],r);o instanceof xr?(n=o.children,i.push(...n)):i.push(o)}if(Pt.tryCombineChars(i),e){let n=r;1===t.length&&("sizing"===(s=t[0]).type?n=r.havingSize(s.size):"styling"===s.type&&(n=r.havingStyle(me[s.style])));var s=g([a[0]||"leftmost"],[],r),a=g([a[1]||"rightmost"],[],r),e="root"===e;f(i,(e,t)=>{var r=t.classes[0],n=e.classes[0];"mbin"===r&&bt.contains(he,n)?t.classes[0]="mord":"mbin"===n&&bt.contains(le,r)&&(e.classes[0]="mord")},{node:s},a,e),f(i,(e,t)=>{var t=y(t),r=y(e);if(e=t&&r?(e.hasClass("mtight")?oe:ie)[t][r]:null)return Pt.makeGlue(e,n)},{node:s},a,e)}return i}function z0(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),g(t.concat(e))}let g=Pt.makeSpan,le=["leftmost","mbin","mopen","mrel","mop","mpunct"],he=["rightmost","mrel","mclose","mpunct"],me={display:yt.DISPLAY,text:yt.TEXT,script:yt.SCRIPT,scriptscript:yt.SCRIPTSCRIPT},ce={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},f=function(r,e,t,n,a){n&&r.push(n);let i=0;for(;i<r.length;i++){var o,s=r[i],l=pe(s);l?f(l.children,e,t,null,a):((l=!s.hasClass("mspace"))&&(o=e(s,t.node))&&(t.insertAfter?t.insertAfter(o):(r.unshift(o),i++)),l?t.node=s:a&&s.hasClass("newline")&&(t.node=g(["leftmost"])),t.insertAfter=(t=>e=>{r.splice(t+1,0,e),i++})(i))}n&&r.pop()},pe=function(e){return e instanceof xr||e instanceof kr||e instanceof vr&&e.hasClass("enclosing")?e:null},b=function(e,t){var r=pe(e);if(r&&(r=r.children).length){if("right"===t)return b(r[r.length-1],"right");if("left"===t)return b(r[0],"left")}return e},y=function(e,t){return e&&(t&&(e=b(e,t)),ce[e.classes[0]])||null},P=function(t,r,n){if(!t)return g();if(d[t.type]){let e=d[t.type](t,r);return n&&r.size!==n.size&&(e=g(r.sizingClasses(n),[e],r),r=r.sizeMultiplier/n.sizeMultiplier,e.height*=r,e.depth*=r),e}throw new ft("Got group of unknown type: '"+t.type+"'")};function A0(e,t){return e=g(["base"],e,t),(t=g(["strut"])).style.height=D(e.height+e.depth),e.depth&&(t.style.verticalAlign=D(-e.depth)),e.children.unshift(t),e}function T0(e,r){let t=null,n=(1===e.length&&"tag"===e[0].type&&(t=e[0].tag,e=e[0].body),Gt(e,r,"root")),a,i=(2===n.length&&n[1].hasClass("tag")&&(a=n.pop()),[]),o,s=[];for(let t=0;t<n.length;t++)if(s.push(n[t]),n[t].hasClass("mbin")||n[t].hasClass("mrel")||n[t].hasClass("allowbreak")){let e=!1;for(;t<n.length-1&&n[t+1].hasClass("mspace")&&!n[t+1].hasClass("newline");)t++,s.push(n[t]),n[t].hasClass("nobreak")&&(e=!0);e||(i.push(A0(s,r)),s=[])}else n[t].hasClass("newline")&&(s.pop(),0<s.length&&(i.push(A0(s,r)),s=[]),i.push(n[t]));var l;return 0<s.length&&i.push(A0(s,r)),t?((o=A0(Gt(t,r,!0))).classes=["tag"],i.push(o)):a&&i.push(a),(e=g(["katex-html"],i)).setAttribute("aria-hidden","true"),o&&((l=o.children[0]).style.height=D(e.height+e.depth),e.depth)&&(l.style.verticalAlign=D(-e.depth)),e}function B0(e){return new xr(e)}class _t{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e,r=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&r.setAttribute(e,this.attributes[e]);0<this.classes.length&&(r.className=o0(this.classes));for(let t=0;t<this.children.length;t++)if(this.children[t]instanceof $t&&this.children[t+1]instanceof $t){let e=this.children[t].toText()+this.children[++t].toText();for(;this.children[t+1]instanceof $t;)e+=this.children[++t].toText();r.appendChild(new $t(e).toNode())}else r.appendChild(this.children[t].toNode());return r}toMarkup(){let t="<"+this.type;for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=bt.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+bt.escape(o0(this.classes))+'"'),t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}}class $t{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return bt.escape(this.toText())}toText(){return this.text}}var Ut={MathNode:_t,TextNode:$t,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?" ":.1666<=e&&e<=.1667?" ":.2222<=e&&e<=.2223?" ":.2777<=e&&e<=.2778?" ":-.05556<=e&&e<=-.05555?" ":-.1667<=e&&e<=-.1666?" ":-.2223<=e&&e<=-.2222?" ":-.2778<=e&&e<=-.2777?" ":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",D(this.width)),e)}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+D(this.width)+'"/>'}toText(){return this.character||" "}},newDocumentFragment:B0};function Yt(e,t,r){return!vt[t][e]||!vt[t][e].replace||55349===e.charCodeAt(0)||ee.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=vt[t][e].replace),new Ut.TextNode(e)}function C0(e){return 1===e.length?e[0]:new Ut.MathNode("mrow",e)}function N0(e,t){var r;return"texttt"===t.fontFamily?"monospace":"textsf"===t.fontFamily?"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif":"textit"===t.fontShape&&"textbf"===t.fontWeight?"bold-italic":"textit"===t.fontShape?"italic":"textbf"===t.fontWeight?"bold":(t=t.font)&&"mathnormal"!==t?(r=e.mode,"mathit"===t?"italic":"boldsymbol"===t?"textord"===e.type?"bold":"bold-italic":"mathbf"===t?"bold":"mathbb"===t?"double-struck":"mathsfit"===t?"sans-serif-italic":"mathfrak"===t?"fraktur":"mathscr"===t||"mathcal"===t?"script":"mathsf"===t?"sans-serif":"mathtt"===t?"monospace":!bt.contains(["\\imath","\\jmath"],e=e.text)&&r0(e=vt[r][e]&&vt[r][e].replace?vt[r][e].replace:e,Pt.fontMap[t].fontName,r)?Pt.fontMap[t].variant:null):null}function q0(e){var t;return e&&("mi"===e.type&&1===e.children.length?(t=e.children[0])instanceof $t&&"."===t.text:"mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")&&(t=e.children[0])instanceof $t&&","===t.text)}function I0(e,t,r){return C0(x(e,t,r))}let x=function(t,r,e){var n;if(1===t.length)return n=w(t[0],r),e&&n instanceof _t&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];let a=[],i;for(let e=0;e<t.length;e++){var o,s,l=w(t[e],r);if(l instanceof _t&&i instanceof _t){if("mtext"===l.type&&"mtext"===i.type&&l.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...l.children);continue}if("mn"===l.type&&"mn"===i.type){i.children.push(...l.children);continue}if(q0(l)&&"mn"===i.type){i.children.push(...l.children);continue}"mn"===l.type&&q0(i)?(l.children=[...i.children,...l.children],a.pop()):("msup"===l.type||"msub"===l.type)&&1<=l.children.length&&("mn"===i.type||q0(i))?(o=l.children[0])instanceof _t&&"mn"===o.type&&(o.children=[...i.children,...o.children],a.pop()):"mi"===i.type&&1===i.children.length&&(o=i.children[0])instanceof $t&&"̸"===o.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)&&(s=l.children[0])instanceof $t&&0<s.text.length&&(s.text=s.text.slice(0,1)+"̸"+s.text.slice(1),a.pop())}a.push(l),i=l}return a},w=function(e,t){if(!e)return new Ut.MathNode("mrow");if(u[e.type])return u[e.type](e,t);throw new ft("Got group of unknown type: '"+e.type+"'")};function R0(e,t,r,n,a){return r=1===(e=x(e,r)).length&&e[0]instanceof _t&&bt.contains(["mrow","mtable"],e[0].type)?e[0]:new Ut.MathNode("mrow",e),(e=new Ut.MathNode("annotation",[new Ut.TextNode(t)])).setAttribute("encoding","application/x-tex"),t=new Ut.MathNode("semantics",[r,e]),(r=new Ut.MathNode("math",[t])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&r.setAttribute("display","block"),Pt.makeSpan([e=a?"katex":"katex-mathml"],[r])}let de=function(e){return new a0({style:e.displayMode?yt.DISPLAY:yt.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ue=function(e,t){var r;return t.displayMode&&(r=["katex-display"],t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Pt.makeSpan(r,[e])),e},ge={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},fe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]};function H0(e){return(e=new Ut.MathNode("mo",[new Ut.TextNode(ge[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e}function O0(i,p){var{span:e,minWidth:t,height:r}=(()=>{let h=4e5,m=i.label.slice(1);if(bt.contains(["widehat","widecheck","widetilde","utilde"],m)){var n,a="ordgroup"===(a=i.base).type?a.body.length:1;let e,t,r;return t=5<a?"widehat"===m||"widecheck"===m?(e=420,h=2364,r=.42,m+"4"):(e=312,h=2340,r=.34,"tilde4"):(n=[1,1,2,2,3,3][a],"widehat"===m||"widecheck"===m?(h=[0,1062,2364,2364,2364][n],e=[0,239,300,360,420][n],r=[0,.24,.3,.3,.36,.42][n],m+n):(h=[0,600,1033,2339,2340][n],e=[0,260,286,306,312][n],r=[0,.26,.286,.3,.306,.34][n],"tilde"+n)),a=new zr(t),a=new Mr([a],{width:"100%",height:D(r),viewBox:"0 0 "+h+" "+e,preserveAspectRatio:"none"}),{span:Pt.makeSvgSpan([],[a],p),minWidth:0,height:r}}{let t=[],e=fe[m],[r,n,a]=e,i=a/1e3,o=r.length,s,l;if(1===o)s=["hide-tail"],l=[e[3]];else if(2===o)s=["halfarrow-left","halfarrow-right"],l=["xMinYMin","xMaxYMin"];else{if(3!==o)throw new Error("Correct katexImagesData or update code here to support\n "+o+" children.");s=["brace-left","brace-center","brace-right"],l=["xMinYMin","xMidYMin","xMaxYMin"]}for(let e=0;e<o;e++){var c=new zr(r[e]),c=new Mr([c],{width:"400em",height:D(i),viewBox:"0 0 "+h+" "+a,preserveAspectRatio:l[e]+" slice"}),c=Pt.makeSvgSpan([s[e]],[c],p);if(1===o)return{span:c,minWidth:n,height:i};c.style.height=D(i),t.push(c)}return{span:Pt.makeSpan(["stretchy"],t,p),minWidth:n,height:i}}})();return e.height=r,e.style.height=D(r),0<t&&(e.style.minWidth=D(t)),e}function Xt(e,t){if(e&&e.type===t)return e;throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)))}function E0(e){var t=L0(e);if(t)return t;throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)))}function L0(e){return e&&("atom"===e.type||Q.hasOwnProperty(e.type))?e:null}let v=(a,i)=>{let e,o,t,s=(a&&"supsub"===a.type?(o=Xt(a.base,"accent"),e=o.base,a.base=e,t=(e=>{if(e instanceof vr)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")})(P(a,i)),a.base=o):(o=Xt(a,"accent"),e=o.base),a=P(e,i.havingCrampedStyle()),0);o.isShifty&&bt.isCharacterBox(e)&&(l=bt.getBaseElem(e),s=m0(P(l,i.havingCrampedStyle())).skew);var l="\\c"===o.label;let h,m=l?a.height+a.depth:Math.min(a.height,i.fontMetrics().xHeight);if(o.isStretchy)h=O0(o,i),h=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:0<s?{width:"calc(100% - "+D(2*s)+")",marginLeft:D(2*s)}:void 0}]},i);else{let e,t,r=("\\vec"===o.label?(e=Pt.staticSvg("vec",i),t=Pt.svgData.vec[1]):((e=m0(e=Pt.makeOrd({mode:o.mode,text:o.label},i,"textord"))).italic=0,t=e.width,l&&(m+=e.depth)),h=Pt.makeSpan(["accent-body"],[e]),"\\textcircled"===o.label),n=(r&&(h.classes.push("accent-full"),m=a.height),s);r||(n-=t/2),h.style.left=D(n),"\\textcircled"===o.label&&(h.style.top=".2em"),h=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-m},{type:"elem",elem:h}]},i)}return l=Pt.makeSpan(["mord","accent"],[h],i),t?(t.children[0]=l,t.height=Math.max(l.height,t.height),t.classes[0]="mord",t):l},be=(e,t)=>{var r=e.isStretchy?H0(e.label):new Ut.MathNode("mo",[Yt(e.label,e.mode)]);return(e=new Ut.MathNode("mover",[w(e.base,t),r])).setAttribute("accent","true"),e},ye=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),k=(Vt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var t=M0(t[0]),r=!ye.test(e.funcName),n=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:n,base:t}},htmlBuilder:v,mathmlBuilder:be}),Vt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{t=t[0];let r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:v,mathmlBuilder:be}),Vt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:r,base:t}},htmlBuilder:(e,t)=>{var r=P(e.base,t),n=O0(e,t),n=Pt.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:"\\utilde"===e.label?.12:0},{type:"elem",elem:r}]},t);return Pt.makeSpan(["mord","accentunder"],[n],t)},mathmlBuilder:(e,t)=>{var r=H0(e.label);return(e=new Ut.MathNode("munder",[w(e.base,t),r])).setAttribute("accentunder","true"),e}}),e=>((e=new Ut.MathNode("mpadded",e?[e]:[])).setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e)),xe=(Vt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:e,funcName:n}=e;return{type:"xArrow",mode:e.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),a=Pt.wrapFragment(P(e.body,n,t),t),i="\\x"===e.label.slice(0,2)?"x":"cd";let o;a.classes.push(i+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),(o=Pt.wrapFragment(P(e.below,n,t),t)).classes.push(i+"-arrow-pad")),r=O0(e,t),n=-t.fontMetrics().axisHeight+.5*r.height;let s,l=-t.fontMetrics().axisHeight-.5*r.height-.111;return(.25<a.depth||"\\xleftequilibrium"===e.label)&&(l-=a.depth),(s=o?(i=-t.fontMetrics().axisHeight+o.height+.5*r.height+.111,Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:r,shift:n},{type:"elem",elem:o,shift:i}]},t)):Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:r,shift:n}]},t)).children[0].children[0].children[1].classes.push("svg-align"),Pt.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,n,a=H0(e.label);let i;return a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),i=e.body?(r=k(w(e.body,t)),e.below?(n=k(w(e.below,t)),new Ut.MathNode("munderover",[a,n,r])):new Ut.MathNode("mover",[a,r])):e.below?(n=k(w(e.below,t)),new Ut.MathNode("munder",[a,n])):(i=k(),new Ut.MathNode("mover",[a,i]))}}),Pt.makeSpan);function D0(e,t){var r=Gt(e.body,t,!0);return xe([e.mclass],r,t)}function P0(e,t){let r;return t=x(e.body,t),"minner"===e.mclass?r=new Ut.MathNode("mpadded",t):"mord"===e.mclass?e.isCharacterBox?(r=t[0]).type="mi":r=new Ut.MathNode("mi",t):(e.isCharacterBox?(r=t[0]).type="mo":r=new Ut.MathNode("mo",t),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}Vt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"mclass",mode:e.mode,mclass:"m"+r.slice(5),body:Ft(t),isCharacterBox:bt.isCharacterBox(t)}},htmlBuilder:D0,mathmlBuilder:P0});let S=e=>"atom"!==(e="ordgroup"===e.type&&e.body.length?e.body[0]:e).type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family,we=(Vt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){return{type:"mclass",mode:(e=e.parser).mode,mclass:S(t[0]),body:Ft(t[1]),isCharacterBox:bt.isCharacterBox(t[1])}}}),Vt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:r}=e,n=t[1],t=t[0],a="\\stackrel"!==r?S(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:Ft(n)},n={type:"supsub",mode:t.mode,base:n,sup:"\\underset"===r?null:t,sub:"\\underset"===r?t:null};return{type:"mclass",mode:e.mode,mclass:a,body:[n],isCharacterBox:bt.isCharacterBox(n)}},htmlBuilder:D0,mathmlBuilder:P0}),Vt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:S(t[0]),body:Ft(t[0])}},htmlBuilder(e,t){var r=Gt(e.body,t,!0);return(e=Pt.makeSpan([e.mclass],r,t)).style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){return e=x(e.body,t),(t=new Ut.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),{">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"}),ve=e=>"textord"===e.type&&"@"===e.text;function V0(e,t,r){if(r=r0(vt.math[e]&&vt.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")}function F0(e,t,r,n){return t=r.havingBaseStyle(t),n=Pt.makeSpan(n.concat(t.sizingClasses(r)),[e],r),e=t.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e,n.maxFontSize=t.sizeMultiplier,n}function G0(e,t,r){r=t.havingBaseStyle(r),r=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=D(r),e.height-=r,e.depth+=r}function U0(e,t,r,n,a,i){return e=Pt.makeSymbol(e,"Size"+t+"-Regular",a,n),a=F0(Pt.makeSpan(["delimsizing","size"+t],[e],n),yt.TEXT,n,i),r&&G0(a,n,yt.TEXT),a}function Y0(e,t,r){return{type:"elem",elem:Pt.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Pt.makeSpan([],[Pt.makeSymbol(e,t,r)])])}}function X0(e,t,r){var n=(xt["Size4-Regular"][e.charCodeAt(0)]?xt["Size4-Regular"]:xt["Size1-Regular"])[e.charCodeAt(0)][4],e=new zr("inner",((e,t)=>{switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}})(e,Math.round(1e3*t))),e=new Mr([e],{width:D(n),height:D(t),style:"width:"+D(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=Pt.makeSvgSpan([],[e],r)).height=t,e.style.height=D(t),e.style.width=D(n),{type:"elem",elem:e}}function W0(e,t,r,n,a,i){let o,s,l,h,m="",c=0,p=(o=l=h=e,s=null,"Size1-Regular");"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",h="\\Downarrow"):bt.contains(Me,e)?(l="∣",m="vert",c=333):bt.contains(ze,e)?(l="∥",m="doublevert",c=556):"["===e||"\\lbrack"===e?(o="⎡",l="⎢",h="⎣",p="Size4-Regular",m="lbrack",c=667):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",h="⎦",p="Size4-Regular",m="rbrack",c=667):"\\lfloor"===e||"⌊"===e?(l=o="⎢",h="⎣",p="Size4-Regular",m="lfloor",c=667):"\\lceil"===e||"⌈"===e?(o="⎡",l=h="⎢",p="Size4-Regular",m="lceil",c=667):"\\rfloor"===e||"⌋"===e?(l=o="⎥",h="⎦",p="Size4-Regular",m="rfloor",c=667):"\\rceil"===e||"⌉"===e?(o="⎤",l=h="⎥",p="Size4-Regular",m="rceil",c=667):"("===e||"\\lparen"===e?(o="⎛",l="⎜",h="⎝",p="Size4-Regular",m="lparen",c=875):")"===e||"\\rparen"===e?(o="⎞",l="⎟",h="⎠",p="Size4-Regular",m="rparen",c=875):"\\{"===e||"\\lbrace"===e?(o="⎧",s="⎨",h="⎩",l="⎪",p="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",s="⎬",h="⎭",l="⎪",p="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",h="⎩",l="⎪",p="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",h="⎭",l="⎪",p="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",h="⎭",l="⎪",p="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",h="⎩",l="⎪",p="Size4-Regular");var d=(e=V0(o,p,a)).height+e.depth,e=(e=V0(l,p,a)).height+e.depth,u=(u=V0(h,p,a)).height+u.depth;let g=0,f=1;null!==s&&(b=V0(s,p,a),g=b.height+b.depth,f=2);var b=(b=d+u+g)+Math.max(0,Math.ceil((t-b)/(f*e)))*f*e;let y=n.fontMetrics().axisHeight;r&&(y*=n.sizeMultiplier);var x,w,v,k,t=b/2-y,S=[];return 0<m.length?(v=b-d-u,k=Math.round(1e3*b),v=((e,t)=>{switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}})(m,Math.round(1e3*v)),v=new zr(m,v),x=(c/1e3).toFixed(3)+"em",w=(k/1e3).toFixed(3)+"em",v=new Mr([v],{width:x,height:w,viewBox:"0 0 "+c+" "+k}),(v=Pt.makeSvgSpan([],[v],n)).height=k/1e3,v.style.width=x,v.style.height=w,S.push({type:"elem",elem:v})):(S.push(Y0(h,p,a)),S.push(z),null===s?S.push(X0(l,b-d-u+.016,n)):(k=(b-d-u-g)/2+.016,S.push(X0(l,k,n)),S.push(z),S.push(Y0(s,p,a)),S.push(z),S.push(X0(l,k,n))),S.push(z),S.push(Y0(o,p,a))),e=n.havingBaseStyle(yt.TEXT),r=Pt.makeVList({positionType:"bottom",positionData:t,children:S},e),F0(Pt.makeSpan(["delimsizing","mult"],[r],e),yt.TEXT,n,i)}function j0(o,e,t,r,n){return r=((e,t)=>{e*=1e3;let r="";switch(o){case"sqrtMain":r="M95,"+(622+(i=e)+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+i/2.075+" -"+i+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+i)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+i)+" 80h400000v"+(40+i)+"h-400000z";break;case"sqrtSize1":r="M263,"+(601+(i=e)+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+i/2.084+" -"+i+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+i)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+i)+" 80h400000v"+(40+i)+"h-400000z";break;case"sqrtSize2":r="M983 "+(10+(a=e)+80)+"\nl"+a/3.13+" -"+a+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+a)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+a)+" 80h400000v"+(40+a)+"h-400000z";break;case"sqrtSize3":r="M424,"+(2398+(a=e)+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+a/4.223+" -"+a+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+a)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+a)+" 80\nh400000v"+(40+a)+"h-400000z";break;case"sqrtSize4":r="M473,"+(2713+(n=e)+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+n/5.298+" -"+n+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+n)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+n)+" 80h400000v"+(40+n)+"H1017.7z";break;case"sqrtTall":r="M702 "+(80+(n=e))+"H400000"+(40+n)+"\nH742v"+(t-54-80-n)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+n)+"H742z"}var n,a,i;return r})(r,t),r=new zr(o,r),r=new Mr([r],{width:"400em",height:D(e),viewBox:"0 0 400000 "+t,preserveAspectRatio:"xMinYMin slice"}),Pt.makeSvgSpan(["hide-tail"],[r],n)}function _0(n,a,i,o){for(let r=Math.min(2,3-o.style.size);r<i.length&&"stack"!==i[r].type;r++){let e=V0(n,(e=>{if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")})(i[r]),"math"),t=e.height+e.depth;if("small"===i[r].type&&(t*=o.havingBaseStyle(i[r].style).sizeMultiplier),t>a)return i[r]}return i[i.length-1]}function $0(e,t,r,n,a,i){var o,s,l,h,m,c;return"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),"small"===(c=_0(e,t,bt.contains(Be,e)?Ce:bt.contains(Ae,e)?qe:Ne,n)).type?(o=e,s=c.style,l=r,m=i,o=F0(Pt.makeSymbol(o,"Main-Regular",a,h=n),s,h,m),l&&G0(o,h,s),o):"large"===c.type?U0(e,c.size,r,n,a,i):W0(e,t,r,n,a,i)}Vt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"cdlabel",mode:e.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup());return(r=Pt.wrapFragment(P(e.label,r,t),t)).classes.push("cd-label-"+e.side),r.style.bottom=D(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){let r=new Ut.MathNode("mrow",[w(e.label,t)]);return(r=new Ut.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Ut.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),Vt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){return{type:"cdlabelparent",mode:(e=e.parser).mode,fragment:t[0]}},htmlBuilder(e,t){return(e=Pt.wrapFragment(P(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new Ut.MathNode("mrow",[w(e.fragment,t)])}}),Vt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){var e=e.parser,r=Xt(t[0],"ordgroup").body;let n="";for(let e=0;e<r.length;e++)n+=Xt(r[e],"textord").text;if(t=parseInt(n),isNaN(t))throw new ft("\\@char has non-numeric argument "+n);if(t<0||1114111<=t)throw new ft("\\@char with invalid code point "+n);return t=t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),Vt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e.parser,r=Xt(t[0],"color-token").color,t=t[1];return{type:"color",mode:e.mode,color:r,body:Ft(t)}},htmlBuilder:Ht=(e,t)=>(t=Gt(e.body,t.withColor(e.color),!1),Pt.makeFragment(t)),mathmlBuilder:p0=(e,t)=>(t=x(e.body,t.withColor(e.color)),(t=new Ut.MathNode("mstyle",t)).setAttribute("mathcolor",e.color),t)}),Vt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Xt(t[0],"color-token").color,r=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,r));return{type:"color",mode:e.mode,color:t,body:r}},htmlBuilder:Ht,mathmlBuilder:p0}),Vt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var n="["===(e=e.parser).gullet.future().text?e.parseSizeGroup(!0):null,a=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:a,size:n&&Xt(n,"size").value}},htmlBuilder(e,t){var r=Pt.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size)&&(r.style.marginTop=D(wt(e.size,t))),r},mathmlBuilder(e,t){var r=new Ut.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",D(wt(e.size,t))),r}});let M={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},ke=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new ft("Expected a control sequence",e);return t},Se=(e,t,r,n)=>{let a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)},z=(Vt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,r=(e.consumeSpaces(),e.fetch());if(M[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=M[r.text]),Xt(e.parseFunction(),"internal");throw new ft("Invalid token after macro prefix",r)}}),Vt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e,n=t.gullet.popToken();if(e=n.text,/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new ft("Expected a control sequence",n);let a,i=0;for(var o=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){a=t.gullet.future(),o[i].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new ft('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new ft('Argument number "'+n.text+'" out of order');i++,o.push([])}else{if("EOF"===n.text)throw new ft("Expected a macro definition");o[i].push(n.text)}let s=t.gullet.consumeArg().tokens;return a&&s.unshift(a),"\\edef"!==r&&"\\xdef"!==r||(s=t.gullet.expandTokens(s)).reverse(),t.gullet.macros.set(e,{tokens:s,numArgs:i,delimiters:o},r===M[r]),{type:"internal",mode:t.mode}}}),Vt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=ke(e.gullet.popToken()),n=(e.gullet.consumeSpaces(),(e=>{let t=e.gullet.popToken();return t="="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t})(e));return Se(e,r,n,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),Vt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=ke(e.gullet.popToken()),n=e.gullet.popToken(),a=e.gullet.popToken();return Se(e,r,a,"\\\\globalfuture"===t),e.gullet.pushToken(a),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}}),{type:"kern",size:-.008}),Me=["|","\\lvert","\\rvert","\\vert"],ze=["\\|","\\lVert","\\rVert","\\Vert"],Ae=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Te=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Be=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],A=[0,1.2,1.8,2.4,3],Ce=[{type:"small",style:yt.SCRIPTSCRIPT},{type:"small",style:yt.SCRIPT},{type:"small",style:yt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ne=[{type:"small",style:yt.SCRIPTSCRIPT},{type:"small",style:yt.SCRIPT},{type:"small",style:yt.TEXT},{type:"stack"}],qe=[{type:"small",style:yt.SCRIPTSCRIPT},{type:"small",style:yt.SCRIPT},{type:"small",style:yt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];var Z0={sqrtImage:function(e,t){let r=t.havingBaseSizing(),n=_0("\\surd",e*r.sizeMultiplier,qe,r),a=r.sizeMultiplier;r=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let i,o,s=0,l=0,h=0;return o="small"===n.type?(h=1e3+1e3*r+80,e<1?a=1:e<1.4&&(a=.7),s=(1+r+.08)/a,l=(1+r)/a,(i=j0("sqrtMain",s,h,r,t)).style.minWidth="0.853em",.833/a):"large"===n.type?(h=1080*A[n.size],l=(A[n.size]+r)/a,s=(A[n.size]+r+.08)/a,(i=j0("sqrtSize"+n.size,s,h,r,t)).style.minWidth="1.02em",1/a):(s=e+r+.08,l=e+r,h=Math.floor(1e3*e+r)+80,(i=j0("sqrtTall",s,h,r,t)).style.minWidth="0.742em",1.056),i.height=l,i.style.height=D(s),{span:i,advanceWidth:o,ruleWidth:(t.fontMetrics().sqrtRuleThickness+r)*a}},sizedDelim:function(e,t,r,n,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),bt.contains(Ae,e)||bt.contains(Be,e))return U0(e,t,!1,r,n,a);if(bt.contains(Te,e))return W0(e,A[t],!1,r,n,a);throw new ft("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:A,customSizedDelim:$0,leftRightDelim:function(e,t,r,n,a,i){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,t=Math.max(t-o,r+o);return $0(e,r=Math.max(t/500*901,2*t-s),!0,n,a,i)}};let Ie={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Re=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function K0(e,t){var r=L0(e);if(r&&bt.contains(Re,r.text))return r;throw new ft(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function J0(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Vt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>(t=K0(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:Ie[e.funcName].size,mclass:Ie[e.funcName].mclass,delim:t.text}),htmlBuilder:(e,t)=>"."===e.delim?Pt.makeSpan([e.mclass]):Z0.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[],t=("."!==e.delim&&t.push(Yt(e.delim,e.mode)),new Ut.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),D(Z0.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t}}),Vt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new ft("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:K0(t[0],e).text,color:r}}}),Vt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var t=K0(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),n=(--e.leftrightDepth,e.expect("\\right",!1),Xt(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:r,left:t.text,right:n.delim,rightColor:n.color}},htmlBuilder:(t,e)=>{J0(t);let r=Gt(t.body,e,!0,["mopen","mclose"]),n,a,i=0,o=0,s=!1;for(let e=0;e<r.length;e++)r[e].isMiddle?s=!0:(i=Math.max(r[e].height,i),o=Math.max(r[e].depth,o));if(i*=e.sizeMultiplier,o*=e.sizeMultiplier,n="."===t.left?z0(e,["mopen"]):Z0.leftRightDelim(t.left,i,o,e,t.mode,["mopen"]),r.unshift(n),s)for(let e=1;e<r.length;e++){var l=r[e].isMiddle;l&&(r[e]=Z0.leftRightDelim(l.delim,i,o,l.options,t.mode,[]))}var h;return a="."===t.right?z0(e,["mclose"]):(h=t.rightColor?e.withColor(t.rightColor):e,Z0.leftRightDelim(t.right,i,o,h,t.mode,["mclose"])),r.push(a),Pt.makeSpan(["minner"],r,e)},mathmlBuilder:(e,t)=>{J0(e);var r,t=x(e.body,t);return"."!==e.left&&((r=new Ut.MathNode("mo",[Yt(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new Ut.MathNode("mo",[Yt(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),C0(t)}}),Vt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{if(t=K0(t[0],e),e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new ft("\\middle without preceding \\left",t)},htmlBuilder:(e,t)=>{let r;return"."===e.delim?r=z0(t,[]):(r=Z0.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},r.isMiddle=e),r},mathmlBuilder:(e,t)=>(e="\\vert"===e.delim||"|"===e.delim?Yt("|","text"):Yt(e.delim,e.mode),(e=new Ut.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e)}),Vt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,a=Xt(t[0],"color-token").color;return{type:"enclose",mode:e.mode,label:n,backgroundColor:a,body:t[1]}},htmlBuilder:Bt=(r,n)=>{let a=Pt.wrapFragment(P(r.body,n),n),i=r.label.slice(1),s,e=n.sizeMultiplier,l=0,h=bt.isCharacterBox(r.body);if("sout"===i)(s=Pt.makeSpan(["stretchy","sout"])).height=n.fontMetrics().defaultRuleThickness/e,l=-.5*n.fontMetrics().xHeight;else if("phase"===i){var t=wt({number:.6,unit:"pt"},n),o=wt({number:.35,unit:"ex"},n),m=(e/=n.havingBaseSizing().sizeMultiplier,a.height+a.depth+t+o),c=(a.style.paddingLeft=D(m/2+t),Math.floor(1e3*m*e)),p="M400000 "+c+" H0 L"+c/2+" 0 l65 45 L145 "+(c-80)+" H400000z",p=new Mr([new zr("phase",p)],{width:"400em",height:D(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"});(s=Pt.makeSvgSpan(["hide-tail"],[p],n)).style.height=D(m),l=a.depth+t+o}else{/cancel/.test(i)?h||a.classes.push("cancel-pad"):"angl"===i?a.classes.push("anglpad"):a.classes.push("boxpad");let e=0,o,t=0;o=/box/.test(i)?(t=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),e=n.fontMetrics().fboxsep+("colorbox"===i?0:t)):"angl"===i?(t=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),e=4*t,Math.max(0,.25-a.depth)):e=h?.2:0,s=((e,t,r,n,a)=>{let i;return n=e.height+e.depth+r+o,/fbox|color|angl/.test(t)?(i=Pt.makeSpan(["stretchy",t],[],a),"fbox"===t&&(e=a.color&&a.getColor())&&(i.style.borderColor=e)):(r=[],/^[bx]cancel$/.test(t)&&r.push(new Ar({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&r.push(new Ar({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),e=new Mr(r,{width:"100%",height:D(n)}),i=Pt.makeSvgSpan([],[e],a)),i.height=n,i.style.height=D(n),i})(a,i,e,o,n),/fbox|boxed|fcolorbox/.test(i)?(s.style.borderStyle="solid",s.style.borderWidth=D(t)):"angl"===i&&.049!==t&&(s.style.borderTopWidth=D(t),s.style.borderRightWidth=D(t)),l=a.depth+o,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor)&&(s.style.borderColor=r.borderColor)}return p=r.backgroundColor?Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:l},{type:"elem",elem:a,shift:0}]},n):(c=/cancel|phase/.test(i)?["svg-align"]:[],Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:s,shift:l,wrapperClasses:c}]},n)),/cancel/.test(i)&&(p.height=a.height,p.depth=a.depth),/cancel/.test(i)&&!h?Pt.makeSpan(["mord","cancel-lap"],[p],n):Pt.makeSpan(["mord"],[p],n)},mathmlBuilder:It=(e,t)=>{var r=new Ut.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[w(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":var n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm;r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label&&(n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),r.setAttribute("style","border: "+n+"em solid "+String(e.borderColor)));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r}}),Vt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,a=Xt(t[0],"color-token").color,i=Xt(t[1],"color-token").color;return{type:"enclose",mode:e.mode,label:n,backgroundColor:i,borderColor:a,body:t[2]}},htmlBuilder:Bt,mathmlBuilder:It}),Vt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\fbox",body:t[0]}}}),Vt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"enclose",mode:e.mode,label:r,body:t}},htmlBuilder:Bt,mathmlBuilder:It}),Vt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\angl",body:t[0]}}});let He={};function Q0(e){var{type:e,names:t,props:r,handler:n,htmlBuilder:a,mathmlBuilder:i}=e,o={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n};for(let e=0;e<t.length;++e)He[t[e]]=o;a&&(d[e]=a),i&&(u[e]=i)}let Oe={};function Wt(e,t){Oe[e]=t}class Zt{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Zt(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Kt{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Kt(t,Zt.range(this,e))}}function er(e){var t=[];e.consumeSpaces();let r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}let T=e=>{if(!e.parser.settings.displayMode)throw new ft("{"+e.envName+"} can be used only in display mode.")};function tr(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function rr(r,e,n){let{hskipBeforeAndAfter:t,addJot:a,cols:i,arraystretch:o,colSeparationType:s,autoTag:l,singleRow:h,emptySingleRow:m,maxNumCols:c,leqno:p}=e;if(r.gullet.beginGroup(),h||r.gullet.macros.set("\\cr","\\\\\\relax"),!o)if(null==(e=r.gullet.expandMacroAsText("\\arraystretch")))o=1;else if(!(o=parseFloat(e))||o<0)throw new ft("Invalid \\arraystretch: "+e);r.gullet.beginGroup();let d=[],u=[d],g=[],f=[],b=null!=l?[]:void 0;function y(){l&&r.gullet.macros.set("\\@eqnsw","1",!0)}function x(){b&&(r.gullet.macros.get("\\df@tag")?(b.push(r.subparse([new Kt("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(l)&&"1"===r.gullet.macros.get("\\@eqnsw")))}for(y(),f.push(er(r));;){let e=r.parseExpression(!1,h?"\\end":"\\\\"),t=(r.gullet.endGroup(),r.gullet.beginGroup(),e={type:"ordgroup",mode:r.mode,body:e},n&&(e={type:"styling",mode:r.mode,style:n,body:[e]}),d.push(e),r.fetch().text);if("&"===t){if(c&&d.length===c){if(h||s)throw new ft("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else{if("\\end"===t){x(),1===d.length&&"styling"===e.type&&0===e.body[0].body.length&&(1<u.length||!m)&&u.pop(),f.length<u.length+1&&f.push([]);break}if("\\\\"!==t)throw new ft("Expected & or \\\\ or \\cr or \\end",r.nextToken);{let e;r.consume()," "!==r.gullet.future().text&&(e=r.parseSizeGroup(!0)),g.push(e?e.value:null),x(),f.push(er(r)),d=[],u.push(d),y()}}}return r.gullet.endGroup(),r.gullet.endGroup(),{type:"array",mode:r.mode,addJot:a,arraystretch:o,body:u,cols:i,rowGaps:g,hskipBeforeAndAfter:t,hLinesBeforeRow:f,colSeparationType:s,tags:b,leqno:p}}function nr(e){return"d"===e.slice(0,1)?"display":"text"}function ar(o,s){let l,h,n=o.body.length,m=o.hLinesBeforeRow,c=0,p=new Array(n),r=[],a=Math.max(s.fontMetrics().arrayRuleWidth,s.minRuleThickness),e=1/s.fontMetrics().ptPerEm,i=5*e,t=(o.colSeparationType&&"small"===o.colSeparationType&&(i=s.havingStyle(yt.SCRIPT).sizeMultiplier/s.sizeMultiplier*.2778),"CD"===o.colSeparationType?wt({number:3,unit:"ex"},s):12*e),d=3*e,u=.7*(t*=o.arraystretch),g=.3*t,f=0;function b(t){for(let e=0;e<t.length;++e)0<e&&(f+=.25),r.push({pos:f,isDashed:t[e]})}for(b(m[0]),l=0;l<o.body.length;++l){let e=o.body[l],t=u,r=g,n=(c<e.length&&(c=e.length),new Array(e.length));for(h=0;h<e.length;++h){var y=P(e[h],s);r<y.depth&&(r=y.depth),t<y.height&&(t=y.height),n[h]=y}let a=o.rowGaps[l],i=0;a&&0<(i=wt(a,s))&&(i+=g,r<i&&(r=i),i=0),o.addJot&&(r+=d),n.height=t,n.depth=r,f+=t,n.pos=f,f+=r+i,p[l]=n,b(m[l+1])}let x=f/2+s.fontMetrics().axisHeight,w=o.cols||[],v=[],k,S,M=[];if(o.tags&&o.tags.some(e=>e))for(l=0;l<n;++l){var z=p[l],A=z.pos-x,T=o.tags[l];(T=!0===T?Pt.makeSpan(["eqn-num"],[],s):!1===T?Pt.makeSpan([],[],s):Pt.makeSpan([],Gt(T,s,!0),s)).depth=z.depth,T.height=z.height,M.push({type:"elem",elem:T,shift:A})}for(h=0,S=0;h<c||S<w.length;++h,++S){let t,r=w[S]||{},e=!0;for(;"separator"===r.type;){if(e||((k=Pt.makeSpan(["arraycolsep"],[])).style.width=D(s.fontMetrics().doubleRuleSep),v.push(k)),"|"!==r.separator&&":"!==r.separator)throw new ft("Invalid separator type: "+r.separator);var B="|"===r.separator?"solid":"dashed",C=Pt.makeSpan(["vertical-separator"],[],s);C.style.height=D(f),C.style.borderRightWidth=D(a),C.style.borderRightStyle=B,C.style.margin="0 "+D(-a/2),(B=f-x)&&(C.style.verticalAlign=D(-B)),v.push(C),S++,r=w[S]||{},e=!1}if(!(h>=c)){(0<h||o.hskipBeforeAndAfter)&&0!==(t=bt.deflt(r.pregap,i))&&((k=Pt.makeSpan(["arraycolsep"],[])).style.width=D(t),v.push(k));let e=[];for(l=0;l<n;++l){var N,q=p[l],I=q[h];I&&(N=q.pos-x,I.depth=q.depth,I.height=q.height,e.push({type:"elem",elem:I,shift:N}))}e=Pt.makeVList({positionType:"individualShift",children:e},s),e=Pt.makeSpan(["col-align-"+(r.align||"c")],[e]),v.push(e),(h<c-1||o.hskipBeforeAndAfter)&&0!==(t=bt.deflt(r.postgap,i))&&((k=Pt.makeSpan(["arraycolsep"],[])).style.width=D(t),v.push(k))}}if(p=Pt.makeSpan(["mtable"],v),0<r.length){for(var E=Pt.makeLineSpan("hline",s,a),L=Pt.makeLineSpan("hdashline",s,a),R=[{type:"elem",elem:p,shift:0}];0<r.length;){var H=r.pop(),O=H.pos-x;R.push(H.isDashed?{type:"elem",elem:L,shift:O}:{type:"elem",elem:E,shift:O})}p=Pt.makeVList({positionType:"individualShift",children:R},s)}return 0===M.length?Pt.makeSpan(["mord"],[p],s):(t=Pt.makeVList({positionType:"individualShift",children:M},s),t=Pt.makeSpan(["tag"],[t],s),Pt.makeFragment([p,t]))}function ir(o,t){var r=[],n=new Ut.MathNode("mtd",[],["mtr-glue"]),a=new Ut.MathNode("mtd",[],["mml-eqn-num"]);for(let e=0;e<o.body.length;e++){var i=o.body[e],s=[];for(let e=0;e<i.length;e++)s.push(new Ut.MathNode("mtd",[w(i[e],t)]));o.tags&&o.tags[e]&&(s.unshift(n),s.push(n),o.leqno?s.unshift(a):s.push(a)),r.push(new Ut.MathNode("mtr",s))}let e=new Ut.MathNode("mtable",r),l=.5===o.arraystretch?.1:.16+o.arraystretch-1+(o.addJot?.09:0),h=(e.setAttribute("rowspacing",D(l)),""),m="";if(o.cols&&0<o.cols.length){let t=o.cols,r="",n=!1,a=0,i=t.length;"separator"===t[0].type&&(h+="top ",a=1),"separator"===t[t.length-1].type&&(h+="bottom ",--i);for(let e=a;e<i;e++)"align"===t[e].type?(m+=Ee[t[e].align],n&&(r+="none "),n=!0):"separator"===t[e].type&&n&&(r+="|"===t[e].separator?"solid ":"dashed ",n=!1);e.setAttribute("columnalign",m.trim()),/[sd]/.test(r)&&e.setAttribute("columnlines",r.trim())}if("align"===o.colSeparationType){let t=o.cols||[],r="";for(let e=1;e<t.length;e++)r+=e%2?"0em ":"1em ";e.setAttribute("columnspacing",r.trim())}else"alignat"===o.colSeparationType||"gather"===o.colSeparationType?e.setAttribute("columnspacing","0em"):"small"===o.colSeparationType?e.setAttribute("columnspacing","0.2778em"):"CD"===o.colSeparationType?e.setAttribute("columnspacing","0.5em"):e.setAttribute("columnspacing","1em");let c="",p=o.hLinesBeforeRow;h=(h+=0<p[0].length?"left ":"")+(0<p[p.length-1].length?"right ":"");for(let e=1;e<p.length-1;e++)c+=0===p[e].length?"none ":p[e][0]?"dashed ":"solid ";return/[sd]/.test(c)&&e.setAttribute("rowlines",c.trim()),""!==h&&(e=new Ut.MathNode("menclose",[e])).setAttribute("notation",h.trim()),o.arraystretch&&o.arraystretch<1&&(e=new Ut.MathNode("mstyle",[e])).setAttribute("scriptlevel","1"),e}function or(e,r){-1===e.envName.indexOf("ed")&&T(e);var n=[],t=-1<e.envName.indexOf("at")?"alignat":"align",a="split"===e.envName,t=rr(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:tr(e.envName),emptySingleRow:!0,colSeparationType:t,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display");let i,o=0,s={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&"ordgroup"===r[0].type){let t="";for(let e=0;e<r[0].body.length;e++)t+=Xt(r[0].body[e],"textord").text;i=Number(t),o=2*i}let l=!o;t.body.forEach(function(t){for(let e=1;e<t.length;e+=2){var r=Xt(t[e],"styling");Xt(r.body[0],"ordgroup").body.unshift(s)}if(l)o<t.length&&(o=t.length);else{var e=t.length/2;if(i<e)throw new ft("Too many math in a row: expected "+i+", but got "+e,t[0])}});for(let r=0;r<o;++r){let e="r",t=0;r%2==1?e="l":0<r&&l&&(t=1),n[r]={type:"align",align:e,pregap:t,postgap:0}}return t.colSeparationType=l?"align":"alignat",t}let Ee={c:"center ",l:"left ",r:"right "};Q0({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){return t={cols:t=(L0(t[0])?[t[0]]:Xt(t[0],"ordgroup").body).map(function(e){var t=E0(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new ft("Unknown column alignment: "+t,e)}),hskipBeforeAndAfter:!0,maxNumCols:t.length},rr(e.parser,t,nr(e.envName))},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){let t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c";var n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,-1==="lcr".indexOf(r))throw new ft("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}return n=rr(e.parser,n,nr(e.envName)),a=Math.max(0,...n.body.map(e=>e.length)),n.cols=new Array(a).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=rr(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(L0(t[0])?[t[0]]:Xt(t[0],"ordgroup").body).map(function(e){var t=E0(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new ft("Unknown column alignment: "+t,e)})).length)throw new ft("{subarray} can contain only one column");if(0<(e=rr(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<e.body[0].length)throw new ft("{subarray} can contain only one column");return e},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=rr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},nr(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:-1<e.envName.indexOf("r")?".":"\\{",right:-1<e.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:or,htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){bt.contains(["gather","gather*"],e.envName)&&T(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:tr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return rr(e.parser,t,"display")},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:or,htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){T(e);var t={autoTag:tr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return rr(e.parser,t,"display")},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["CD"],props:{numArgs:0},handler(e){T(e);{var i,o=e.parser,s=[];for(o.gullet.beginGroup(),o.gullet.macros.set("\\cr","\\\\\\relax"),o.gullet.beginGroup();;){s.push(o.parseExpression(!1,"\\\\")),o.gullet.endGroup(),o.gullet.beginGroup();var t=o.fetch().text;if("&"!==t&&"\\\\"!==t){if("\\end"!==t)throw new ft("Expected \\\\ or \\cr or \\end",o.nextToken);0===s[s.length-1].length&&s.pop();break}o.consume()}let r=[],n=[r];for(let t=0;t<s.length;t++){let a=s[t],e={type:"styling",body:[],mode:"math",style:"display"};for(let n=0;n<a.length;n++)if(ve(a[n])){r.push(e);var l=E0(a[n+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(l))){if(!(-1<"<>AV".indexOf(l)))throw new ft('Expected one of "<>AV=|." after @',a[n]);for(let r=0;r<2;r++){let t=!0;for(let e=n+1;e<a.length;e++){if(("mathord"===(i=a[e]).type||"atom"===i.type)&&i.text===l){t=!1,n=e;break}if(ve(a[e]))throw new ft("Missing a "+l+" character to complete a CD arrow.",a[e]);h[r].body.push(a[e])}if(t)throw new ft("Missing a "+l+" character to complete a CD arrow.",a[n])}}var m={type:"styling",body:[((e,t,r)=>{var n=we[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:n,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[a],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[a],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}})(l,h,o)],mode:"math",style:"display"};r.push(m),e={type:"styling",body:[],mode:"math",style:"display"}}else e.body.push(a[n]);t%2==0?r.push(e):r.shift(),r=[],n.push(r)}return o.gullet.endGroup(),o.gullet.endGroup(),{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}},htmlBuilder:ar,mathmlBuilder:ir}),Wt("\\nonumber","\\gdef\\@eqnsw{0}"),Wt("\\notag","\\nonumber"),Vt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new ft(e.funcName+" valid only within array environment")}});var sr=He;function lr(e){let t=null;return t=0<e.length&&"."===(t=e)?null:t}function hr(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new ft("Invalid size: '"+e+"' in \\includegraphics");if(i0(e={number:+(t[1]+t[2]),unit:t[3]}))return e;throw new ft("Invalid unit: '"+e.unit+"' in \\includegraphics.")}Vt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:e,funcName:r}=e,n=t[0];if("ordgroup"!==n.type)throw new ft("Invalid environment name",n);let a="";for(let e=0;e<n.body.length;++e)a+=Xt(n.body[e],"textord").text;if("\\begin"!==r)return{type:"environment",mode:e.mode,name:a,nameGroup:n};if(!sr.hasOwnProperty(a))throw new ft("No such environment: "+a,n);var t=sr[a],{args:r,optArgs:i}=e.parseArguments("\\begin{"+a+"}",t),o={mode:e.mode,envName:a,parser:e},t=t.handler(o,r,i),o=(e.expect("\\end",!1),e.nextToken);if((r=Xt(e.parseFunction(),"environment")).name!==a)throw new ft("Mismatch: \\begin{"+a+"} matched by \\end{"+r.name+"}",o);return t}});let Le=(e,t)=>{var r=e.font,t=t.withFont(r);return P(e.body,t)},De=(e,t)=>{var r=e.font,t=t.withFont(r);return w(e.body,t)},Pe={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},Ve=(Vt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=M0(t[0]);let n=r;return n in Pe&&(n=Pe[n]),{type:"font",mode:e.mode,font:n.slice(1),body:t}},htmlBuilder:Le,mathmlBuilder:De}),Vt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var e=e.parser,t=t[0],r=bt.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:S(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:r}}}),Vt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:r,breakOnTokenText:n}=e,a=e.mode,n=e.parseExpression(!0,n);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:e.mode,body:n}}},htmlBuilder:Le,mathmlBuilder:De}),(e,t)=>{let r=t;return"display"===e?r=r.id>=yt.SCRIPT.id?r.text():yt.DISPLAY:"text"===e&&r.size===yt.DISPLAY.size?r=yt.TEXT:"script"===e?r=yt.SCRIPT:"scriptscript"===e&&(r=yt.SCRIPTSCRIPT),r}),B=(e,t)=>{var r,n=Ve(e.size,t.style),a=n.fracNum(),i=n.fracDen(),a=t.havingStyle(a),o=P(e.numer,a,t),s=(e.continued&&(s=8.5/t.fontMetrics().ptPerEm,r=3.5/t.fontMetrics().ptPerEm,o.height=o.height<s?s:o.height,o.depth=o.depth<r?r:o.depth),a=t.havingStyle(i),P(e.denom,a,t));let l,h,m,c,p,d,u,g,f,b;return m=e.hasBarLine?(l=e.barSize?(h=wt(e.barSize,t),Pt.makeLineSpan("frac-line",t,h)):Pt.makeLineSpan("frac-line",t),h=l.height,l.height):(l=null,h=0,t.fontMetrics().defaultRuleThickness),d=n.size===yt.DISPLAY.size||"display"===e.size?(c=t.fontMetrics().num1,p=0<h?3*m:7*m,t.fontMetrics().denom1):(p=0<h?(c=t.fontMetrics().num2,m):(c=t.fontMetrics().num3,3*m),t.fontMetrics().denom2),u=l?(r=t.fontMetrics().axisHeight,c-o.depth-(r+.5*h)<p&&(c+=p-(c-o.depth-(r+.5*h))),r-.5*h-(s.height-d)<p&&(d+=p-(r-.5*h-(s.height-d))),i=-(r-.5*h),Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:i},{type:"elem",elem:o,shift:-c}]},t)):((r=c-o.depth-(s.height-d))<p&&(c+=.5*(p-r),d+=.5*(p-r)),Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:o,shift:-c}]},t)),a=t.havingStyle(n),u.height*=a.sizeMultiplier/t.sizeMultiplier,u.depth*=a.sizeMultiplier/t.sizeMultiplier,g=n.size===yt.DISPLAY.size?t.fontMetrics().delim1:(n.size===yt.SCRIPTSCRIPT.size?t.havingStyle(yt.SCRIPT):t).fontMetrics().delim2,f=null==e.leftDelim?z0(t,["mopen"]):Z0.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(n),e.mode,["mopen"]),b=e.continued?Pt.makeSpan([]):null==e.rightDelim?z0(t,["mclose"]):Z0.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(n),e.mode,["mclose"]),Pt.makeSpan(["mord"].concat(a.sizingClasses(t)),[f,Pt.makeSpan(["mfrac"],[u]),b],t)},C=(e,t)=>{let r=new Ut.MathNode("mfrac",[w(e.numer,t),w(e.denom,t)]);e.hasBarLine?e.barSize&&(n=wt(e.barSize,t),r.setAttribute("linethickness",D(n))):r.setAttribute("linethickness","0px");var n=Ve(e.size,t.style);return n.size!==t.style.size&&(r=new Ut.MathNode("mstyle",[r]),t=n.size===yt.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",t),r.setAttribute("scriptlevel","0")),null==e.leftDelim&&null==e.rightDelim?r:(n=[],null!=e.leftDelim&&((t=new Ut.MathNode("mo",[new Ut.TextNode(e.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),n.push(r),null!=e.rightDelim&&((t=new Ut.MathNode("mo",[new Ut.TextNode(e.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),C0(n))},Fe=(Vt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:r}=e,n=t[0],t=t[1];let a,i=null,o=null,s="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,i="(",o=")";break;case"\\\\bracefrac":a=!1,i="\\{",o="\\}";break;case"\\\\brackfrac":a=!1,i="[",o="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":s="display";break;case"\\tfrac":case"\\tbinom":s="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:n,denom:t,hasBarLine:a,leftDelim:i,rightDelim:o,size:s,barSize:null}},htmlBuilder:B,mathmlBuilder:C}),Vt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var e=e.parser,r=t[0];return{type:"genfrac",mode:e.mode,continued:!0,numer:r,denom:t[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Vt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:r,funcName:n,token:a}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:a}}}),["display","text","script","scriptscript"]),Ge=(Vt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var e=e.parser,r=t[4],n=t[5],a="atom"===(a=M0(t[0])).type&&"open"===a.family?lr(a.text):null,i="atom"===(i=M0(t[1])).type&&"close"===i.family?lr(i.text):null,o=Xt(t[2],"size");let s,l=null,h=(s=!!o.isBlank||0<(l=o.value).number,"auto"),m=t[3];return"ordgroup"===m.type?0<m.body.length&&(o=Xt(m.body[0],"textord"),h=Fe[Number(o.text)]):(m=Xt(m,"textord"),h=Fe[Number(m.text)]),{type:"genfrac",mode:e.mode,numer:r,denom:n,continued:!1,hasBarLine:s,barSize:l,leftDelim:a,rightDelim:i,size:h}},htmlBuilder:B,mathmlBuilder:C}),Vt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:e,token:r}=e;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:Xt(t[0],"size").value,token:r}}}),Vt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var e=e.parser,r=t[0],n=(e=>{if(e)return e;throw new Error("Expected non-null, but got "+String(e))})(Xt(t[1],"infix").size),a=0<n.number;return{type:"genfrac",mode:e.mode,numer:r,denom:t[2],continued:!1,hasBarLine:a,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:B,mathmlBuilder:C}),(e,t)=>{var r=t.style;let n,a;a="supsub"===e.type?(n=e.sup?P(e.sup,t.havingStyle(r.sup()),t):P(e.sub,t.havingStyle(r.sub()),t),Xt(e.base,"horizBrace")):Xt(e,"horizBrace"),r=P(a.base,t.havingBaseStyle(yt.DISPLAY)),e=O0(a,t);let i;return(a.isOver?(i=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[1]:(i=Pt.makeVList({positionType:"bottom",positionData:r.depth+.1+e.height,children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:r}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),n&&(e=Pt.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t),i=a.isOver?Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Pt.makeVList({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]},t)),Pt.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t)}),Ue=(Vt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"horizBrace",mode:e.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Ge,mathmlBuilder:(e,t)=>{var r=H0(e.label);return new Ut.MathNode(e.isOver?"mover":"munder",[w(e.base,t),r])}}),Vt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var e=e.parser,r=t[1],t=Xt(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:Ft(r)}:e.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Gt(e.body,t,!1);return Pt.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{let r=I0(e.body,t);return(r=r instanceof _t?r:new _t("mrow",[r])).setAttribute("href",e.href),r}}),Vt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var e=e.parser,r=Xt(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");var n=[];for(let t=0;t<r.length;t++){let e=r[t];"~"===e&&(e="\\textasciitilde"),n.push({type:"textord",mode:"text",text:e})}return t={type:"text",mode:e.mode,font:"\\texttt",body:n},{type:"href",mode:e.mode,href:r,body:Ft(t)}}}),Vt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){return{type:"hbox",mode:(e=e.parser).mode,body:Ft(t[0])}},htmlBuilder(e,t){return e=Gt(e.body,t,!1),Pt.makeFragment(e)},mathmlBuilder(e,t){return new Ut.MathNode("mrow",x(e.body,t))}}),Vt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=Xt(t[0],"raw").string,e=t[1];let i;r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o={};switch(n){case"\\htmlClass":o.class=a,i={command:"\\htmlClass",class:a};break;case"\\htmlId":o.id=a,i={command:"\\htmlId",id:a};break;case"\\htmlStyle":o.style=a,i={command:"\\htmlStyle",style:a};break;case"\\htmlData":var s=a.split(",");for(let e=0;e<s.length;e++){var l=s[e].split("=");if(2!==l.length)throw new ft("Error parsing key-value for \\htmlData");o["data-"+l[0].trim()]=l[1].trim()}i={command:"\\htmlData",attributes:o};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(i)?{type:"html",mode:r.mode,attributes:o,body:Ft(e)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r,n=Gt(e.body,t,!1),a=["enclosing"],i=(e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/)),Pt.makeSpan(a,n,t));for(r in e.attributes)"class"!==r&&e.attributes.hasOwnProperty(r)&&i.setAttribute(r,e.attributes[r]);return i},mathmlBuilder:(e,t)=>I0(e.body,t)}),Vt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>({type:"htmlmathml",mode:(e=e.parser).mode,html:Ft(t[0]),mathml:Ft(t[1])}),htmlBuilder:(e,t)=>(e=Gt(e.html,t,!1),Pt.makeFragment(e)),mathmlBuilder:(e,t)=>I0(e.mathml,t)}),Vt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{let n=e.parser,a={number:0,unit:"em"},i={number:.9,unit:"em"},o={number:0,unit:"em"},s="";if(r[0]){var l=Xt(r[0],"raw").string.split(",");for(let e=0;e<l.length;e++){var h=l[e].split("=");if(2===h.length){var m=h[1].trim();switch(h[0].trim()){case"alt":s=m;break;case"width":a=hr(m);break;case"height":i=hr(m);break;case"totalheight":o=hr(m);break;default:throw new ft("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}}return e=Xt(t[0],"url").url,""===s&&(s=(s=(s=e).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:e})?{type:"includegraphics",mode:n.mode,alt:s,width:a,height:i,totalheight:o,src:e}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{let r=wt(e.height,t),n=0,a=(0<e.totalheight.number&&(n=wt(e.totalheight,t)-r),0);return 0<e.width.number&&(a=wt(e.width,t)),t={height:D(r+n)},0<a&&(t.width=D(a)),0<n&&(t.verticalAlign=D(-n)),(e=new Sr(e.src,e.alt,t)).height=r,e.depth=n,e},mathmlBuilder:(e,t)=>{var r=new Ut.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);let n=wt(e.height,t),a=0;return 0<e.totalheight.number&&(a=wt(e.totalheight,t)-n,r.setAttribute("valign",D(-a))),r.setAttribute("height",D(n+a)),0<e.width.number&&(t=wt(e.width,t),r.setAttribute("width",D(t))),r.setAttribute("src",e.src),r}}),Vt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var r,n,{parser:e,funcName:a}=e,t=Xt(t[0],"size");return e.settings.strict&&(r="m"===a[1],n="mu"===t.value.unit,r?(n||e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+t.value.unit+" units"),"math"!==e.mode&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):n&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")),{type:"kern",mode:e.mode,dimension:t.value}},htmlBuilder(e,t){return Pt.makeGlue(e.dimension,t)},mathmlBuilder(e,t){return e=wt(e.dimension,t),new Ut.SpaceNode(e)}}),Vt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:r.slice(5),body:t}},htmlBuilder:(e,t)=>{let r,n=(r="clap"===e.alignment?(r=Pt.makeSpan([],[P(e.body,t)]),Pt.makeSpan(["inner"],[r],t)):Pt.makeSpan(["inner"],[P(e.body,t)]),Pt.makeSpan(["fix"],[])),a=Pt.makeSpan([e.alignment],[r,n],t);return(e=Pt.makeSpan(["strut"])).style.height=D(a.height+a.depth),a.depth&&(e.style.verticalAlign=D(-a.depth)),a.children.unshift(e),a=Pt.makeSpan(["thinbox"],[a],t),Pt.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>(t=new Ut.MathNode("mpadded",[w(e.body,t)]),"rlap"!==e.alignment&&(e="llap"===e.alignment?"-1":"-0.5",t.setAttribute("lspace",e+"width")),t.setAttribute("width","0px"),t)}),Vt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:r}=e,n=r.mode,e=(r.switchMode("math"),"\\("===e?"\\)":"$"),a=r.parseExpression(!1,e);return r.expect(e),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:a}}}),Vt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new ft("Mismatched "+e.funcName)}}),(e,t)=>{switch(t.style.size){case yt.DISPLAY.size:return e.display;case yt.TEXT.size:return e.text;case yt.SCRIPT.size:return e.script;case yt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}}),Ye=(Vt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>({type:"mathchoice",mode:(e=e.parser).mode,display:Ft(t[0]),text:Ft(t[1]),script:Ft(t[2]),scriptscript:Ft(t[3])}),htmlBuilder:(e,t)=>(e=Gt(e=Ue(e,t),t,!1),Pt.makeFragment(e)),mathmlBuilder:(e,t)=>I0(e=Ue(e,t),t)}),(e,t,r,n,a,i,o)=>{e=Pt.makeSpan([],[e]);let s=r&&bt.isCharacterBox(r),l,h,m;if(t&&(c=P(t,n.havingStyle(a.sup()),n),h={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}),r&&(c=P(r,n.havingStyle(a.sub()),n),l={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-c.height)}),h&&l)r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o,m=Pt.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:D(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:D(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);else if(l)a=e.height-o,m=Pt.makeVList({positionType:"top",positionData:a,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:D(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n);else{if(!h)return e;var c=e.depth+o;m=Pt.makeVList({positionType:"bottom",positionData:c,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:D(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}return t=[m],l&&0!==i&&!s&&((r=Pt.makeSpan(["mspace"],[],n)).style.marginRight=D(i),t.unshift(r)),Pt.makeSpan(["mop","op-limits"],t,n)}),Xe=["\\smallint"],N=(e,n)=>{let t,r,a,i=!1;"supsub"===e.type?(t=e.sup,r=e.sub,a=Xt(e.base,"op"),i=!0):a=Xt(e,"op");let o,s=!1;if((e=n.style).size===yt.DISPLAY.size&&a.symbol&&!bt.contains(Xe,a.name)&&(s=!0),a.symbol){let e=s?"Size2-Regular":"Size1-Regular",t="",r;"\\oiint"!==a.name&&"\\oiiint"!==a.name||(t=a.name.slice(1),a.name="oiint"===t?"\\iint":"\\iiint"),o=Pt.makeSymbol(a.name,e,"math",n,["mop","op-symbol",s?"large-op":"small-op"]),0<t.length&&(r=o.italic,l=Pt.staticSvg(t+"Size"+(s?"2":"1"),n),o=Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:l,shift:s?.08:0}]},n),a.name="\\"+t,o.classes.unshift("mop"),o.italic=r)}else if(a.body){var l=Gt(a.body,n,!0);1===l.length&&l[0]instanceof jt?(o=l[0]).classes[0]="mop":o=Pt.makeSpan(["mop"],l,n)}else{var h=[];for(let e=1;e<a.name.length;e++)h.push(Pt.mathsym(a.name[e],a.mode,n));o=Pt.makeSpan(["mop"],h,n)}let m=0,c=0;return(o instanceof jt||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(m=(o.height-o.depth)/2-n.fontMetrics().axisHeight,c=o.italic),i?Ye(o,t,r,n,e,c,m):(m&&(o.style.position="relative",o.style.top=D(m)),o)},q=(e,t)=>{let r;return e.symbol?(r=new _t("mo",[Yt(e.name,e.mode)]),bt.contains(Xe,e.name)&&r.setAttribute("largeop","false")):r=e.body?new _t("mo",x(e.body,t)):(r=new _t("mi",[new $t(e.name.slice(1))]),t=new _t("mo",[Yt("","text")]),e.parentIsSupSub?new _t("mrow",[r,t]):B0([r,t])),r},We={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},je=(Vt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{let{parser:r,funcName:n}=e,a=n;return 1===a.length&&(a=We[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:N,mathmlBuilder:q}),Vt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ft(t)}),htmlBuilder:N,mathmlBuilder:q}),{"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"}),_e=(Vt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:N,mathmlBuilder:q}),Vt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:N,mathmlBuilder:q}),Vt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=je[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:N,mathmlBuilder:q}),(e,t)=>{let r,n,a,i,o=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,a=Xt(e.base,"operatorname"),o=!0):a=Xt(e,"operatorname"),0<a.body.length){var s=Gt(a.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),t.withFont("mathrm"),!0);for(let e=0;e<s.length;e++){var l=s[e];l instanceof jt&&(l.text=l.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=Pt.makeSpan(["mop"],s,t)}else i=Pt.makeSpan(["mop"],[],t);return o?Ye(i,r,n,t,t.style,0,0):i});function mr(e,t,r){var n=Gt(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier;for(let e=0;e<n.length;e++){var i=n[e].classes.indexOf("sizing");i<0?Array.prototype.push.apply(n[e].classes,t.sizingClasses(r)):n[e].classes[i+1]==="reset-size"+t.size&&(n[e].classes[i+1]="reset-size"+r.size),n[e].height*=a,n[e].depth*=a}return Pt.makeFragment(n)}Vt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:Ft(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:_e,mathmlBuilder:(e,t)=>{let r=x(e.body,t.withFont("mathrm")),n=!0;for(let e=0;e<r.length;e++){var a=r[e];if(!(a instanceof Ut.SpaceNode))if(a instanceof Ut.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var i=a.children[0];1===a.children.length&&i instanceof Ut.TextNode?i.text=i.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}n&&(o=r.map(e=>e.toText()).join(""),r=[new Ut.TextNode(o)]),(t=new Ut.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new Ut.MathNode("mo",[Yt("","text")]);return e.parentIsSupSub?new Ut.MathNode("mrow",[t,o]):Ut.newDocumentFragment([t,o])}}),Wt("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),S0({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Pt.makeFragment(Gt(e.body,t,!1)):Pt.makeSpan(["mord"],Gt(e.body,t,!0),t)},mathmlBuilder(e,t){return I0(e.body,t,!0)}}),Vt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){return e=e.parser,t=t[0],{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=P(e.body,t.havingCrampedStyle()),r=Pt.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,e=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},t);return Pt.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var r=new Ut.MathNode("mo",[new Ut.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new Ut.MathNode("mover",[w(e.body,t),r])).setAttribute("accent","true"),e}}),Vt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"phantom",mode:e.mode,body:Ft(t)}),htmlBuilder:(e,t)=>(e=Gt(e.body,t.withPhantom(),!1),Pt.makeFragment(e)),mathmlBuilder:(e,t)=>(e=x(e.body,t),new Ut.MathNode("mphantom",e))}),Vt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"hphantom",mode:e.mode,body:t}),htmlBuilder:(e,t)=>{let r=Pt.makeSpan([],[P(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(let e=0;e<r.children.length;e++)r.children[e].height=0,r.children[e].depth=0;return r=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Pt.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>(e=x(Ft(e.body),t),t=new Ut.MathNode("mphantom",e),(e=new Ut.MathNode("mpadded",[t])).setAttribute("height","0px"),e.setAttribute("depth","0px"),e)}),Vt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"vphantom",mode:e.mode,body:t}),htmlBuilder:(e,t)=>{var e=Pt.makeSpan(["inner"],[P(e.body,t.withPhantom())]),r=Pt.makeSpan(["fix"],[]);return Pt.makeSpan(["mord","rlap"],[e,r],t)},mathmlBuilder:(e,t)=>(e=x(Ft(e.body),t),t=new Ut.MathNode("mphantom",e),(e=new Ut.MathNode("mpadded",[t])).setAttribute("width","0px"),e)}),Vt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e.parser,r=Xt(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=P(e.body,t),e=wt(e.dy,t);return Pt.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new Ut.MathNode("mpadded",[w(e.body,t)]),e=e.dy.number+e.dy.unit,t.setAttribute("voffset",e),t}}),Vt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){return{type:"internal",mode:(e=e.parser).mode}}}),Vt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var e=e.parser,r=r[0],n=Xt(t[0],"size"),t=Xt(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Xt(r,"size").value,width:n.value,height:t.value}},htmlBuilder(e,t){var r=Pt.makeSpan(["mord","rule"],[],t),n=wt(e.width,t),a=wt(e.height,t),e=e.shift?wt(e.shift,t):0;return r.style.borderRightWidth=D(n),r.style.borderTopWidth=D(a),r.style.bottom=D(e),r.width=n,r.height=a+e,r.depth=-e,r.maxFontSize=1.125*a*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=wt(e.width,t),n=wt(e.height,t),e=e.shift?wt(e.shift,t):0,t=t.color&&t.getColor()||"black",a=new Ut.MathNode("mspace"),t=(a.setAttribute("mathbackground",t),a.setAttribute("width",D(r)),a.setAttribute("height",D(n)),new Ut.MathNode("mpadded",[a]));return 0<=e?t.setAttribute("height",D(e)):(t.setAttribute("height",D(e)),t.setAttribute("depth",D(-e))),t.setAttribute("voffset",D(e)),t}});let $e=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Ze=(Vt({type:"sizing",names:$e,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!1,e);return{type:"sizing",mode:n.mode,size:$e.indexOf(r)+1,body:e}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return mr(e.body,r,t)},mathmlBuilder:(e,t)=>(t=t.havingSize(e.size),e=x(e.body,t),(e=new Ut.MathNode("mstyle",e)).setAttribute("mathsize",D(t.sizeMultiplier)),e)}),Vt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{let n=e.parser,a=!1,i=!1,o=r[0]&&Xt(r[0],"ordgroup"),s;if(o)for(let e=0;e<o.body.length;++e)if("t"===(s=o.body[e].text))a=!0;else{if("b"!==s){a=!1,i=!1;break}i=!0}else a=!0,i=!0;return e=t[0],{type:"smash",mode:n.mode,body:e,smashHeight:a,smashDepth:i}},htmlBuilder:(e,t)=>{var r=Pt.makeSpan([],[P(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].depth=0;return e=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Pt.makeSpan(["mord"],[e],t)},mathmlBuilder:(e,t)=>(t=new Ut.MathNode("mpadded",[w(e.body,t)]),e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t)}),Vt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){return e=e.parser,r=r[0],t=t[0],{type:"sqrt",mode:e.mode,body:t,index:r}},htmlBuilder(e,t){let r=P(e.body,t.havingCrampedStyle()),n=(0===r.height&&(r.height=t.fontMetrics().xHeight),r=Pt.wrapFragment(r,t),t.fontMetrics().defaultRuleThickness),a=n,i=n+(t.style.id<yt.TEXT.id?t.fontMetrics().xHeight:a)/4,o=r.height+r.depth+i+n,{span:s,ruleWidth:l,advanceWidth:h}=Z0.sqrtImage(o,t),m=s.height-l;m>r.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c,p=s.height-r.height-i-l,p=(r.style.paddingLeft=D(h),Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:s},{type:"kern",size:l}]},t));return e.index?(c=t.havingStyle(yt.SCRIPTSCRIPT),e=P(e.index,c,t),c=.6*(p.height-p.depth),c=Pt.makeVList({positionType:"shift",positionData:-c,children:[{type:"elem",elem:e}]},t),e=Pt.makeSpan(["root"],[c]),Pt.makeSpan(["mord","sqrt"],[e,p],t)):Pt.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:e,index:r}=e;return r?new Ut.MathNode("mroot",[w(e,t),w(r,t)]):new Ut.MathNode("msqrt",[w(e,t)])}}),{display:yt.DISPLAY,text:yt.TEXT,script:yt.SCRIPT,scriptscript:yt.SCRIPTSCRIPT}),Ke=(Vt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!0,e),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:e}},htmlBuilder(e,t){var r=Ze[e.style],r=t.havingStyle(r).withFont("");return mr(e.body,r,t)},mathmlBuilder(e,t){var r=Ze[e.style],t=t.havingStyle(r),r=x(e.body,t),t=new Ut.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",r[0]),t.setAttribute("displaystyle",r[1]),t}}),S0({type:"supsub",htmlBuilder(e,t){var r=t;if(i=(a=(n=e).base)?"op"===a.type?a.limits&&(r.style.size===yt.DISPLAY.size||a.alwaysHandleSupSub)?N:null:"operatorname"===a.type?a.alwaysHandleSupSub&&(r.style.size===yt.DISPLAY.size||a.limits)?_e:null:"accent"===a.type?bt.isCharacterBox(a.base)?v:null:"horizBrace"===a.type&&!n.sub===a.isOver?Ge:null:null)return i(e,t);var{base:r,sup:n,sub:a}=e,i=P(r,t);let o,s,l=t.fontMetrics(),h=0,m=0;r=r&&bt.isCharacterBox(r),n&&(d=t.havingStyle(t.style.sup()),o=P(n,d,t),r||(h=i.height-d.fontMetrics().supDrop*d.sizeMultiplier/t.sizeMultiplier)),a&&(d=t.havingStyle(t.style.sub()),s=P(a,d,t),r||(m=i.depth+d.fontMetrics().subDrop*d.sizeMultiplier/t.sizeMultiplier)),n=t.style===yt.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,a=t.sizeMultiplier,r=D(.5/l.ptPerEm/a);let c,p=null;if(s&&(d=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name),i instanceof jt||d)&&(p=D(-i.italic)),o&&s)h=Math.max(h,n,o.depth+.25*l.xHeight),m=Math.max(m,l.sub2),e=4*l.defaultRuleThickness,h-o.depth-(s.height-m)<e&&(m=e-(h-o.depth)+s.height,0<(d=.8*l.xHeight-(h-o.depth)))&&(h+=d,m-=d),e=[{type:"elem",elem:s,shift:m,marginRight:r,marginLeft:p},{type:"elem",elem:o,shift:-h,marginRight:r}],c=Pt.makeVList({positionType:"individualShift",children:e},t);else if(s){m=Math.max(m,l.sub1,s.height-.8*l.xHeight);var d=[{type:"elem",elem:s,marginLeft:p,marginRight:r}];c=Pt.makeVList({positionType:"shift",positionData:m,children:d},t)}else{if(!o)throw new Error("supsub must have either sup or sub.");h=Math.max(h,n,o.depth+.25*l.xHeight),c=Pt.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:r}]},t)}return a=y(i,"right")||"mord",Pt.makeSpan([a],[i,Pt.makeSpan(["msupsub"],[c])],t)},mathmlBuilder(e,t){let r,n=!1,a=(e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0),[w(e.base,t)]),i;var o;return e.sub&&a.push(w(e.sub,t)),e.sup&&a.push(w(e.sup,t)),i=n?r?"mover":"munder":e.sub?e.sup?(o=e.base)&&"op"===o.type&&o.limits&&t.style===yt.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===yt.DISPLAY||o.limits)?"munderover":"msubsup":(o=e.base)&&"op"===o.type&&o.limits&&(t.style===yt.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||t.style===yt.DISPLAY)?"munder":"msub":(o=e.base)&&"op"===o.type&&o.limits&&(t.style===yt.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||t.style===yt.DISPLAY)?"mover":"msup",new Ut.MathNode(i,a)}}),S0({type:"atom",htmlBuilder(e,t){return Pt.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new Ut.MathNode("mo",[Yt(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=N0(e,t))&&r.setAttribute("mathvariant",t):"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false"),r}}),{mi:"italic",mn:"normal",mtext:"normal"}),I=(S0({type:"mathord",htmlBuilder(e,t){return Pt.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new Ut.MathNode("mi",[Yt(e.text,e.mode,t)]);return(e=N0(e,t)||"italic")!==Ke[r.type]&&r.setAttribute("mathvariant",e),r}}),S0({type:"textord",htmlBuilder(e,t){return Pt.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=Yt(e.text,e.mode,t),t=N0(e,t)||"normal",e="text"===e.mode?new Ut.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new Ut.MathNode("mn",[r]):"\\prime"===e.text?new Ut.MathNode("mo",[r]):new Ut.MathNode("mi",[r]);return t!==Ke[e.type]&&e.setAttribute("mathvariant",t),e}}),{"\\nobreak":"nobreak","\\allowbreak":"allowbreak"}),Je={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},Qe=(S0({type:"spacing",htmlBuilder(e,t){var r,n;if(Je.hasOwnProperty(e.text))return r=Je[e.text].className||"","text"!==e.mode?Pt.makeSpan(["mspace",r],[Pt.mathsym(e.text,e.mode,t)],t):((n=Pt.makeOrd(e,t,"textord")).classes.push(r),n);if(I.hasOwnProperty(e.text))return Pt.makeSpan(["mspace",I[e.text]],[],t);throw new ft('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(Je.hasOwnProperty(e.text))return new Ut.MathNode("mtext",[new Ut.TextNode(" ")]);if(I.hasOwnProperty(e.text))return new Ut.MathNode("mspace");throw new ft('Unknown type of space "'+e.text+'"')}}),()=>{var e=new Ut.MathNode("mtd",[]);return e.setAttribute("width","50%"),e}),et=(S0({type:"tag",mathmlBuilder(e,t){return(e=new Ut.MathNode("mtable",[new Ut.MathNode("mtr",[Qe(),new Ut.MathNode("mtd",[I0(e.body,t)]),Qe(),new Ut.MathNode("mtd",[I0(e.tag,t)])])])).setAttribute("width","100%"),e}}),{"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"}),tt={"\\textbf":"textbf","\\textmd":"textmd"},rt={"\\textit":"textit","\\textup":"textup"},nt=(e,t)=>(e=e.font)?et[e]?t.withTextFontFamily(et[e]):tt[e]?t.withTextFontWeight(tt[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(rt[e]):t,at=(Vt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"text",mode:e.mode,body:Ft(t),font:r}},htmlBuilder(e,t){return t=nt(e,t),e=Gt(e.body,t,!0),Pt.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=nt(e,t),I0(e.body,t)}}),Vt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"underline",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=P(e.body,t),r=Pt.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,r=Pt.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:e}]},t);return Pt.makeSpan(["mord","underline"],[r],t)},mathmlBuilder(e,t){var r=new Ut.MathNode("mo",[new Ut.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new Ut.MathNode("munder",[w(e.body,t),r])).setAttribute("accentunder","true"),e}}),Vt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){return{type:"vcenter",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=P(e.body,t),r=t.fontMetrics().axisHeight,r=.5*(e.height-r-(e.depth+r));return Pt.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new Ut.MathNode("mpadded",[w(e.body,t)],["vcenter"])}}),Vt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new ft("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){var n=at(r),a=[],i=e.havingStyle(e.style.text());for(let t=0;t<n.length;t++){let e=n[t];"~"===e&&(e="\\textasciitilde"),a.push(Pt.makeSymbol(e,"Typewriter-Regular",r.mode,i,["mord","texttt"]))}return Pt.makeSpan(["mord","text"].concat(i.sizingClasses(e)),Pt.tryCombineChars(a),i)},mathmlBuilder(e,t){return e=new Ut.TextNode(at(e)),(e=new Ut.MathNode("mtext",[e])).setAttribute("mathvariant","monospace"),e}}),e=>e.body.replace(/ /g,e.star?"␣":" "));var cr=se;let it=new RegExp("[̀-ͯ]+$");class Tr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Kt("EOF",new Zt(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new ft("Unexpected character: '"+e[t]+"'",new Kt(e[t],new Zt(this,t,t+1)));return r=r[6]||r[3]||(r[2]?"\\ ":" "),14!==this.catcodes[r]?new Kt(r,new Zt(this,t,this.tokenRegex.lastIndex)):(-1===(r=e.indexOf("\n",this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=r+1,this.lex())}}class Br{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new ft("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e,t=this.undefStack.pop();for(e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return(this.current.hasOwnProperty(e)?this.current:this.builtins)[e]}set(t,e,r){if(r=void 0!==r&&r){for(let e=0;e<this.undefStack.length;e++)delete this.undefStack[e][t];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][t]=e)}else(r=this.undefStack[this.undefStack.length-1])&&!r.hasOwnProperty(t)&&(r[t]=this.current[t]);null==e?delete this.current[t]:this.current[t]=e}}var pr=Oe;Wt("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Wt("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Wt("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Wt("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Wt("\\@ifnextchar",function(e){var t=e.consumeArgs(3),e=(e.consumeSpaces(),e.future());return 1===t[0].length&&t[0][0].text===e.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Wt("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Wt("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});let ot={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},st=(Wt("\\char",function(e){let t,r=e.popToken(),n="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new ft("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(null==(n=ot[r.text])||n>=t)throw new ft("Invalid base-"+t+" digit "+r.text);for(var a;null!=(a=ot[e.future().text])&&a<t;)n=n*t+a,e.popToken()}return"\\@char{"+n+"}"}),(r,e,t,n)=>{let a=r.consumeArg().tokens;if(1!==a.length)throw new ft("\\newcommand's first argument must be a macro name");var i=a[0].text,o=r.isDefined(i);if(o&&!e)throw new ft("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!t)throw new ft("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");let s=0;if(1===(a=r.consumeArg().tokens).length&&"["===a[0].text){let e="",t=r.expandNextToken();for(;"]"!==t.text&&"EOF"!==t.text;)e+=t.text,t=r.expandNextToken();if(!e.match(/^\s*[0-9]+\s*$/))throw new ft("Invalid number of arguments: "+e);s=parseInt(e),a=r.consumeArg().tokens}return o&&n||r.macros.set(i,{tokens:a,numArgs:s}),""}),lt=(Wt("\\newcommand",e=>st(e,!1,!0,!1)),Wt("\\renewcommand",e=>st(e,!0,!1,!1)),Wt("\\providecommand",e=>st(e,!0,!0,!0)),Wt("\\message",e=>(e=e.consumeArgs(1)[0],console.log(e.reverse().map(e=>e.text).join("")),"")),Wt("\\errmessage",e=>(e=e.consumeArgs(1)[0],console.error(e.reverse().map(e=>e.text).join("")),"")),Wt("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),cr[r],vt.math[r],vt.text[r]),""}),Wt("\\bgroup","{"),Wt("\\egroup","}"),Wt("~","\\nobreakspace"),Wt("\\lq","`"),Wt("\\rq","'"),Wt("\\aa","\\r a"),Wt("\\AA","\\r A"),Wt("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Wt("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Wt("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Wt("ℬ","\\mathscr{B}"),Wt("ℰ","\\mathscr{E}"),Wt("ℱ","\\mathscr{F}"),Wt("ℋ","\\mathscr{H}"),Wt("ℐ","\\mathscr{I}"),Wt("ℒ","\\mathscr{L}"),Wt("ℳ","\\mathscr{M}"),Wt("ℛ","\\mathscr{R}"),Wt("ℭ","\\mathfrak{C}"),Wt("ℌ","\\mathfrak{H}"),Wt("ℨ","\\mathfrak{Z}"),Wt("\\Bbbk","\\Bbb{k}"),Wt("·","\\cdotp"),Wt("\\llap","\\mathllap{\\textrm{#1}}"),Wt("\\rlap","\\mathrlap{\\textrm{#1}}"),Wt("\\clap","\\mathclap{\\textrm{#1}}"),Wt("\\mathstrut","\\vphantom{(}"),Wt("\\underbar","\\underline{\\text{#1}}"),Wt("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Wt("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Wt("\\ne","\\neq"),Wt("≠","\\neq"),Wt("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Wt("∉","\\notin"),Wt("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Wt("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Wt("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Wt("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Wt("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Wt("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Wt("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Wt("⟂","\\perp"),Wt("‼","\\mathclose{!\\mkern-0.8mu!}"),Wt("∌","\\notni"),Wt("⌜","\\ulcorner"),Wt("⌝","\\urcorner"),Wt("⌞","\\llcorner"),Wt("⌟","\\lrcorner"),Wt("©","\\copyright"),Wt("®","\\textregistered"),Wt("️","\\textregistered"),Wt("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Wt("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Wt("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Wt("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Wt("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Wt("⋮","\\vdots"),Wt("\\varGamma","\\mathit{\\Gamma}"),Wt("\\varDelta","\\mathit{\\Delta}"),Wt("\\varTheta","\\mathit{\\Theta}"),Wt("\\varLambda","\\mathit{\\Lambda}"),Wt("\\varXi","\\mathit{\\Xi}"),Wt("\\varPi","\\mathit{\\Pi}"),Wt("\\varSigma","\\mathit{\\Sigma}"),Wt("\\varUpsilon","\\mathit{\\Upsilon}"),Wt("\\varPhi","\\mathit{\\Phi}"),Wt("\\varPsi","\\mathit{\\Psi}"),Wt("\\varOmega","\\mathit{\\Omega}"),Wt("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Wt("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Wt("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Wt("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Wt("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Wt("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Wt("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Wt("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}"),{",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"}),ht=(Wt("\\dots",function(e){let t="\\dotso";return(e=e.expandAfterFuture().text)in lt?t=lt[e]:("\\not"===e.slice(0,4)||e in vt.math&&bt.contains(["bin","rel"],vt.math[e].group))&&(t="\\dotsb"),t}),{")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0}),mt=(Wt("\\dotso",function(e){return e.future().text in ht?"\\ldots\\,":"\\ldots"}),Wt("\\dotsc",function(e){return(e=e.future().text)in ht&&","!==e?"\\ldots\\,":"\\ldots"}),Wt("\\cdots",function(e){return e.future().text in ht?"\\@cdots\\,":"\\@cdots"}),Wt("\\dotsb","\\cdots"),Wt("\\dotsm","\\cdots"),Wt("\\dotsi","\\!\\cdots"),Wt("\\dotsx","\\ldots\\,"),Wt("\\DOTSI","\\relax"),Wt("\\DOTSB","\\relax"),Wt("\\DOTSX","\\relax"),Wt("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Wt("\\,","\\tmspace+{3mu}{.1667em}"),Wt("\\thinspace","\\,"),Wt("\\>","\\mskip{4mu}"),Wt("\\:","\\tmspace+{4mu}{.2222em}"),Wt("\\medspace","\\:"),Wt("\\;","\\tmspace+{5mu}{.2777em}"),Wt("\\thickspace","\\;"),Wt("\\!","\\tmspace-{3mu}{.1667em}"),Wt("\\negthinspace","\\!"),Wt("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Wt("\\negthickspace","\\tmspace-{5mu}{.277em}"),Wt("\\enspace","\\kern.5em "),Wt("\\enskip","\\hskip.5em\\relax"),Wt("\\quad","\\hskip1em\\relax"),Wt("\\qquad","\\hskip2em\\relax"),Wt("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Wt("\\tag@paren","\\tag@literal{({#1})}"),Wt("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new ft("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Wt("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Wt("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Wt("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Wt("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Wt("\\newline","\\\\\\relax"),Wt("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),Wt("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(Ct=D(xt["Main-Regular"]["T".charCodeAt(0)][1]-.7*xt["Main-Regular"]["A".charCodeAt(0)][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Wt("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Ct+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Wt("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Wt("\\@hspace","\\hskip #1\\relax"),Wt("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Wt("\\ordinarycolon",":"),Wt("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Wt("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Wt("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Wt("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Wt("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Wt("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Wt("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Wt("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Wt("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Wt("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Wt("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Wt("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Wt("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Wt("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Wt("∷","\\dblcolon"),Wt("∹","\\eqcolon"),Wt("≔","\\coloneqq"),Wt("≕","\\eqqcolon"),Wt("⩴","\\Coloneqq"),Wt("\\ratio","\\vcentcolon"),Wt("\\coloncolon","\\dblcolon"),Wt("\\colonequals","\\coloneqq"),Wt("\\coloncolonequals","\\Coloneqq"),Wt("\\equalscolon","\\eqqcolon"),Wt("\\equalscoloncolon","\\Eqqcolon"),Wt("\\colonminus","\\coloneq"),Wt("\\coloncolonminus","\\Coloneq"),Wt("\\minuscolon","\\eqcolon"),Wt("\\minuscoloncolon","\\Eqcolon"),Wt("\\coloncolonapprox","\\Colonapprox"),Wt("\\coloncolonsim","\\Colonsim"),Wt("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Wt("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Wt("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Wt("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Wt("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Wt("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Wt("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Wt("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Wt("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Wt("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Wt("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Wt("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Wt("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Wt("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Wt("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Wt("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Wt("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Wt("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Wt("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Wt("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Wt("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Wt("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Wt("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Wt("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Wt("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Wt("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Wt("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Wt("\\imath","\\html@mathml{\\@imath}{ı}"),Wt("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Wt("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Wt("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Wt("⟦","\\llbracket"),Wt("⟧","\\rrbracket"),Wt("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Wt("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Wt("⦃","\\lBrace"),Wt("⦄","\\rBrace"),Wt("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Wt("⦵","\\minuso"),Wt("\\darr","\\downarrow"),Wt("\\dArr","\\Downarrow"),Wt("\\Darr","\\Downarrow"),Wt("\\lang","\\langle"),Wt("\\rang","\\rangle"),Wt("\\uarr","\\uparrow"),Wt("\\uArr","\\Uparrow"),Wt("\\Uarr","\\Uparrow"),Wt("\\N","\\mathbb{N}"),Wt("\\R","\\mathbb{R}"),Wt("\\Z","\\mathbb{Z}"),Wt("\\alef","\\aleph"),Wt("\\alefsym","\\aleph"),Wt("\\Alpha","\\mathrm{A}"),Wt("\\Beta","\\mathrm{B}"),Wt("\\bull","\\bullet"),Wt("\\Chi","\\mathrm{X}"),Wt("\\clubs","\\clubsuit"),Wt("\\cnums","\\mathbb{C}"),Wt("\\Complex","\\mathbb{C}"),Wt("\\Dagger","\\ddagger"),Wt("\\diamonds","\\diamondsuit"),Wt("\\empty","\\emptyset"),Wt("\\Epsilon","\\mathrm{E}"),Wt("\\Eta","\\mathrm{H}"),Wt("\\exist","\\exists"),Wt("\\harr","\\leftrightarrow"),Wt("\\hArr","\\Leftrightarrow"),Wt("\\Harr","\\Leftrightarrow"),Wt("\\hearts","\\heartsuit"),Wt("\\image","\\Im"),Wt("\\infin","\\infty"),Wt("\\Iota","\\mathrm{I}"),Wt("\\isin","\\in"),Wt("\\Kappa","\\mathrm{K}"),Wt("\\larr","\\leftarrow"),Wt("\\lArr","\\Leftarrow"),Wt("\\Larr","\\Leftarrow"),Wt("\\lrarr","\\leftrightarrow"),Wt("\\lrArr","\\Leftrightarrow"),Wt("\\Lrarr","\\Leftrightarrow"),Wt("\\Mu","\\mathrm{M}"),Wt("\\natnums","\\mathbb{N}"),Wt("\\Nu","\\mathrm{N}"),Wt("\\Omicron","\\mathrm{O}"),Wt("\\plusmn","\\pm"),Wt("\\rarr","\\rightarrow"),Wt("\\rArr","\\Rightarrow"),Wt("\\Rarr","\\Rightarrow"),Wt("\\real","\\Re"),Wt("\\reals","\\mathbb{R}"),Wt("\\Reals","\\mathbb{R}"),Wt("\\Rho","\\mathrm{P}"),Wt("\\sdot","\\cdot"),Wt("\\sect","\\S"),Wt("\\spades","\\spadesuit"),Wt("\\sub","\\subset"),Wt("\\sube","\\subseteq"),Wt("\\supe","\\supseteq"),Wt("\\Tau","\\mathrm{T}"),Wt("\\thetasym","\\vartheta"),Wt("\\weierp","\\wp"),Wt("\\Zeta","\\mathrm{Z}"),Wt("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Wt("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Wt("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Wt("\\bra","\\mathinner{\\langle{#1}|}"),Wt("\\ket","\\mathinner{|{#1}\\rangle}"),Wt("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Wt("\\Bra","\\left\\langle#1\\right|"),Wt("\\Ket","\\left|#1\\right\\rangle"),Wt("\\bra@ket",(Rt=l=>e=>{let t=e.consumeArg().tokens,n=e.consumeArg().tokens,a=e.consumeArg().tokens,r=e.consumeArg().tokens,i=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var s=r=>e=>{l&&(e.macros.set("|",i),a.length)&&e.macros.set("\\|",o);let t=r;return!r&&a.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?a:n,numArgs:0}},s=(e.macros.set("|",s(!1)),a.length&&e.macros.set("\\|",s(!0)),e.consumeArg().tokens),s=e.expandTokens([...r,...s,...t]);return e.macros.endGroup(),{tokens:s.reverse(),numArgs:0}})(!1)),Wt("\\bra@set",Rt(!0)),Wt("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Wt("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Wt("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Wt("\\angln","{\\angl n}"),Wt("\\blue","\\textcolor{##6495ed}{#1}"),Wt("\\orange","\\textcolor{##ffa500}{#1}"),Wt("\\pink","\\textcolor{##ff00af}{#1}"),Wt("\\red","\\textcolor{##df0030}{#1}"),Wt("\\green","\\textcolor{##28ae7b}{#1}"),Wt("\\gray","\\textcolor{gray}{#1}"),Wt("\\purple","\\textcolor{##9d38bd}{#1}"),Wt("\\blueA","\\textcolor{##ccfaff}{#1}"),Wt("\\blueB","\\textcolor{##80f6ff}{#1}"),Wt("\\blueC","\\textcolor{##63d9ea}{#1}"),Wt("\\blueD","\\textcolor{##11accd}{#1}"),Wt("\\blueE","\\textcolor{##0c7f99}{#1}"),Wt("\\tealA","\\textcolor{##94fff5}{#1}"),Wt("\\tealB","\\textcolor{##26edd5}{#1}"),Wt("\\tealC","\\textcolor{##01d1c1}{#1}"),Wt("\\tealD","\\textcolor{##01a995}{#1}"),Wt("\\tealE","\\textcolor{##208170}{#1}"),Wt("\\greenA","\\textcolor{##b6ffb0}{#1}"),Wt("\\greenB","\\textcolor{##8af281}{#1}"),Wt("\\greenC","\\textcolor{##74cf70}{#1}"),Wt("\\greenD","\\textcolor{##1fab54}{#1}"),Wt("\\greenE","\\textcolor{##0d923f}{#1}"),Wt("\\goldA","\\textcolor{##ffd0a9}{#1}"),Wt("\\goldB","\\textcolor{##ffbb71}{#1}"),Wt("\\goldC","\\textcolor{##ff9c39}{#1}"),Wt("\\goldD","\\textcolor{##e07d10}{#1}"),Wt("\\goldE","\\textcolor{##a75a05}{#1}"),Wt("\\redA","\\textcolor{##fca9a9}{#1}"),Wt("\\redB","\\textcolor{##ff8482}{#1}"),Wt("\\redC","\\textcolor{##f9685d}{#1}"),Wt("\\redD","\\textcolor{##e84d39}{#1}"),Wt("\\redE","\\textcolor{##bc2612}{#1}"),Wt("\\maroonA","\\textcolor{##ffbde0}{#1}"),Wt("\\maroonB","\\textcolor{##ff92c6}{#1}"),Wt("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Wt("\\maroonD","\\textcolor{##ca337c}{#1}"),Wt("\\maroonE","\\textcolor{##9e034e}{#1}"),Wt("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Wt("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Wt("\\purpleC","\\textcolor{##aa87ff}{#1}"),Wt("\\purpleD","\\textcolor{##7854ab}{#1}"),Wt("\\purpleE","\\textcolor{##543b78}{#1}"),Wt("\\mintA","\\textcolor{##f5f9e8}{#1}"),Wt("\\mintB","\\textcolor{##edf2df}{#1}"),Wt("\\mintC","\\textcolor{##e0e5cc}{#1}"),Wt("\\grayA","\\textcolor{##f6f7f7}{#1}"),Wt("\\grayB","\\textcolor{##f0f1f2}{#1}"),Wt("\\grayC","\\textcolor{##e3e5e6}{#1}"),Wt("\\grayD","\\textcolor{##d6d8da}{#1}"),Wt("\\grayE","\\textcolor{##babec2}{#1}"),Wt("\\grayF","\\textcolor{##888d93}{#1}"),Wt("\\grayG","\\textcolor{##626569}{#1}"),Wt("\\grayH","\\textcolor{##3b3e40}{#1}"),Wt("\\grayI","\\textcolor{##21242c}{#1}"),Wt("\\kaBlue","\\textcolor{##314453}{#1}"),Wt("\\kaGreen","\\textcolor{##71B307}{#1}"),{"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0});class Cr{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Br(pr,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Tr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new Kt("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){let t=[],r=e&&0<e.length,n=(r||this.consumeSpaces(),this.future()),a,i=0,o=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++i;else if("}"===a.text){if(-1==--i)throw new ft("Extra }",a)}else if("EOF"===a.text)throw new ft("Unexpected end of input in a macro argument, expected '"+(e&&r?e[o]:"}")+"'",a);if(e&&r)if((0===i||1===i&&"{"===e[o])&&a.text===e[o]){if(++o===e.length){t.splice(-o,o);break}}else o=0}while(0!==i||r);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new ft("The length of delimiters doesn't match the number of args!");var n=r[0];for(let e=0;e<n.length;e++){var a=this.popToken();if(n[e]!==a.text)throw new ft("Use of the macro doesn't match its definition",a)}}var i=[];for(let e=0;e<t;e++)i.push(this.consumeArg(r&&r[e+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new ft("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new ft("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);let a=n.tokens,i=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(let e=(a=a.slice()).length-1;0<=e;--e){var o=a[e];if("#"===o.text){if(0===e)throw new ft("Incomplete placeholder at end of macro body",o);if("#"===(o=a[--e]).text)a.splice(e+1,1);else{if(!/^[1-9]$/.test(o.text))throw new ft("Not a valid argument number",o);a.splice(e,2,...i[+o.text-1])}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Kt(e)]):void 0}expandTokens(e){var t,r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)!1===this.expandOnce(!0)&&((t=this.stack.pop()).treatAsRelax&&(t.noexpand=!1,t.treatAsRelax=!1),r.push(t));return this.countExpansion(r.length),r}expandMacroAsText(e){return(e=this.expandMacro(e))&&e.map(e=>e.text).join("")}_getExpansion(a){var e=this.macros.get(a);if(null==e)return e;if(1===a.length){var t=this.lexer.catcodes[a];if(null!=t&&13!==t)return}if("string"!=typeof(a="function"==typeof e?e(this):e))return a;{let e=0;if(-1!==a.indexOf("#"))for(var i=a.replace(/##/g,"");-1!==i.indexOf("#"+(e+1));)++e;let t=new Tr(a,this.settings),r=[],n=t.lex();for(;"EOF"!==n.text;)r.push(n),n=t.lex();return r.reverse(),{tokens:r,numArgs:e}}}isDefined(e){return this.macros.has(e)||cr.hasOwnProperty(e)||vt.math.hasOwnProperty(e)||vt.text.hasOwnProperty(e)||mt.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:cr.hasOwnProperty(e)&&!cr[e].primitive}}let ct=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,R=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),pt={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},dt={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class Nr{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Cr(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new ft("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken,e=(this.consume(),this.gullet.pushToken(new Kt("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==Nr.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&cr[n.text]&&cr[n.text].infix)break;if(!(n=this.parseAtom(t)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){let r,n=-1;for(let e=0;e<t.length;e++)if("infix"===t[e].type){if(-1!==n)throw new ft("only one infix operator per group",t[e].token);n=e,r=t[e].replaceWith}var e,a;return-1!==n&&r?(e=t.slice(0,n),a=t.slice(n+1),e=1===e.length&&"ordgroup"===e[0].type?e[0]:{type:"ordgroup",mode:this.mode,body:e},a=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},["\\\\abovefrac"===r?this.callFunction(r,[e,t[n],a],[]):this.callFunction(r,[e,a],[])]):t}handleSupSubscript(e){let t,r=this.fetch(),n=r.text,a;for(this.consume(),this.consumeSpaces();"internal"===(null==(t=a=this.parseGroup(e))?void 0:t.type););if(a)return a;throw new ft("Expected group after '"+n+"'",r)}formatUnsupportedCmd(t){var r=[];for(let e=0;e<t.length;e++)r.push({type:"textord",mode:"text",text:t[e]});var e={type:"text",mode:this.mode,body:r};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[e]}}parseAtom(e){var t=this.parseGroup("atom",e);if("internal"===(null==t?void 0:t.type))return t;if("text"===this.mode)return t;let r,n;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(t&&"op"===t.type){var i="\\limits"===a.text;t.limits=i,t.alwaysHandleSupSub=!0}else{if(!t||"operatorname"!==t.type)throw new ft("Limit controls must follow a math operator",a);t.alwaysHandleSupSub&&(t.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(r)throw new ft("Double superscript",a);r=this.handleSupSubscript("superscript")}else if("_"===a.text){if(n)throw new ft("Double subscript",a);n=this.handleSupSubscript("subscript")}else if("'"===a.text){if(r)throw new ft("Double superscript",a);var o={type:"textord",mode:this.mode,text:"\\prime"},s=[o];for(this.consume();"'"===this.fetch().text;)s.push(o),this.consume();"^"===this.fetch().text&&s.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:s}}else{if(!R[a.text])break;var l=ct.test(a.text),h=[];for(h.push(new Kt(R[a.text])),this.consume();;){var m=this.fetch().text;if(!R[m])break;if(ct.test(m)!==l)break;h.unshift(new Kt(R[m])),this.consume()}i=this.subparse(h),l?n={type:"ordgroup",mode:"math",body:i}:r={type:"ordgroup",mode:"math",body:i}}}return r||n?{type:"supsub",mode:this.mode,base:t,sup:r,sub:n}:t}parseFunction(e,t){var r=this.fetch(),n=r.text;if(!(a=cr[n]))return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new ft("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!a.allowedInText)throw new ft("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===a.allowedInMath)throw new ft("Can't use function '"+n+"' in math mode",r);var{args:t,optArgs:a}=this.parseArguments(n,a);return this.callFunction(n,t,a,r,e)}callFunction(e,t,r,n,a){var i=cr[e];if(i&&i.handler)return i.handler({funcName:e,parser:this,token:n,breakOnTokenText:a},t,r);throw new ft("No function handler for "+e)}parseArguments(a,i){var e=i.numArgs+i.numOptionalArgs;if(0===e)return{args:[],optArgs:[]};var o=[],s=[];for(let n=0;n<e;n++){let e=i.argTypes&&i.argTypes[n],t=n<i.numOptionalArgs,r=((i.primitive&&null==e||"sqrt"===i.type&&1===n&&null==s[0])&&(e="primitive"),this.parseGroupOfType("argument to '"+a+"'",e,t));if(t)s.push(r);else{if(null==r)throw new ft("Null argument, please report this as a bug");o.push(r)}}return{args:o,optArgs:s}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":return null!=(n=this.parseStringGroup("raw",r))?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new ft("A primitive argument cannot be optional");if(null==(n=this.parseGroup(e)))throw new ft("Expected group as "+e,this.fetch());return n;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new ft("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){if(null==(t=this.gullet.scanArgument(t)))return null;let r,n="";for(;"EOF"!==(r=this.fetch()).text;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){let r=this.fetch(),n,a=r,i="";for(;"EOF"!==(n=this.fetch()).text&&e.test(i+n.text);)a=n,i+=a.text,this.consume();if(""===i)throw new ft("Invalid "+t+": '"+r.text+"'",r);return r.range(a,i)}parseColorGroup(e){if(null==(e=this.parseStringGroup("color",e)))return null;var t=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(!t)throw new ft("Invalid color: '"+e.text+"'",e);let r=t[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){let t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;if(e||0!==t.text.length||(t.text="0pt",r=!0),!(e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text)))throw new ft("Invalid size: '"+t.text+"'",t);if(i0(e={number:+(e[1]+e[2]),unit:e[3]}))return{type:"size",mode:this.mode,value:e,isBlank:r};throw new ft("Invalid unit: '"+e.unit+"'",t)}parseUrlGroup(e){return this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12),e=this.parseStringGroup("url",e),this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e?null:(e=e.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:e})}parseArgumentGroup(e,t){var r,n;return null==(e=this.gullet.scanArgument(e))?null:(r=this.mode,t&&this.switchMode(t),this.gullet.beginGroup(),n=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),e={type:"ordgroup",mode:this.mode,loc:e.loc,body:n},t&&this.switchMode(r),e)}parseGroup(e,t){let r=this.fetch(),n=r.text,a;if("{"===n||"\\begingroup"===n){this.consume();var i="{"===n?"}":"\\endgroup",o=(this.gullet.beginGroup(),this.parseExpression(!1,i)),s=this.fetch();this.expect(i),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:Zt.range(r,s),body:o,semisimple:"\\begingroup"===n||void 0}}else if(null==(a=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===n[0]&&!mt.hasOwnProperty(n)){if(this.settings.throwOnError)throw new ft("Undefined control sequence: "+n,r);a=this.formatUnsupportedCmd(n),this.consume()}return a}formLigatures(t){let r=t.length-1;for(let e=0;e<r;++e){var n=t[e],a=n.text;"-"===a&&"-"===t[e+1].text&&(e+1<r&&"-"===t[e+2].text?(t.splice(e,3,{type:"textord",mode:"text",loc:Zt.range(n,t[e+2]),text:"---"}),r-=2):(t.splice(e,2,{type:"textord",mode:"text",loc:Zt.range(n,t[e+1]),text:"--"}),--r)),"'"!==a&&"`"!==a||t[e+1].text!==a||(t.splice(e,2,{type:"textord",mode:"text",loc:Zt.range(n,t[e+1]),text:a+a}),--r)}}parseSymbol(){let t=this.fetch(),r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();let e=r.slice(5),t="*"===e.charAt(0);if((e=t?e.slice(1):e).length<2||e.charAt(0)!==e.slice(-1))throw new ft("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:e=e.slice(1,-1),star:t}}dt.hasOwnProperty(r[0])&&!vt[this.mode][r[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=dt[r[0]]+r.slice(1));let n=it.exec(r),a;if(n&&("i"===(r=r.substring(0,n.index))?r="ı":"j"===r&&(r="ȷ")),vt[this.mode][r]){this.settings.strict&&"math"===this.mode&&0<="ÐÞþ".indexOf(r)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var e=vt[this.mode][r].group,i=Zt.range(t),e=J.hasOwnProperty(e)?{type:"atom",mode:this.mode,family:e,loc:i,text:r}:{type:e,mode:this.mode,loc:i,text:r};a=e}else{if(!(128<=r.charCodeAt(0)))return null;this.settings.strict&&(t0(r.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'" ('+r.charCodeAt(0)+")",t)),a={type:"textord",mode:"text",loc:Zt.range(t),text:r}}if(this.consume(),n)for(let e=0;e<n[0].length;e++){var o=n[0][e];if(!pt[o])throw new ft("Unknown accent ' "+o+"'",t);var s=pt[o][this.mode]||pt[o].text;if(!s)throw new ft("Accent "+o+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:Zt.range(t),label:s,isStretchy:!1,isShifty:!0,base:a}}return a}}function dr(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new Nr(e,t)).gullet.macros.current["\\df@tag"];let r=e.parse();if(delete e.gullet.macros.current["\\current@color"],delete e.gullet.macros.current["\\color"],e.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new ft("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:e.subparse([new Kt("\\df@tag")])}]}return r}function ur(e,t,r){if(!r.throwOnError&&e instanceof ft)return(t=Pt.makeSpan(["katex-error"],[new jt(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+r.errorColor),t;throw e}Nr.endOfExpression=["}","\\endgroup","\\end","\\right","&"];let ut=function(e,t,r){t.textContent="",e=gt(e,r).toNode(),t.appendChild(e)},gt=("undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),ut=function(){throw new ft("KaTeX doesn't work in quirks mode.")}),function(e,t){var r=new br(t);try{var n,a,i=dr(e,r),o=e,s=r,l=de(s);return"mathml"===s.output?R0(i,o,l,s.displayMode,!0):(a="html"===s.output?(n=T0(i,l),Pt.makeSpan(["katex"],[n])):(o=R0(i,o,l,s.displayMode,!1),i=T0(i,l),Pt.makeSpan(["katex"],[o,i])),ue(a,s))}catch(t){return ur(t,e,r)}});var gr={version:"0.16.22",render:ut,renderToString:function(e,t){return gt(e,t).toMarkup()},ParseError:ft,SETTINGS_SCHEMA:n,__parse:function(e,t){return dr(e,t=new br(t))},__renderToDomTree:gt,__renderToHTMLTree:function(e,t){var r=new br(t);try{var n=dr(e,r),a=r,n=T0(n,de(a));return n=Pt.makeSpan(["katex"],[n]),ue(n,a)}catch(t){return ur(t,e,r)}},__setFontMetrics:function(e,t){xt[e]=t},__defineSymbol:kt,__defineFunction:Vt,__defineMacro:Wt,__domTree:{Span:vr,Anchor:kr,SymbolNode:jt,SvgNode:Mr,PathNode:zr,LineNode:Ar}};return Qt.default}}),((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)})("undefined"!=typeof self?self:this,function(t){return r={771:function(e){e.exports=t}},a={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.d(p={},{default:function(){return o}}),e=n(771),s=n.n(e),l=function(e,t,r){for(var n=r,a=0,i=e.length;n<t.length;){var o=t[n];if(a<=0&&t.slice(n,n+i)===e)return n;"\\"===o?n++:"{"===o?a++:"}"===o&&a--,n++}return-1},h=/^\\begin{/,m=function(t,e){for(var r,n=[],a=RegExp("("+e.map(function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}).join("|")+")");-1!==(r=t.search(a));){0<r&&(n.push({type:"text",data:t.slice(0,r)}),t=t.slice(r));var i=e.findIndex(function(e){return t.startsWith(e.left)});if(-1===(r=l(e[i].right,t,e[i].left.length)))break;var o=t.slice(0,r+e[i].right.length),s=h.test(o)?o:t.slice(e[i].left.length,r);n.push({type:"math",data:s,rawData:o,display:e[i].display}),t=t.slice(r+e[i].right.length)}return""!==t&&n.push({type:"text",data:t}),n},c=function(e,t){var r=m(e,t.delimiters);if(1===r.length&&"text"===r[0].type)return null;for(var n=document.createDocumentFragment(),a=0;a<r.length;a++)if("text"===r[a].type)n.appendChild(document.createTextNode(r[a].data));else{var i=document.createElement("span"),o=r[a].data;t.displayMode=r[a].display;try{t.preProcess&&(o=t.preProcess(o)),s().render(o,i,t)}catch(e){if(!(e instanceof s().ParseError))throw e;t.errorCallback("KaTeX auto-render: Failed to parse `"+r[a].data+"` with ",e),n.appendChild(document.createTextNode(r[a].rawData));continue}n.appendChild(i)}return n},i=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var a=t.childNodes[n];if(3===a.nodeType){for(var i=a.textContent,o=a.nextSibling,s=0;o&&o.nodeType===Node.TEXT_NODE;)i+=o.textContent,o=o.nextSibling,s++;var l=c(i,r);if(l){for(var h=0;h<s;h++)a.nextSibling.remove();n+=l.childNodes.length-1,t.replaceChild(l,a)}else n+=s}else 1===a.nodeType&&(()=>{var t=" "+a.className+" ";-1===r.ignoredTags.indexOf(a.nodeName.toLowerCase())&&r.ignoredClasses.every(function(e){return-1===t.indexOf(" "+e+" ")})&&e(a,r)})()}},o=function(e,t){if(!e)throw Error("No element provided to render");var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},i(e,n)},p.default;function n(e){var t=a[e];return void 0===t&&(t=a[e]={exports:{}},r[e](t,t.exports,n)),t.exports}var r,a,e,s,l,h,m,c,i,o,p}),document.addEventListener("DOMContentLoaded",function(){renderMathInElement(document.body)}); diff --git a/themes/tabi-lean/static/js/loadComments.js b/themes/tabi-lean/static/js/loadComments.js new file mode 100644 index 0000000..911f1ca --- /dev/null +++ b/themes/tabi-lean/static/js/loadComments.js @@ -0,0 +1,26 @@ +// Wait for the full HTML document to be parsed and ready. +document.addEventListener('DOMContentLoaded', () => { + // Retrieve the button element. + const loadCommentsButton = document.querySelector('#load-comments'); + + // If the button exists… + if (loadCommentsButton) { + // Add a "click" event listener to the button. + loadCommentsButton.addEventListener('click', () => { + // Create a new "script" HTML element. + const script = document.createElement('script'); + + // Set the source of the script to the URL in the button's "data-script-src" attribute. + script.src = loadCommentsButton.dataset.scriptSrc; + + // Load asynchronously. + script.async = true; + + // Add the script element to the end of the document body, which causes the script to start loading and executing. + document.body.appendChild(script); + + // Hide the button after it's clicked. + loadCommentsButton.style.display = 'none'; + }); + } +}); diff --git a/themes/tabi-lean/static/js/loadComments.min.js b/themes/tabi-lean/static/js/loadComments.min.js new file mode 100644 index 0000000..ef14653 --- /dev/null +++ b/themes/tabi-lean/static/js/loadComments.min.js @@ -0,0 +1 @@ +document.addEventListener("DOMContentLoaded",()=>{const t=document.querySelector("#load-comments");t&&t.addEventListener("click",()=>{var e=document.createElement("script");e.src=t.dataset.scriptSrc,e.async=!0,document.body.appendChild(e),t.style.display="none"})}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.da.js b/themes/tabi-lean/static/js/lunr/lunr.da.js new file mode 100644 index 0000000..32c6d01 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.da.js @@ -0,0 +1,280 @@ +/*! + * Lunr languages, `Danish` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.da = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.da.trimmer, + lunr.da.stopWordFilter, + lunr.da.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.da.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.da.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.da.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.da.trimmer, 'trimmer-da'); + + /* lunr stemmer function */ + lunr.da.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function DanishStemmer() { + var a_0 = [new Among("hed", -1, 1), new Among("ethed", 0, 1), + new Among("ered", -1, 1), new Among("e", -1, 1), + new Among("erede", 3, 1), new Among("ende", 3, 1), + new Among("erende", 5, 1), new Among("ene", 3, 1), + new Among("erne", 3, 1), new Among("ere", 3, 1), + new Among("en", -1, 1), new Among("heden", 10, 1), + new Among("eren", 10, 1), new Among("er", -1, 1), + new Among("heder", 13, 1), new Among("erer", 13, 1), + new Among("s", -1, 2), new Among("heds", 16, 1), + new Among("es", 16, 1), new Among("endes", 18, 1), + new Among("erendes", 19, 1), new Among("enes", 18, 1), + new Among("ernes", 18, 1), new Among("eres", 18, 1), + new Among("ens", 16, 1), new Among("hedens", 24, 1), + new Among("erens", 24, 1), new Among("ers", 16, 1), + new Among("ets", 16, 1), new Among("erets", 28, 1), + new Among("et", -1, 1), new Among("eret", 30, 1) + ], + a_1 = [ + new Among("gd", -1, -1), new Among("dt", -1, -1), + new Among("gt", -1, -1), new Among("kt", -1, -1) + ], + a_2 = [ + new Among("ig", -1, 1), new Among("lig", 0, 1), + new Among("elig", 1, 1), new Among("els", -1, 1), + new Among("l\u00F8st", -1, 2) + ], + g_v = [17, 65, 16, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 + ], + g_s_ending = [239, 254, 42, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 + ], + I_x, I_p1, S_ch, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function r_mark_regions() { + var v_1, c = sbp.cursor + 3; + I_p1 = sbp.limit; + if (0 <= c && c <= sbp.limit) { + I_x = c; + while (true) { + v_1 = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 248)) { + sbp.cursor = v_1; + break; + } + sbp.cursor = v_1; + if (v_1 >= sbp.limit) + return; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 248)) { + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + } + I_p1 = sbp.cursor; + if (I_p1 < I_x) + I_p1 = I_x; + } + } + + function r_main_suffix() { + var among_var, v_1; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_0, 32); + sbp.limit_backward = v_1; + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_del(); + break; + case 2: + if (sbp.in_grouping_b(g_s_ending, 97, 229)) + sbp.slice_del(); + break; + } + } + } + } + + function r_consonant_pair() { + var v_1 = sbp.limit - sbp.cursor, + v_2; + if (sbp.cursor >= I_p1) { + v_2 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + if (sbp.find_among_b(a_1, 4)) { + sbp.bra = sbp.cursor; + sbp.limit_backward = v_2; + sbp.cursor = sbp.limit - v_1; + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + sbp.bra = sbp.cursor; + sbp.slice_del(); + } + } else + sbp.limit_backward = v_2; + } + } + + function r_other_suffix() { + var among_var, v_1 = sbp.limit - sbp.cursor, + v_2, v_3; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "st")) { + sbp.bra = sbp.cursor; + if (sbp.eq_s_b(2, "ig")) + sbp.slice_del(); + } + sbp.cursor = sbp.limit - v_1; + if (sbp.cursor >= I_p1) { + v_2 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_2, 5); + sbp.limit_backward = v_2; + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_del(); + v_3 = sbp.limit - sbp.cursor; + r_consonant_pair(); + sbp.cursor = sbp.limit - v_3; + break; + case 2: + sbp.slice_from("l\u00F8s"); + break; + } + } + } + } + + function r_undouble() { + var v_1; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + if (sbp.out_grouping_b(g_v, 97, 248)) { + sbp.bra = sbp.cursor; + S_ch = sbp.slice_to(S_ch); + sbp.limit_backward = v_1; + if (sbp.eq_v_b(S_ch)) + sbp.slice_del(); + } else + sbp.limit_backward = v_1; + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_main_suffix(); + sbp.cursor = sbp.limit; + r_consonant_pair(); + sbp.cursor = sbp.limit; + r_other_suffix(); + sbp.cursor = sbp.limit; + r_undouble(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.da.stemmer, 'stemmer-da'); + + /* stop word filter function */ + lunr.da.stopWordFilter = function(token) { + if (lunr.da.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.da.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.da.stopWordFilter.stopWords.length = 95; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.da.stopWordFilter.stopWords.elements = ' ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været'.split(' '); + + lunr.Pipeline.registerFunction(lunr.da.stopWordFilter, 'stopWordFilter-da'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.da.min.js b/themes/tabi-lean/static/js/lunr/lunr.da.min.js new file mode 100644 index 0000000..eb41d29 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.da.min.js @@ -0,0 +1 @@ +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,t,i;r.da=function(){this.pipeline.reset(),this.pipeline.add(r.da.trimmer,r.da.stopWordFilter,r.da.stemmer)},r.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.da.trimmer=r.trimmerSupport.generateTrimmer(r.da.wordCharacters),r.Pipeline.registerFunction(r.da.trimmer,"trimmer-da"),r.da.stemmer=(e=r.stemmerSupport.Among,t=r.stemmerSupport.SnowballProgram,i=new function(){var n,s,o,d=[new e("hed",-1,1),new e("ethed",0,1),new e("ered",-1,1),new e("e",-1,1),new e("erede",3,1),new e("ende",3,1),new e("erende",5,1),new e("ene",3,1),new e("erne",3,1),new e("ere",3,1),new e("en",-1,1),new e("heden",10,1),new e("eren",10,1),new e("er",-1,1),new e("heder",13,1),new e("erer",13,1),new e("s",-1,2),new e("heds",16,1),new e("es",16,1),new e("endes",18,1),new e("erendes",19,1),new e("enes",18,1),new e("ernes",18,1),new e("eres",18,1),new e("ens",16,1),new e("hedens",24,1),new e("erens",24,1),new e("ers",16,1),new e("ets",16,1),new e("erets",28,1),new e("et",-1,1),new e("eret",30,1)],i=[new e("gd",-1,-1),new e("dt",-1,-1),new e("gt",-1,-1),new e("kt",-1,-1)],a=[new e("ig",-1,1),new e("lig",0,1),new e("elig",1,1),new e("els",-1,1),new e("løst",-1,2)],u=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],l=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],c=new t;function m(){var e,r=c.limit-c.cursor;c.cursor>=s&&(e=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,c.find_among_b(i,4)?(c.bra=c.cursor,c.limit_backward=e,c.cursor=c.limit-r,c.cursor>c.limit_backward&&(c.cursor--,c.bra=c.cursor,c.slice_del())):c.limit_backward=e)}this.setCurrent=function(e){c.setCurrent(e)},this.getCurrent=function(){return c.getCurrent()},this.stem=function(){var e,r=c.cursor;if(function(){var e,r=c.cursor+3;if(s=c.limit,0<=r&&r<=c.limit){for(n=r;;){if(e=c.cursor,c.in_grouping(u,97,248)){c.cursor=e;break}if((c.cursor=e)>=c.limit)return;c.cursor++}for(;!c.out_grouping(u,97,248);){if(c.cursor>=c.limit)return;c.cursor++}(s=c.cursor)<n&&(s=n)}}(),c.limit_backward=r,c.cursor=c.limit,c.cursor>=s&&(r=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,e=c.find_among_b(d,32),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del();break;case 2:c.in_grouping_b(l,97,229)&&c.slice_del()}c.cursor=c.limit,m(),c.cursor=c.limit;var i,t,r=c.limit-c.cursor;if(c.ket=c.cursor,c.eq_s_b(2,"st")&&(c.bra=c.cursor,c.eq_s_b(2,"ig"))&&c.slice_del(),c.cursor=c.limit-r,c.cursor>=s&&(r=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,i=c.find_among_b(a,5),c.limit_backward=r,i))switch(c.bra=c.cursor,i){case 1:c.slice_del(),t=c.limit-c.cursor,m(),c.cursor=c.limit-t;break;case 2:c.slice_from("løs")}return c.cursor=c.limit,c.cursor>=s&&(e=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,c.out_grouping_b(u,97,248)?(c.bra=c.cursor,o=c.slice_to(o),c.limit_backward=e,c.eq_v_b(o)&&c.slice_del()):c.limit_backward=e),!0}},function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}),r.Pipeline.registerFunction(r.da.stemmer,"stemmer-da"),r.da.stopWordFilter=function(e){if(-1===r.da.stopWordFilter.stopWords.indexOf(e))return e},r.da.stopWordFilter.stopWords=new r.SortedSet,r.da.stopWordFilter.stopWords.length=95,r.da.stopWordFilter.stopWords.elements=" ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" "),r.Pipeline.registerFunction(r.da.stopWordFilter,"stopWordFilter-da")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.de.js b/themes/tabi-lean/static/js/lunr/lunr.de.js new file mode 100644 index 0000000..5cd9243 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.de.js @@ -0,0 +1,380 @@ +/*! + * Lunr languages, `German` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.de = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.de.trimmer, + lunr.de.stopWordFilter, + lunr.de.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.de.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.de.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.de.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.de.trimmer, 'trimmer-de'); + + /* lunr stemmer function */ + lunr.de.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function GermanStemmer() { + var a_0 = [new Among("", -1, 6), new Among("U", 0, 2), + new Among("Y", 0, 1), new Among("\u00E4", 0, 3), + new Among("\u00F6", 0, 4), new Among("\u00FC", 0, 5) + ], + a_1 = [ + new Among("e", -1, 2), new Among("em", -1, 1), + new Among("en", -1, 2), new Among("ern", -1, 1), + new Among("er", -1, 1), new Among("s", -1, 3), + new Among("es", 5, 2) + ], + a_2 = [new Among("en", -1, 1), + new Among("er", -1, 1), new Among("st", -1, 2), + new Among("est", 2, 1) + ], + a_3 = [new Among("ig", -1, 1), + new Among("lich", -1, 1) + ], + a_4 = [new Among("end", -1, 1), + new Among("ig", -1, 2), new Among("ung", -1, 1), + new Among("lich", -1, 3), new Among("isch", -1, 2), + new Among("ik", -1, 2), new Among("heit", -1, 3), + new Among("keit", -1, 4) + ], + g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 + ], + g_s_ending = [117, 30, 5], + g_st_ending = [ + 117, 30, 4 + ], + I_x, I_p2, I_p1, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function habr1(c1, c2, v_1) { + if (sbp.eq_s(1, c1)) { + sbp.ket = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 252)) { + sbp.slice_from(c2); + sbp.cursor = v_1; + return true; + } + } + return false; + } + + function r_prelude() { + var v_1 = sbp.cursor, + v_2, v_3, v_4, v_5; + while (true) { + v_2 = sbp.cursor; + sbp.bra = v_2; + if (sbp.eq_s(1, "\u00DF")) { + sbp.ket = sbp.cursor; + sbp.slice_from("ss"); + } else { + if (v_2 >= sbp.limit) + break; + sbp.cursor = v_2 + 1; + } + } + sbp.cursor = v_1; + while (true) { + v_3 = sbp.cursor; + while (true) { + v_4 = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 252)) { + v_5 = sbp.cursor; + sbp.bra = v_5; + if (habr1("u", "U", v_4)) + break; + sbp.cursor = v_5; + if (habr1("y", "Y", v_4)) + break; + } + if (v_4 >= sbp.limit) { + sbp.cursor = v_3; + return; + } + sbp.cursor = v_4 + 1; + } + } + } + + function habr2() { + while (!sbp.in_grouping(g_v, 97, 252)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 252)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + return false; + } + + function r_mark_regions() { + I_p1 = sbp.limit; + I_p2 = I_p1; + var c = sbp.cursor + 3; + if (0 <= c && c <= sbp.limit) { + I_x = c; + if (!habr2()) { + I_p1 = sbp.cursor; + if (I_p1 < I_x) + I_p1 = I_x; + if (!habr2()) + I_p2 = sbp.cursor; + } + } + } + + function r_postlude() { + var among_var, v_1; + while (true) { + v_1 = sbp.cursor; + sbp.bra = v_1; + among_var = sbp.find_among(a_0, 6); + if (!among_var) + return; + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("y"); + break; + case 2: + case 5: + sbp.slice_from("u"); + break; + case 3: + sbp.slice_from("a"); + break; + case 4: + sbp.slice_from("o"); + break; + case 6: + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + break; + } + } + } + + function r_R1() { + return I_p1 <= sbp.cursor; + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function r_standard_suffix() { + var among_var, v_1 = sbp.limit - sbp.cursor, + v_2, v_3, v_4; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_1, 7); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + sbp.slice_del(); + break; + case 2: + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "s")) { + sbp.bra = sbp.cursor; + if (sbp.eq_s_b(3, "nis")) + sbp.slice_del(); + } + break; + case 3: + if (sbp.in_grouping_b(g_s_ending, 98, 116)) + sbp.slice_del(); + break; + } + } + } + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_2, 4); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + sbp.slice_del(); + break; + case 2: + if (sbp.in_grouping_b(g_st_ending, 98, 116)) { + var c = sbp.cursor - 3; + if (sbp.limit_backward <= c && c <= sbp.limit) { + sbp.cursor = c; + sbp.slice_del(); + } + } + break; + } + } + } + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_4, 8); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R2()) { + switch (among_var) { + case 1: + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "ig")) { + sbp.bra = sbp.cursor; + v_2 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "e")) { + sbp.cursor = sbp.limit - v_2; + if (r_R2()) + sbp.slice_del(); + } + } + break; + case 2: + v_3 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "e")) { + sbp.cursor = sbp.limit - v_3; + sbp.slice_del(); + } + break; + case 3: + sbp.slice_del(); + sbp.ket = sbp.cursor; + v_4 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(2, "er")) { + sbp.cursor = sbp.limit - v_4; + if (!sbp.eq_s_b(2, "en")) + break; + } + sbp.bra = sbp.cursor; + if (r_R1()) + sbp.slice_del(); + break; + case 4: + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_3, 2); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R2() && among_var == 1) + sbp.slice_del(); + } + break; + } + } + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_prelude(); + sbp.cursor = v_1; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_standard_suffix(); + sbp.cursor = sbp.limit_backward; + r_postlude(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.de.stemmer, 'stemmer-de'); + + /* stop word filter function */ + lunr.de.stopWordFilter = function(token) { + if (lunr.de.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.de.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.de.stopWordFilter.stopWords.length = 232; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.de.stopWordFilter.stopWords.elements = ' aber alle allem allen aller alles als also am an ander andere anderem anderen anderer anderes anderm andern anderr anders auch auf aus bei bin bis bist da damit dann das dasselbe dazu daß dein deine deinem deinen deiner deines dem demselben den denn denselben der derer derselbe derselben des desselben dessen dich die dies diese dieselbe dieselben diesem diesen dieser dieses dir doch dort du durch ein eine einem einen einer eines einig einige einigem einigen einiger einiges einmal er es etwas euch euer eure eurem euren eurer eures für gegen gewesen hab habe haben hat hatte hatten hier hin hinter ich ihm ihn ihnen ihr ihre ihrem ihren ihrer ihres im in indem ins ist jede jedem jeden jeder jedes jene jenem jenen jener jenes jetzt kann kein keine keinem keinen keiner keines können könnte machen man manche manchem manchen mancher manches mein meine meinem meinen meiner meines mich mir mit muss musste nach nicht nichts noch nun nur ob oder ohne sehr sein seine seinem seinen seiner seines selbst sich sie sind so solche solchem solchen solcher solches soll sollte sondern sonst um und uns unse unsem unsen unser unses unter viel vom von vor war waren warst was weg weil weiter welche welchem welchen welcher welches wenn werde werden wie wieder will wir wird wirst wo wollen wollte während würde würden zu zum zur zwar zwischen über'.split(' '); + + lunr.Pipeline.registerFunction(lunr.de.stopWordFilter, 'stopWordFilter-de'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.de.min.js b/themes/tabi-lean/static/js/lunr/lunr.de.min.js new file mode 100644 index 0000000..7d099c6 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.de.min.js @@ -0,0 +1 @@ +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,n,i;r.de=function(){this.pipeline.reset(),this.pipeline.add(r.de.trimmer,r.de.stopWordFilter,r.de.stemmer)},r.de.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.de.trimmer=r.trimmerSupport.generateTrimmer(r.de.wordCharacters),r.Pipeline.registerFunction(r.de.trimmer,"trimmer-de"),r.de.stemmer=(e=r.stemmerSupport.Among,n=r.stemmerSupport.SnowballProgram,i=new function(){var t,o,c,u=[new e("",-1,6),new e("U",0,2),new e("Y",0,1),new e("ä",0,3),new e("ö",0,4),new e("ü",0,5)],d=[new e("e",-1,2),new e("em",-1,1),new e("en",-1,2),new e("ern",-1,1),new e("er",-1,1),new e("s",-1,3),new e("es",5,2)],l=[new e("en",-1,1),new e("er",-1,1),new e("st",-1,2),new e("est",2,1)],a=[new e("ig",-1,1),new e("lich",-1,1)],m=[new e("end",-1,1),new e("ig",-1,2),new e("ung",-1,1),new e("lich",-1,3),new e("isch",-1,2),new e("ik",-1,2),new e("heit",-1,3),new e("keit",-1,4)],w=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32,8],h=[117,30,5],b=[117,30,4],f=new n;function _(e,r,n){return f.eq_s(1,e)&&(f.ket=f.cursor,f.in_grouping(w,97,252))&&(f.slice_from(r),f.cursor=n,1)}function p(){for(;!f.in_grouping(w,97,252);){if(f.cursor>=f.limit)return 1;f.cursor++}for(;!f.out_grouping(w,97,252);){if(f.cursor>=f.limit)return 1;f.cursor++}}function g(){return c<=f.cursor}function k(){return o<=f.cursor}this.setCurrent=function(e){f.setCurrent(e)},this.getCurrent=function(){return f.getCurrent()},this.stem=function(){var e=f.cursor;!function(){for(var e,r,n,i,s=f.cursor;;)if(e=f.cursor,f.bra=e,f.eq_s(1,"ß"))f.ket=f.cursor,f.slice_from("ss");else{if(e>=f.limit)break;f.cursor=e+1}for(f.cursor=s;;)for(r=f.cursor;;){if(n=f.cursor,f.in_grouping(w,97,252)){if(i=f.cursor,f.bra=i,_("u","U",n))break;if(f.cursor=i,_("y","Y",n))break}if(n>=f.limit)return f.cursor=r;f.cursor=n+1}}(),f.cursor=e,c=f.limit,o=c,0<=(s=f.cursor+3)&&s<=f.limit&&(t=s,p()||((c=f.cursor)<t&&(c=t),p())||(o=f.cursor)),f.limit_backward=e,f.cursor=f.limit;var r,n,i,s=f.limit-f.cursor;if(f.ket=f.cursor,(r=f.find_among_b(d,7))&&(f.bra=f.cursor,g()))switch(r){case 1:f.slice_del();break;case 2:f.slice_del(),f.ket=f.cursor,f.eq_s_b(1,"s")&&(f.bra=f.cursor,f.eq_s_b(3,"nis"))&&f.slice_del();break;case 3:f.in_grouping_b(h,98,116)&&f.slice_del()}if(f.cursor=f.limit-s,f.ket=f.cursor,(r=f.find_among_b(l,4))&&(f.bra=f.cursor,g()))switch(r){case 1:f.slice_del();break;case 2:f.in_grouping_b(b,98,116)&&(i=f.cursor-3,f.limit_backward<=i)&&i<=f.limit&&(f.cursor=i,f.slice_del())}if(f.cursor=f.limit-s,f.ket=f.cursor,(r=f.find_among_b(m,8))&&(f.bra=f.cursor,k()))switch(r){case 1:f.slice_del(),f.ket=f.cursor,f.eq_s_b(2,"ig")&&(f.bra=f.cursor,n=f.limit-f.cursor,f.eq_s_b(1,"e")||(f.cursor=f.limit-n,k()&&f.slice_del()));break;case 2:n=f.limit-f.cursor,f.eq_s_b(1,"e")||(f.cursor=f.limit-n,f.slice_del());break;case 3:f.slice_del(),f.ket=f.cursor,n=f.limit-f.cursor,(f.eq_s_b(2,"er")||(f.cursor=f.limit-n,f.eq_s_b(2,"en")))&&(f.bra=f.cursor,g())&&f.slice_del();break;case 4:f.slice_del(),f.ket=f.cursor,(r=f.find_among_b(a,2))&&(f.bra=f.cursor,k())&&1==r&&f.slice_del()}return f.cursor=f.limit_backward,function(){for(var e;;){if(e=f.cursor,f.bra=e,!(e=f.find_among(u,6)))return;switch(f.ket=f.cursor,e){case 1:f.slice_from("y");break;case 2:case 5:f.slice_from("u");break;case 3:f.slice_from("a");break;case 4:f.slice_from("o");break;case 6:if(f.cursor>=f.limit)return;f.cursor++}}}(),!0}},function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}),r.Pipeline.registerFunction(r.de.stemmer,"stemmer-de"),r.de.stopWordFilter=function(e){if(-1===r.de.stopWordFilter.stopWords.indexOf(e))return e},r.de.stopWordFilter.stopWords=new r.SortedSet,r.de.stopWordFilter.stopWords.length=232,r.de.stopWordFilter.stopWords.elements=" aber alle allem allen aller alles als also am an ander andere anderem anderen anderer anderes anderm andern anderr anders auch auf aus bei bin bis bist da damit dann das dasselbe dazu daß dein deine deinem deinen deiner deines dem demselben den denn denselben der derer derselbe derselben des desselben dessen dich die dies diese dieselbe dieselben diesem diesen dieser dieses dir doch dort du durch ein eine einem einen einer eines einig einige einigem einigen einiger einiges einmal er es etwas euch euer eure eurem euren eurer eures für gegen gewesen hab habe haben hat hatte hatten hier hin hinter ich ihm ihn ihnen ihr ihre ihrem ihren ihrer ihres im in indem ins ist jede jedem jeden jeder jedes jene jenem jenen jener jenes jetzt kann kein keine keinem keinen keiner keines können könnte machen man manche manchem manchen mancher manches mein meine meinem meinen meiner meines mich mir mit muss musste nach nicht nichts noch nun nur ob oder ohne sehr sein seine seinem seinen seiner seines selbst sich sie sind so solche solchem solchen solcher solches soll sollte sondern sonst um und uns unse unsem unsen unser unses unter viel vom von vor war waren warst was weg weil weiter welche welchem welchen welcher welches wenn werde werden wie wieder will wir wird wirst wo wollen wollte während würde würden zu zum zur zwar zwischen über".split(" "),r.Pipeline.registerFunction(r.de.stopWordFilter,"stopWordFilter-de")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.du.js b/themes/tabi-lean/static/js/lunr/lunr.du.js new file mode 100644 index 0000000..cf4eda5 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.du.js @@ -0,0 +1,444 @@ +/*! + * Lunr languages, `Dutch` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.du = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.du.trimmer, + lunr.du.stopWordFilter, + lunr.du.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.du.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.du.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.du.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.du.trimmer, 'trimmer-du'); + + /* lunr stemmer function */ + lunr.du.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function DutchStemmer() { + var a_0 = [new Among("", -1, 6), new Among("\u00E1", 0, 1), + new Among("\u00E4", 0, 1), new Among("\u00E9", 0, 2), + new Among("\u00EB", 0, 2), new Among("\u00ED", 0, 3), + new Among("\u00EF", 0, 3), new Among("\u00F3", 0, 4), + new Among("\u00F6", 0, 4), new Among("\u00FA", 0, 5), + new Among("\u00FC", 0, 5) + ], + a_1 = [new Among("", -1, 3), + new Among("I", 0, 2), new Among("Y", 0, 1) + ], + a_2 = [ + new Among("dd", -1, -1), new Among("kk", -1, -1), + new Among("tt", -1, -1) + ], + a_3 = [new Among("ene", -1, 2), + new Among("se", -1, 3), new Among("en", -1, 2), + new Among("heden", 2, 1), new Among("s", -1, 3) + ], + a_4 = [ + new Among("end", -1, 1), new Among("ig", -1, 2), + new Among("ing", -1, 1), new Among("lijk", -1, 3), + new Among("baar", -1, 4), new Among("bar", -1, 5) + ], + a_5 = [ + new Among("aa", -1, -1), new Among("ee", -1, -1), + new Among("oo", -1, -1), new Among("uu", -1, -1) + ], + g_v = [17, 65, + 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 + ], + g_v_I = [1, 0, 0, + 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 + ], + g_v_j = [ + 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 + ], + I_p2, I_p1, B_e_found, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function r_prelude() { + var among_var, v_1 = sbp.cursor, + v_2, v_3; + while (true) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among(a_0, 11); + if (among_var) { + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("a"); + continue; + case 2: + sbp.slice_from("e"); + continue; + case 3: + sbp.slice_from("i"); + continue; + case 4: + sbp.slice_from("o"); + continue; + case 5: + sbp.slice_from("u"); + continue; + case 6: + if (sbp.cursor >= sbp.limit) + break; + sbp.cursor++; + continue; + } + } + break; + } + sbp.cursor = v_1; + sbp.bra = v_1; + if (sbp.eq_s(1, "y")) { + sbp.ket = sbp.cursor; + sbp.slice_from("Y"); + } else + sbp.cursor = v_1; + while (true) { + v_2 = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 232)) { + v_3 = sbp.cursor; + sbp.bra = v_3; + if (sbp.eq_s(1, "i")) { + sbp.ket = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 232)) { + sbp.slice_from("I"); + sbp.cursor = v_2; + } + } else { + sbp.cursor = v_3; + if (sbp.eq_s(1, "y")) { + sbp.ket = sbp.cursor; + sbp.slice_from("Y"); + sbp.cursor = v_2; + } else if (habr1(v_2)) + break; + } + } else if (habr1(v_2)) + break; + } + } + + function habr1(v_1) { + sbp.cursor = v_1; + if (v_1 >= sbp.limit) + return true; + sbp.cursor++; + return false; + } + + function r_mark_regions() { + I_p1 = sbp.limit; + I_p2 = I_p1; + if (!habr2()) { + I_p1 = sbp.cursor; + if (I_p1 < 3) + I_p1 = 3; + if (!habr2()) + I_p2 = sbp.cursor; + } + } + + function habr2() { + while (!sbp.in_grouping(g_v, 97, 232)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 232)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + return false; + } + + function r_postlude() { + var among_var; + while (true) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among(a_1, 3); + if (among_var) { + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("y"); + break; + case 2: + sbp.slice_from("i"); + break; + case 3: + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + break; + } + } + } + } + + function r_R1() { + return I_p1 <= sbp.cursor; + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function r_undouble() { + var v_1 = sbp.limit - sbp.cursor; + if (sbp.find_among_b(a_2, 3)) { + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + sbp.bra = sbp.cursor; + sbp.slice_del(); + } + } + } + + function r_e_ending() { + var v_1; + B_e_found = false; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "e")) { + sbp.bra = sbp.cursor; + if (r_R1()) { + v_1 = sbp.limit - sbp.cursor; + if (sbp.out_grouping_b(g_v, 97, 232)) { + sbp.cursor = sbp.limit - v_1; + sbp.slice_del(); + B_e_found = true; + r_undouble(); + } + } + } + } + + function r_en_ending() { + var v_1; + if (r_R1()) { + v_1 = sbp.limit - sbp.cursor; + if (sbp.out_grouping_b(g_v, 97, 232)) { + sbp.cursor = sbp.limit - v_1; + if (!sbp.eq_s_b(3, "gem")) { + sbp.cursor = sbp.limit - v_1; + sbp.slice_del(); + r_undouble(); + } + } + } + } + + function r_standard_suffix() { + var among_var, v_1 = sbp.limit - sbp.cursor, + v_2, v_3, v_4, v_5, v_6; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_3, 5); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_R1()) + sbp.slice_from("heid"); + break; + case 2: + r_en_ending(); + break; + case 3: + if (r_R1() && sbp.out_grouping_b(g_v_j, 97, 232)) + sbp.slice_del(); + break; + } + } + sbp.cursor = sbp.limit - v_1; + r_e_ending(); + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(4, "heid")) { + sbp.bra = sbp.cursor; + if (r_R2()) { + v_2 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "c")) { + sbp.cursor = sbp.limit - v_2; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "en")) { + sbp.bra = sbp.cursor; + r_en_ending(); + } + } + } + } + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_4, 6); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_R2()) { + sbp.slice_del(); + v_3 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "ig")) { + sbp.bra = sbp.cursor; + if (r_R2()) { + v_4 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "e")) { + sbp.cursor = sbp.limit - v_4; + sbp.slice_del(); + break; + } + } + } + sbp.cursor = sbp.limit - v_3; + r_undouble(); + } + break; + case 2: + if (r_R2()) { + v_5 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "e")) { + sbp.cursor = sbp.limit - v_5; + sbp.slice_del(); + } + } + break; + case 3: + if (r_R2()) { + sbp.slice_del(); + r_e_ending(); + } + break; + case 4: + if (r_R2()) + sbp.slice_del(); + break; + case 5: + if (r_R2() && B_e_found) + sbp.slice_del(); + break; + } + } + sbp.cursor = sbp.limit - v_1; + if (sbp.out_grouping_b(g_v_I, 73, 232)) { + v_6 = sbp.limit - sbp.cursor; + if (sbp.find_among_b(a_5, 4) && sbp.out_grouping_b(g_v, 97, 232)) { + sbp.cursor = sbp.limit - v_6; + sbp.ket = sbp.cursor; + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + sbp.bra = sbp.cursor; + sbp.slice_del(); + } + } + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_prelude(); + sbp.cursor = v_1; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_standard_suffix(); + sbp.cursor = sbp.limit_backward; + r_postlude(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.du.stemmer, 'stemmer-du'); + + /* stop word filter function */ + lunr.du.stopWordFilter = function(token) { + if (lunr.du.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.du.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.du.stopWordFilter.stopWords.length = 103; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.du.stopWordFilter.stopWords.elements = ' aan al alles als altijd andere ben bij daar dan dat de der deze die dit doch doen door dus een eens en er ge geen geweest haar had heb hebben heeft hem het hier hij hoe hun iemand iets ik in is ja je kan kon kunnen maar me meer men met mij mijn moet na naar niet niets nog nu of om omdat onder ons ook op over reeds te tegen toch toen tot u uit uw van veel voor want waren was wat werd wezen wie wil worden wordt zal ze zelf zich zij zijn zo zonder zou'.split(' '); + + lunr.Pipeline.registerFunction(lunr.du.stopWordFilter, 'stopWordFilter-du'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.du.min.js b/themes/tabi-lean/static/js/lunr/lunr.du.min.js new file mode 100644 index 0000000..8ac0d07 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.du.min.js @@ -0,0 +1 @@ +!function(r,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():e()(r.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,i,o;e.du=function(){this.pipeline.reset(),this.pipeline.add(e.du.trimmer,e.du.stopWordFilter,e.du.stemmer)},e.du.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.du.trimmer=e.trimmerSupport.generateTrimmer(e.du.wordCharacters),e.Pipeline.registerFunction(e.du.trimmer,"trimmer-du"),e.du.stemmer=(r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,o=new function(){var c,a,l,m=[new r("",-1,6),new r("á",0,1),new r("ä",0,1),new r("é",0,2),new r("ë",0,2),new r("í",0,3),new r("ï",0,3),new r("ó",0,4),new r("ö",0,4),new r("ú",0,5),new r("ü",0,5)],d=[new r("",-1,3),new r("I",0,2),new r("Y",0,1)],e=[new r("dd",-1,-1),new r("kk",-1,-1),new r("tt",-1,-1)],f=[new r("ene",-1,2),new r("se",-1,3),new r("en",-1,2),new r("heden",2,1),new r("s",-1,3)],_=[new r("end",-1,1),new r("ig",-1,2),new r("ing",-1,1),new r("lijk",-1,3),new r("baar",-1,4),new r("bar",-1,5)],w=[new r("aa",-1,-1),new r("ee",-1,-1),new r("oo",-1,-1),new r("uu",-1,-1)],b=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],p=[1,0,0,17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],g=[17,67,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],k=new i;function h(r){if((k.cursor=r)>=k.limit)return 1;k.cursor++}function v(){for(;!k.in_grouping(b,97,232);){if(k.cursor>=k.limit)return 1;k.cursor++}for(;!k.out_grouping(b,97,232);){if(k.cursor>=k.limit)return 1;k.cursor++}}function q(){return a<=k.cursor}function z(){return c<=k.cursor}function W(){var r=k.limit-k.cursor;k.find_among_b(e,3)&&(k.cursor=k.limit-r,k.ket=k.cursor,k.cursor>k.limit_backward)&&(k.cursor--,k.bra=k.cursor,k.slice_del())}function j(){var r;l=!1,k.ket=k.cursor,k.eq_s_b(1,"e")&&(k.bra=k.cursor,q())&&(r=k.limit-k.cursor,k.out_grouping_b(b,97,232))&&(k.cursor=k.limit-r,k.slice_del(),l=!0,W())}function F(){var r;q()&&(r=k.limit-k.cursor,k.out_grouping_b(b,97,232))&&(k.cursor=k.limit-r,k.eq_s_b(3,"gem")||(k.cursor=k.limit-r,k.slice_del(),W()))}this.setCurrent=function(r){k.setCurrent(r)},this.getCurrent=function(){return k.getCurrent()},this.stem=function(){for(var r,e,i,o=k.cursor,t=k.cursor;;){if(k.bra=k.cursor,r=k.find_among(m,11))switch(k.ket=k.cursor,r){case 1:k.slice_from("a");continue;case 2:k.slice_from("e");continue;case 3:k.slice_from("i");continue;case 4:k.slice_from("o");continue;case 5:k.slice_from("u");continue;case 6:if(!(k.cursor>=k.limit)){k.cursor++;continue}}break}for(k.cursor=t,k.bra=t,k.eq_s(1,"y")?(k.ket=k.cursor,k.slice_from("Y")):k.cursor=t;;)if(e=k.cursor,k.in_grouping(b,97,232)){if(i=k.cursor,k.bra=i,k.eq_s(1,"i"))k.ket=k.cursor,k.in_grouping(b,97,232)&&(k.slice_from("I"),k.cursor=e);else if(k.cursor=i,k.eq_s(1,"y"))k.ket=k.cursor,k.slice_from("Y"),k.cursor=e;else if(h(e))break}else if(h(e))break;k.cursor=o,a=k.limit,c=a,v()||((a=k.cursor)<3&&(a=3),v())||(c=k.cursor),k.limit_backward=o,k.cursor=k.limit;var s,n,u,t=k.limit-k.cursor;if(k.ket=k.cursor,o=k.find_among_b(f,5))switch(k.bra=k.cursor,o){case 1:q()&&k.slice_from("heid");break;case 2:F();break;case 3:q()&&k.out_grouping_b(g,97,232)&&k.slice_del()}if(k.cursor=k.limit-t,j(),k.cursor=k.limit-t,k.ket=k.cursor,k.eq_s_b(4,"heid")&&(k.bra=k.cursor,z())&&(u=k.limit-k.cursor,k.eq_s_b(1,"c")||(k.cursor=k.limit-u,k.slice_del(),k.ket=k.cursor,k.eq_s_b(2,"en")&&(k.bra=k.cursor,F()))),k.cursor=k.limit-t,k.ket=k.cursor,o=k.find_among_b(_,6))switch(k.bra=k.cursor,o){case 1:if(z()){if(k.slice_del(),s=k.limit-k.cursor,k.ket=k.cursor,k.eq_s_b(2,"ig")&&(k.bra=k.cursor,z())&&(n=k.limit-k.cursor,!k.eq_s_b(1,"e"))){k.cursor=k.limit-n,k.slice_del();break}k.cursor=k.limit-s,W()}break;case 2:z()&&(n=k.limit-k.cursor,k.eq_s_b(1,"e")||(k.cursor=k.limit-n,k.slice_del()));break;case 3:z()&&(k.slice_del(),j());break;case 4:z()&&k.slice_del();break;case 5:z()&&l&&k.slice_del()}return k.cursor=k.limit-t,k.out_grouping_b(p,73,232)&&(u=k.limit-k.cursor,k.find_among_b(w,4))&&k.out_grouping_b(b,97,232)&&(k.cursor=k.limit-u,k.ket=k.cursor,k.cursor>k.limit_backward)&&(k.cursor--,k.bra=k.cursor,k.slice_del()),k.cursor=k.limit_backward,function(){for(var r;;)if(k.bra=k.cursor,r=k.find_among(d,3))switch(k.ket=k.cursor,r){case 1:k.slice_from("y");break;case 2:k.slice_from("i");break;case 3:if(k.cursor>=k.limit)return;k.cursor++}}(),!0}},function(r){return o.setCurrent(r),o.stem(),o.getCurrent()}),e.Pipeline.registerFunction(e.du.stemmer,"stemmer-du"),e.du.stopWordFilter=function(r){if(-1===e.du.stopWordFilter.stopWords.indexOf(r))return r},e.du.stopWordFilter.stopWords=new e.SortedSet,e.du.stopWordFilter.stopWords.length=103,e.du.stopWordFilter.stopWords.elements=" aan al alles als altijd andere ben bij daar dan dat de der deze die dit doch doen door dus een eens en er ge geen geweest haar had heb hebben heeft hem het hier hij hoe hun iemand iets ik in is ja je kan kon kunnen maar me meer men met mij mijn moet na naar niet niets nog nu of om omdat onder ons ook op over reeds te tegen toch toen tot u uit uw van veel voor want waren was wat werd wezen wie wil worden wordt zal ze zelf zich zij zijn zo zonder zou".split(" "),e.Pipeline.registerFunction(e.du.stopWordFilter,"stopWordFilter-du")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.es.js b/themes/tabi-lean/static/js/lunr/lunr.es.js new file mode 100644 index 0000000..aa43b27 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.es.js @@ -0,0 +1,595 @@ +/*! + * Lunr languages, `Spanish` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.es = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.es.trimmer, + lunr.es.stopWordFilter, + lunr.es.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.es.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.es.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.es.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.es.trimmer, 'trimmer-es'); + + /* lunr stemmer function */ + lunr.es.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function SpanishStemmer() { + var a_0 = [new Among("", -1, 6), new Among("\u00E1", 0, 1), + new Among("\u00E9", 0, 2), new Among("\u00ED", 0, 3), + new Among("\u00F3", 0, 4), new Among("\u00FA", 0, 5) + ], + a_1 = [ + new Among("la", -1, -1), new Among("sela", 0, -1), + new Among("le", -1, -1), new Among("me", -1, -1), + new Among("se", -1, -1), new Among("lo", -1, -1), + new Among("selo", 5, -1), new Among("las", -1, -1), + new Among("selas", 7, -1), new Among("les", -1, -1), + new Among("los", -1, -1), new Among("selos", 10, -1), + new Among("nos", -1, -1) + ], + a_2 = [new Among("ando", -1, 6), + new Among("iendo", -1, 6), new Among("yendo", -1, 7), + new Among("\u00E1ndo", -1, 2), new Among("i\u00E9ndo", -1, 1), + new Among("ar", -1, 6), new Among("er", -1, 6), + new Among("ir", -1, 6), new Among("\u00E1r", -1, 3), + new Among("\u00E9r", -1, 4), new Among("\u00EDr", -1, 5) + ], + a_3 = [ + new Among("ic", -1, -1), new Among("ad", -1, -1), + new Among("os", -1, -1), new Among("iv", -1, 1) + ], + a_4 = [ + new Among("able", -1, 1), new Among("ible", -1, 1), + new Among("ante", -1, 1) + ], + a_5 = [new Among("ic", -1, 1), + new Among("abil", -1, 1), new Among("iv", -1, 1) + ], + a_6 = [ + new Among("ica", -1, 1), new Among("ancia", -1, 2), + new Among("encia", -1, 5), new Among("adora", -1, 2), + new Among("osa", -1, 1), new Among("ista", -1, 1), + new Among("iva", -1, 9), new Among("anza", -1, 1), + new Among("log\u00EDa", -1, 3), new Among("idad", -1, 8), + new Among("able", -1, 1), new Among("ible", -1, 1), + new Among("ante", -1, 2), new Among("mente", -1, 7), + new Among("amente", 13, 6), new Among("aci\u00F3n", -1, 2), + new Among("uci\u00F3n", -1, 4), new Among("ico", -1, 1), + new Among("ismo", -1, 1), new Among("oso", -1, 1), + new Among("amiento", -1, 1), new Among("imiento", -1, 1), + new Among("ivo", -1, 9), new Among("ador", -1, 2), + new Among("icas", -1, 1), new Among("ancias", -1, 2), + new Among("encias", -1, 5), new Among("adoras", -1, 2), + new Among("osas", -1, 1), new Among("istas", -1, 1), + new Among("ivas", -1, 9), new Among("anzas", -1, 1), + new Among("log\u00EDas", -1, 3), new Among("idades", -1, 8), + new Among("ables", -1, 1), new Among("ibles", -1, 1), + new Among("aciones", -1, 2), new Among("uciones", -1, 4), + new Among("adores", -1, 2), new Among("antes", -1, 2), + new Among("icos", -1, 1), new Among("ismos", -1, 1), + new Among("osos", -1, 1), new Among("amientos", -1, 1), + new Among("imientos", -1, 1), new Among("ivos", -1, 9) + ], + a_7 = [ + new Among("ya", -1, 1), new Among("ye", -1, 1), + new Among("yan", -1, 1), new Among("yen", -1, 1), + new Among("yeron", -1, 1), new Among("yendo", -1, 1), + new Among("yo", -1, 1), new Among("yas", -1, 1), + new Among("yes", -1, 1), new Among("yais", -1, 1), + new Among("yamos", -1, 1), new Among("y\u00F3", -1, 1) + ], + a_8 = [ + new Among("aba", -1, 2), new Among("ada", -1, 2), + new Among("ida", -1, 2), new Among("ara", -1, 2), + new Among("iera", -1, 2), new Among("\u00EDa", -1, 2), + new Among("ar\u00EDa", 5, 2), new Among("er\u00EDa", 5, 2), + new Among("ir\u00EDa", 5, 2), new Among("ad", -1, 2), + new Among("ed", -1, 2), new Among("id", -1, 2), + new Among("ase", -1, 2), new Among("iese", -1, 2), + new Among("aste", -1, 2), new Among("iste", -1, 2), + new Among("an", -1, 2), new Among("aban", 16, 2), + new Among("aran", 16, 2), new Among("ieran", 16, 2), + new Among("\u00EDan", 16, 2), new Among("ar\u00EDan", 20, 2), + new Among("er\u00EDan", 20, 2), new Among("ir\u00EDan", 20, 2), + new Among("en", -1, 1), new Among("asen", 24, 2), + new Among("iesen", 24, 2), new Among("aron", -1, 2), + new Among("ieron", -1, 2), new Among("ar\u00E1n", -1, 2), + new Among("er\u00E1n", -1, 2), new Among("ir\u00E1n", -1, 2), + new Among("ado", -1, 2), new Among("ido", -1, 2), + new Among("ando", -1, 2), new Among("iendo", -1, 2), + new Among("ar", -1, 2), new Among("er", -1, 2), + new Among("ir", -1, 2), new Among("as", -1, 2), + new Among("abas", 39, 2), new Among("adas", 39, 2), + new Among("idas", 39, 2), new Among("aras", 39, 2), + new Among("ieras", 39, 2), new Among("\u00EDas", 39, 2), + new Among("ar\u00EDas", 45, 2), new Among("er\u00EDas", 45, 2), + new Among("ir\u00EDas", 45, 2), new Among("es", -1, 1), + new Among("ases", 49, 2), new Among("ieses", 49, 2), + new Among("abais", -1, 2), new Among("arais", -1, 2), + new Among("ierais", -1, 2), new Among("\u00EDais", -1, 2), + new Among("ar\u00EDais", 55, 2), new Among("er\u00EDais", 55, 2), + new Among("ir\u00EDais", 55, 2), new Among("aseis", -1, 2), + new Among("ieseis", -1, 2), new Among("asteis", -1, 2), + new Among("isteis", -1, 2), new Among("\u00E1is", -1, 2), + new Among("\u00E9is", -1, 1), new Among("ar\u00E9is", 64, 2), + new Among("er\u00E9is", 64, 2), new Among("ir\u00E9is", 64, 2), + new Among("ados", -1, 2), new Among("idos", -1, 2), + new Among("amos", -1, 2), new Among("\u00E1bamos", 70, 2), + new Among("\u00E1ramos", 70, 2), new Among("i\u00E9ramos", 70, 2), + new Among("\u00EDamos", 70, 2), new Among("ar\u00EDamos", 74, 2), + new Among("er\u00EDamos", 74, 2), new Among("ir\u00EDamos", 74, 2), + new Among("emos", -1, 1), new Among("aremos", 78, 2), + new Among("eremos", 78, 2), new Among("iremos", 78, 2), + new Among("\u00E1semos", 78, 2), new Among("i\u00E9semos", 78, 2), + new Among("imos", -1, 2), new Among("ar\u00E1s", -1, 2), + new Among("er\u00E1s", -1, 2), new Among("ir\u00E1s", -1, 2), + new Among("\u00EDs", -1, 2), new Among("ar\u00E1", -1, 2), + new Among("er\u00E1", -1, 2), new Among("ir\u00E1", -1, 2), + new Among("ar\u00E9", -1, 2), new Among("er\u00E9", -1, 2), + new Among("ir\u00E9", -1, 2), new Among("i\u00F3", -1, 2) + ], + a_9 = [ + new Among("a", -1, 1), new Among("e", -1, 2), + new Among("o", -1, 1), new Among("os", -1, 1), + new Among("\u00E1", -1, 1), new Among("\u00E9", -1, 2), + new Among("\u00ED", -1, 1), new Among("\u00F3", -1, 1) + ], + g_v = [17, + 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10 + ], + I_p2, I_p1, I_pV, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function habr1() { + if (sbp.out_grouping(g_v, 97, 252)) { + while (!sbp.in_grouping(g_v, 97, 252)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + return false; + } + return true; + } + + function habr2() { + if (sbp.in_grouping(g_v, 97, 252)) { + var v_1 = sbp.cursor; + if (habr1()) { + sbp.cursor = v_1; + if (!sbp.in_grouping(g_v, 97, 252)) + return true; + while (!sbp.out_grouping(g_v, 97, 252)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + } + return false; + } + return true; + } + + function habr3() { + var v_1 = sbp.cursor, + v_2; + if (habr2()) { + sbp.cursor = v_1; + if (!sbp.out_grouping(g_v, 97, 252)) + return; + v_2 = sbp.cursor; + if (habr1()) { + sbp.cursor = v_2; + if (!sbp.in_grouping(g_v, 97, 252) || sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + } + } + I_pV = sbp.cursor; + } + + function habr4() { + while (!sbp.in_grouping(g_v, 97, 252)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 252)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + return true; + } + + function r_mark_regions() { + var v_1 = sbp.cursor; + I_pV = sbp.limit; + I_p1 = I_pV; + I_p2 = I_pV; + habr3(); + sbp.cursor = v_1; + if (habr4()) { + I_p1 = sbp.cursor; + if (habr4()) + I_p2 = sbp.cursor; + } + } + + function r_postlude() { + var among_var; + while (true) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among(a_0, 6); + if (among_var) { + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("a"); + continue; + case 2: + sbp.slice_from("e"); + continue; + case 3: + sbp.slice_from("i"); + continue; + case 4: + sbp.slice_from("o"); + continue; + case 5: + sbp.slice_from("u"); + continue; + case 6: + if (sbp.cursor >= sbp.limit) + break; + sbp.cursor++; + continue; + } + } + break; + } + } + + function r_RV() { + return I_pV <= sbp.cursor; + } + + function r_R1() { + return I_p1 <= sbp.cursor; + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function r_attached_pronoun() { + var among_var; + sbp.ket = sbp.cursor; + if (sbp.find_among_b(a_1, 13)) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among_b(a_2, 11); + if (among_var && r_RV()) + switch (among_var) { + case 1: + sbp.bra = sbp.cursor; + sbp.slice_from("iendo"); + break; + case 2: + sbp.bra = sbp.cursor; + sbp.slice_from("ando"); + break; + case 3: + sbp.bra = sbp.cursor; + sbp.slice_from("ar"); + break; + case 4: + sbp.bra = sbp.cursor; + sbp.slice_from("er"); + break; + case 5: + sbp.bra = sbp.cursor; + sbp.slice_from("ir"); + break; + case 6: + sbp.slice_del(); + break; + case 7: + if (sbp.eq_s_b(1, "u")) + sbp.slice_del(); + break; + } + } + } + + function habr5(a, n) { + if (!r_R2()) + return true; + sbp.slice_del(); + sbp.ket = sbp.cursor; + var among_var = sbp.find_among_b(a, n); + if (among_var) { + sbp.bra = sbp.cursor; + if (among_var == 1 && r_R2()) + sbp.slice_del(); + } + return false; + } + + function habr6(c1) { + if (!r_R2()) + return true; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, c1)) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + } + return false; + } + + function r_standard_suffix() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_6, 46); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + return false; + sbp.slice_del(); + break; + case 2: + if (habr6("ic")) + return false; + break; + case 3: + if (!r_R2()) + return false; + sbp.slice_from("log"); + break; + case 4: + if (!r_R2()) + return false; + sbp.slice_from("u"); + break; + case 5: + if (!r_R2()) + return false; + sbp.slice_from("ente"); + break; + case 6: + if (!r_R1()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_3, 4); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R2()) { + sbp.slice_del(); + if (among_var == 1) { + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "at")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + } + } + } + } + break; + case 7: + if (habr5(a_4, 3)) + return false; + break; + case 8: + if (habr5(a_5, 3)) + return false; + break; + case 9: + if (habr6("at")) + return false; + break; + } + return true; + } + return false; + } + + function r_y_verb_suffix() { + var among_var, v_1; + if (sbp.cursor >= I_pV) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_7, 12); + sbp.limit_backward = v_1; + if (among_var) { + sbp.bra = sbp.cursor; + if (among_var == 1) { + if (!sbp.eq_s_b(1, "u")) + return false; + sbp.slice_del(); + } + return true; + } + } + return false; + } + + function r_verb_suffix() { + var among_var, v_1, v_2, v_3; + if (sbp.cursor >= I_pV) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_8, 96); + sbp.limit_backward = v_1; + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + v_2 = sbp.limit - sbp.cursor; + if (sbp.eq_s_b(1, "u")) { + v_3 = sbp.limit - sbp.cursor; + if (sbp.eq_s_b(1, "g")) + sbp.cursor = sbp.limit - v_3; + else + sbp.cursor = sbp.limit - v_2; + } else + sbp.cursor = sbp.limit - v_2; + sbp.bra = sbp.cursor; + case 2: + sbp.slice_del(); + break; + } + } + } + } + + function r_residual_suffix() { + var among_var, v_1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_9, 8); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_RV()) + sbp.slice_del(); + break; + case 2: + if (r_RV()) { + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "u")) { + sbp.bra = sbp.cursor; + v_1 = sbp.limit - sbp.cursor; + if (sbp.eq_s_b(1, "g")) { + sbp.cursor = sbp.limit - v_1; + if (r_RV()) + sbp.slice_del(); + } + } + } + break; + } + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_attached_pronoun(); + sbp.cursor = sbp.limit; + if (!r_standard_suffix()) { + sbp.cursor = sbp.limit; + if (!r_y_verb_suffix()) { + sbp.cursor = sbp.limit; + r_verb_suffix(); + } + } + sbp.cursor = sbp.limit; + r_residual_suffix(); + sbp.cursor = sbp.limit_backward; + r_postlude(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.es.stemmer, 'stemmer-es'); + + /* stop word filter function */ + lunr.es.stopWordFilter = function(token) { + if (lunr.es.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.es.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.es.stopWordFilter.stopWords.length = 309; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.es.stopWordFilter.stopWords.elements = ' a al algo algunas algunos ante antes como con contra cual cuando de del desde donde durante e el ella ellas ellos en entre era erais eran eras eres es esa esas ese eso esos esta estaba estabais estaban estabas estad estada estadas estado estados estamos estando estar estaremos estará estarán estarás estaré estaréis estaría estaríais estaríamos estarían estarías estas este estemos esto estos estoy estuve estuviera estuvierais estuvieran estuvieras estuvieron estuviese estuvieseis estuviesen estuvieses estuvimos estuviste estuvisteis estuviéramos estuviésemos estuvo está estábamos estáis están estás esté estéis estén estés fue fuera fuerais fueran fueras fueron fuese fueseis fuesen fueses fui fuimos fuiste fuisteis fuéramos fuésemos ha habida habidas habido habidos habiendo habremos habrá habrán habrás habré habréis habría habríais habríamos habrían habrías habéis había habíais habíamos habían habías han has hasta hay haya hayamos hayan hayas hayáis he hemos hube hubiera hubierais hubieran hubieras hubieron hubiese hubieseis hubiesen hubieses hubimos hubiste hubisteis hubiéramos hubiésemos hubo la las le les lo los me mi mis mucho muchos muy más mí mía mías mío míos nada ni no nos nosotras nosotros nuestra nuestras nuestro nuestros o os otra otras otro otros para pero poco por porque que quien quienes qué se sea seamos sean seas seremos será serán serás seré seréis sería seríais seríamos serían serías seáis sido siendo sin sobre sois somos son soy su sus suya suyas suyo suyos sí también tanto te tendremos tendrá tendrán tendrás tendré tendréis tendría tendríais tendríamos tendrían tendrías tened tenemos tenga tengamos tengan tengas tengo tengáis tenida tenidas tenido tenidos teniendo tenéis tenía teníais teníamos tenían tenías ti tiene tienen tienes todo todos tu tus tuve tuviera tuvierais tuvieran tuvieras tuvieron tuviese tuvieseis tuviesen tuvieses tuvimos tuviste tuvisteis tuviéramos tuviésemos tuvo tuya tuyas tuyo tuyos tú un una uno unos vosotras vosotros vuestra vuestras vuestro vuestros y ya yo él éramos'.split(' '); + + lunr.Pipeline.registerFunction(lunr.es.stopWordFilter, 'stopWordFilter-es'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.es.min.js b/themes/tabi-lean/static/js/lunr/lunr.es.min.js new file mode 100644 index 0000000..dc48558 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.es.min.js @@ -0,0 +1 @@ +!function(e,s){"function"==typeof define&&define.amd?define(s):"object"==typeof exports?module.exports=s():s()(e.lunr)}(this,function(){return function(s){if(void 0===s)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===s.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,r,n;s.es=function(){this.pipeline.reset(),this.pipeline.add(s.es.trimmer,s.es.stopWordFilter,s.es.stemmer)},s.es.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",s.es.trimmer=s.trimmerSupport.generateTrimmer(s.es.wordCharacters),s.Pipeline.registerFunction(s.es.trimmer,"trimmer-es"),s.es.stemmer=(e=s.stemmerSupport.Among,r=s.stemmerSupport.SnowballProgram,n=new function(){var u,w,c,m=[new e("",-1,6),new e("á",0,1),new e("é",0,2),new e("í",0,3),new e("ó",0,4),new e("ú",0,5)],l=[new e("la",-1,-1),new e("sela",0,-1),new e("le",-1,-1),new e("me",-1,-1),new e("se",-1,-1),new e("lo",-1,-1),new e("selo",5,-1),new e("las",-1,-1),new e("selas",7,-1),new e("les",-1,-1),new e("los",-1,-1),new e("selos",10,-1),new e("nos",-1,-1)],d=[new e("ando",-1,6),new e("iendo",-1,6),new e("yendo",-1,7),new e("ándo",-1,2),new e("iéndo",-1,1),new e("ar",-1,6),new e("er",-1,6),new e("ir",-1,6),new e("ár",-1,3),new e("ér",-1,4),new e("ír",-1,5)],b=[new e("ic",-1,-1),new e("ad",-1,-1),new e("os",-1,-1),new e("iv",-1,1)],f=[new e("able",-1,1),new e("ible",-1,1),new e("ante",-1,1)],_=[new e("ic",-1,1),new e("abil",-1,1),new e("iv",-1,1)],h=[new e("ica",-1,1),new e("ancia",-1,2),new e("encia",-1,5),new e("adora",-1,2),new e("osa",-1,1),new e("ista",-1,1),new e("iva",-1,9),new e("anza",-1,1),new e("logía",-1,3),new e("idad",-1,8),new e("able",-1,1),new e("ible",-1,1),new e("ante",-1,2),new e("mente",-1,7),new e("amente",13,6),new e("ación",-1,2),new e("ución",-1,4),new e("ico",-1,1),new e("ismo",-1,1),new e("oso",-1,1),new e("amiento",-1,1),new e("imiento",-1,1),new e("ivo",-1,9),new e("ador",-1,2),new e("icas",-1,1),new e("ancias",-1,2),new e("encias",-1,5),new e("adoras",-1,2),new e("osas",-1,1),new e("istas",-1,1),new e("ivas",-1,9),new e("anzas",-1,1),new e("logías",-1,3),new e("idades",-1,8),new e("ables",-1,1),new e("ibles",-1,1),new e("aciones",-1,2),new e("uciones",-1,4),new e("adores",-1,2),new e("antes",-1,2),new e("icos",-1,1),new e("ismos",-1,1),new e("osos",-1,1),new e("amientos",-1,1),new e("imientos",-1,1),new e("ivos",-1,9)],p=[new e("ya",-1,1),new e("ye",-1,1),new e("yan",-1,1),new e("yen",-1,1),new e("yeron",-1,1),new e("yendo",-1,1),new e("yo",-1,1),new e("yas",-1,1),new e("yes",-1,1),new e("yais",-1,1),new e("yamos",-1,1),new e("yó",-1,1)],v=[new e("aba",-1,2),new e("ada",-1,2),new e("ida",-1,2),new e("ara",-1,2),new e("iera",-1,2),new e("ía",-1,2),new e("aría",5,2),new e("ería",5,2),new e("iría",5,2),new e("ad",-1,2),new e("ed",-1,2),new e("id",-1,2),new e("ase",-1,2),new e("iese",-1,2),new e("aste",-1,2),new e("iste",-1,2),new e("an",-1,2),new e("aban",16,2),new e("aran",16,2),new e("ieran",16,2),new e("ían",16,2),new e("arían",20,2),new e("erían",20,2),new e("irían",20,2),new e("en",-1,1),new e("asen",24,2),new e("iesen",24,2),new e("aron",-1,2),new e("ieron",-1,2),new e("arán",-1,2),new e("erán",-1,2),new e("irán",-1,2),new e("ado",-1,2),new e("ido",-1,2),new e("ando",-1,2),new e("iendo",-1,2),new e("ar",-1,2),new e("er",-1,2),new e("ir",-1,2),new e("as",-1,2),new e("abas",39,2),new e("adas",39,2),new e("idas",39,2),new e("aras",39,2),new e("ieras",39,2),new e("ías",39,2),new e("arías",45,2),new e("erías",45,2),new e("irías",45,2),new e("es",-1,1),new e("ases",49,2),new e("ieses",49,2),new e("abais",-1,2),new e("arais",-1,2),new e("ierais",-1,2),new e("íais",-1,2),new e("aríais",55,2),new e("eríais",55,2),new e("iríais",55,2),new e("aseis",-1,2),new e("ieseis",-1,2),new e("asteis",-1,2),new e("isteis",-1,2),new e("áis",-1,2),new e("éis",-1,1),new e("aréis",64,2),new e("eréis",64,2),new e("iréis",64,2),new e("ados",-1,2),new e("idos",-1,2),new e("amos",-1,2),new e("ábamos",70,2),new e("áramos",70,2),new e("iéramos",70,2),new e("íamos",70,2),new e("aríamos",74,2),new e("eríamos",74,2),new e("iríamos",74,2),new e("emos",-1,1),new e("aremos",78,2),new e("eremos",78,2),new e("iremos",78,2),new e("ásemos",78,2),new e("iésemos",78,2),new e("imos",-1,2),new e("arás",-1,2),new e("erás",-1,2),new e("irás",-1,2),new e("ís",-1,2),new e("ará",-1,2),new e("erá",-1,2),new e("irá",-1,2),new e("aré",-1,2),new e("eré",-1,2),new e("iré",-1,2),new e("ió",-1,2)],g=[new e("a",-1,1),new e("e",-1,2),new e("o",-1,1),new e("os",-1,1),new e("á",-1,1),new e("é",-1,2),new e("í",-1,1),new e("ó",-1,1)],k=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,4,10],y=new r;function q(){if(!y.out_grouping(k,97,252))return 1;for(;!y.in_grouping(k,97,252);){if(y.cursor>=y.limit)return 1;y.cursor++}}function W(){for(;!y.in_grouping(k,97,252);){if(y.cursor>=y.limit)return;y.cursor++}for(;!y.out_grouping(k,97,252);){if(y.cursor>=y.limit)return;y.cursor++}return 1}function F(){return c<=y.cursor}function C(){return u<=y.cursor}function S(e,s){if(!C())return 1;y.slice_del(),y.ket=y.cursor,(e=y.find_among_b(e,s))&&(y.bra=y.cursor,1==e)&&C()&&y.slice_del()}function P(e){if(!C())return 1;y.slice_del(),y.ket=y.cursor,y.eq_s_b(2,e)&&(y.bra=y.cursor,C())&&y.slice_del()}this.setCurrent=function(e){y.setCurrent(e)},this.getCurrent=function(){return y.getCurrent()},this.stem=function(){var e,s,r,n,i,a,o=y.cursor,t=y.cursor;if(c=y.limit,u=w=c,function(){var e=y.cursor;if(function(){if(!y.in_grouping(k,97,252))return 1;var e=y.cursor;if(q()){if(y.cursor=e,!y.in_grouping(k,97,252))return 1;for(;!y.out_grouping(k,97,252);){if(y.cursor>=y.limit)return 1;y.cursor++}}}()){if(y.cursor=e,!y.out_grouping(k,97,252))return;if(e=y.cursor,q()){if(y.cursor=e,!y.in_grouping(k,97,252)||y.cursor>=y.limit)return;y.cursor++}}c=y.cursor}(),y.cursor=t,W()&&(w=y.cursor,W())&&(u=y.cursor),y.limit_backward=o,y.cursor=y.limit,y.ket=y.cursor,y.find_among_b(l,13)&&(y.bra=y.cursor,e=y.find_among_b(d,11))&&F())switch(e){case 1:y.bra=y.cursor,y.slice_from("iendo");break;case 2:y.bra=y.cursor,y.slice_from("ando");break;case 3:y.bra=y.cursor,y.slice_from("ar");break;case 4:y.bra=y.cursor,y.slice_from("er");break;case 5:y.bra=y.cursor,y.slice_from("ir");break;case 6:y.slice_del();break;case 7:y.eq_s_b(1,"u")&&y.slice_del()}if(y.cursor=y.limit,!function(){var e;if(y.ket=y.cursor,e=y.find_among_b(h,46)){switch(y.bra=y.cursor,e){case 1:if(!C())return;y.slice_del();break;case 2:if(P("ic"))return;break;case 3:if(!C())return;y.slice_from("log");break;case 4:if(!C())return;y.slice_from("u");break;case 5:if(!C())return;y.slice_from("ente");break;case 6:if(!(w<=y.cursor))return;y.slice_del(),y.ket=y.cursor,(e=y.find_among_b(b,4))&&(y.bra=y.cursor,C())&&(y.slice_del(),1==e)&&(y.ket=y.cursor,y.eq_s_b(2,"at"))&&(y.bra=y.cursor,C())&&y.slice_del();break;case 7:if(S(f,3))return;break;case 8:if(S(_,3))return;break;case 9:if(P("at"))return}return 1}}()&&(y.cursor=y.limit,!function(){var e,s;if(y.cursor>=c&&(s=y.limit_backward,y.limit_backward=c,y.ket=y.cursor,e=y.find_among_b(p,12),y.limit_backward=s,e)){if(y.bra=y.cursor,1==e){if(!y.eq_s_b(1,"u"))return;y.slice_del()}return 1}}())&&(y.cursor=y.limit,y.cursor>=c)&&(t=y.limit_backward,y.limit_backward=c,y.ket=y.cursor,s=y.find_among_b(v,96),y.limit_backward=t,s))switch(y.bra=y.cursor,s){case 1:r=y.limit-y.cursor,y.eq_s_b(1,"u")&&(n=y.limit-y.cursor,y.eq_s_b(1,"g"))?y.cursor=y.limit-n:y.cursor=y.limit-r,y.bra=y.cursor;case 2:y.slice_del()}if(y.cursor=y.limit,y.ket=y.cursor,o=y.find_among_b(g,8))switch(y.bra=y.cursor,o){case 1:F()&&y.slice_del();break;case 2:F()&&(y.slice_del(),y.ket=y.cursor,y.eq_s_b(1,"u"))&&(y.bra=y.cursor,i=y.limit-y.cursor,y.eq_s_b(1,"g"))&&(y.cursor=y.limit-i,F())&&y.slice_del()}for(y.cursor=y.limit_backward;;){if(y.bra=y.cursor,a=y.find_among(m,6))switch(y.ket=y.cursor,a){case 1:y.slice_from("a");continue;case 2:y.slice_from("e");continue;case 3:y.slice_from("i");continue;case 4:y.slice_from("o");continue;case 5:y.slice_from("u");continue;case 6:if(!(y.cursor>=y.limit)){y.cursor++;continue}}break}return!0}},function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}),s.Pipeline.registerFunction(s.es.stemmer,"stemmer-es"),s.es.stopWordFilter=function(e){if(-1===s.es.stopWordFilter.stopWords.indexOf(e))return e},s.es.stopWordFilter.stopWords=new s.SortedSet,s.es.stopWordFilter.stopWords.length=309,s.es.stopWordFilter.stopWords.elements=" a al algo algunas algunos ante antes como con contra cual cuando de del desde donde durante e el ella ellas ellos en entre era erais eran eras eres es esa esas ese eso esos esta estaba estabais estaban estabas estad estada estadas estado estados estamos estando estar estaremos estará estarán estarás estaré estaréis estaría estaríais estaríamos estarían estarías estas este estemos esto estos estoy estuve estuviera estuvierais estuvieran estuvieras estuvieron estuviese estuvieseis estuviesen estuvieses estuvimos estuviste estuvisteis estuviéramos estuviésemos estuvo está estábamos estáis están estás esté estéis estén estés fue fuera fuerais fueran fueras fueron fuese fueseis fuesen fueses fui fuimos fuiste fuisteis fuéramos fuésemos ha habida habidas habido habidos habiendo habremos habrá habrán habrás habré habréis habría habríais habríamos habrían habrías habéis había habíais habíamos habían habías han has hasta hay haya hayamos hayan hayas hayáis he hemos hube hubiera hubierais hubieran hubieras hubieron hubiese hubieseis hubiesen hubieses hubimos hubiste hubisteis hubiéramos hubiésemos hubo la las le les lo los me mi mis mucho muchos muy más mí mía mías mío míos nada ni no nos nosotras nosotros nuestra nuestras nuestro nuestros o os otra otras otro otros para pero poco por porque que quien quienes qué se sea seamos sean seas seremos será serán serás seré seréis sería seríais seríamos serían serías seáis sido siendo sin sobre sois somos son soy su sus suya suyas suyo suyos sí también tanto te tendremos tendrá tendrán tendrás tendré tendréis tendría tendríais tendríamos tendrían tendrías tened tenemos tenga tengamos tengan tengas tengo tengáis tenida tenidas tenido tenidos teniendo tenéis tenía teníais teníamos tenían tenías ti tiene tienen tienes todo todos tu tus tuve tuviera tuvierais tuvieran tuvieras tuvieron tuviese tuvieseis tuviesen tuvieses tuvimos tuviste tuvisteis tuviéramos tuviésemos tuvo tuya tuyas tuyo tuyos tú un una uno unos vosotras vosotros vuestra vuestras vuestro vuestros y ya yo él éramos".split(" "),s.Pipeline.registerFunction(s.es.stopWordFilter,"stopWordFilter-es")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.fi.js b/themes/tabi-lean/static/js/lunr/lunr.fi.js new file mode 100644 index 0000000..8f78b5d --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.fi.js @@ -0,0 +1,536 @@ +/*! + * Lunr languages, `Finnish` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.fi = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.fi.trimmer, + lunr.fi.stopWordFilter, + lunr.fi.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.fi.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.fi.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.fi.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.fi.trimmer, 'trimmer-fi'); + + /* lunr stemmer function */ + lunr.fi.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function FinnishStemmer() { + var a_0 = [new Among("pa", -1, 1), new Among("sti", -1, 2), + new Among("kaan", -1, 1), new Among("han", -1, 1), + new Among("kin", -1, 1), new Among("h\u00E4n", -1, 1), + new Among("k\u00E4\u00E4n", -1, 1), new Among("ko", -1, 1), + new Among("p\u00E4", -1, 1), new Among("k\u00F6", -1, 1) + ], + a_1 = [ + new Among("lla", -1, -1), new Among("na", -1, -1), + new Among("ssa", -1, -1), new Among("ta", -1, -1), + new Among("lta", 3, -1), new Among("sta", 3, -1) + ], + a_2 = [ + new Among("ll\u00E4", -1, -1), new Among("n\u00E4", -1, -1), + new Among("ss\u00E4", -1, -1), new Among("t\u00E4", -1, -1), + new Among("lt\u00E4", 3, -1), new Among("st\u00E4", 3, -1) + ], + a_3 = [ + new Among("lle", -1, -1), new Among("ine", -1, -1) + ], + a_4 = [ + new Among("nsa", -1, 3), new Among("mme", -1, 3), + new Among("nne", -1, 3), new Among("ni", -1, 2), + new Among("si", -1, 1), new Among("an", -1, 4), + new Among("en", -1, 6), new Among("\u00E4n", -1, 5), + new Among("ns\u00E4", -1, 3) + ], + a_5 = [new Among("aa", -1, -1), + new Among("ee", -1, -1), new Among("ii", -1, -1), + new Among("oo", -1, -1), new Among("uu", -1, -1), + new Among("\u00E4\u00E4", -1, -1), + new Among("\u00F6\u00F6", -1, -1) + ], + a_6 = [new Among("a", -1, 8), + new Among("lla", 0, -1), new Among("na", 0, -1), + new Among("ssa", 0, -1), new Among("ta", 0, -1), + new Among("lta", 4, -1), new Among("sta", 4, -1), + new Among("tta", 4, 9), new Among("lle", -1, -1), + new Among("ine", -1, -1), new Among("ksi", -1, -1), + new Among("n", -1, 7), new Among("han", 11, 1), + new Among("den", 11, -1, r_VI), new Among("seen", 11, -1, r_LONG), + new Among("hen", 11, 2), new Among("tten", 11, -1, r_VI), + new Among("hin", 11, 3), new Among("siin", 11, -1, r_VI), + new Among("hon", 11, 4), new Among("h\u00E4n", 11, 5), + new Among("h\u00F6n", 11, 6), new Among("\u00E4", -1, 8), + new Among("ll\u00E4", 22, -1), new Among("n\u00E4", 22, -1), + new Among("ss\u00E4", 22, -1), new Among("t\u00E4", 22, -1), + new Among("lt\u00E4", 26, -1), new Among("st\u00E4", 26, -1), + new Among("tt\u00E4", 26, 9) + ], + a_7 = [new Among("eja", -1, -1), + new Among("mma", -1, 1), new Among("imma", 1, -1), + new Among("mpa", -1, 1), new Among("impa", 3, -1), + new Among("mmi", -1, 1), new Among("immi", 5, -1), + new Among("mpi", -1, 1), new Among("impi", 7, -1), + new Among("ej\u00E4", -1, -1), new Among("mm\u00E4", -1, 1), + new Among("imm\u00E4", 10, -1), new Among("mp\u00E4", -1, 1), + new Among("imp\u00E4", 12, -1) + ], + a_8 = [new Among("i", -1, -1), + new Among("j", -1, -1) + ], + a_9 = [new Among("mma", -1, 1), + new Among("imma", 0, -1) + ], + g_AEI = [17, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 8 + ], + g_V1 = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 32 + ], + g_V2 = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 8, 0, 32 + ], + g_particle_end = [17, 97, 24, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 + ], + B_ending_removed, S_x, I_p2, I_p1, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function r_mark_regions() { + I_p1 = sbp.limit; + I_p2 = I_p1; + if (!habr1()) { + I_p1 = sbp.cursor; + if (!habr1()) + I_p2 = sbp.cursor; + } + } + + function habr1() { + var v_1; + while (true) { + v_1 = sbp.cursor; + if (sbp.in_grouping(g_V1, 97, 246)) + break; + sbp.cursor = v_1; + if (v_1 >= sbp.limit) + return true; + sbp.cursor++; + } + sbp.cursor = v_1; + while (!sbp.out_grouping(g_V1, 97, 246)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + return false; + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function r_particle_etc() { + var among_var, v_1; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_0, 10); + if (among_var) { + sbp.bra = sbp.cursor; + sbp.limit_backward = v_1; + switch (among_var) { + case 1: + if (!sbp.in_grouping_b(g_particle_end, 97, 246)) + return; + break; + case 2: + if (!r_R2()) + return; + break; + } + sbp.slice_del(); + } else + sbp.limit_backward = v_1; + } + } + + function r_possessive() { + var among_var, v_1, v_2; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_4, 9); + if (among_var) { + sbp.bra = sbp.cursor; + sbp.limit_backward = v_1; + switch (among_var) { + case 1: + v_2 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "k")) { + sbp.cursor = sbp.limit - v_2; + sbp.slice_del(); + } + break; + case 2: + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(3, "kse")) { + sbp.bra = sbp.cursor; + sbp.slice_from("ksi"); + } + break; + case 3: + sbp.slice_del(); + break; + case 4: + if (sbp.find_among_b(a_1, 6)) + sbp.slice_del(); + break; + case 5: + if (sbp.find_among_b(a_2, 6)) + sbp.slice_del(); + break; + case 6: + if (sbp.find_among_b(a_3, 2)) + sbp.slice_del(); + break; + } + } else + sbp.limit_backward = v_1; + } + } + + function r_LONG() { + return sbp.find_among_b(a_5, 7); + } + + function r_VI() { + return sbp.eq_s_b(1, "i") && sbp.in_grouping_b(g_V2, 97, 246); + } + + function r_case_ending() { + var among_var, v_1, v_2; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_6, 30); + if (among_var) { + sbp.bra = sbp.cursor; + sbp.limit_backward = v_1; + switch (among_var) { + case 1: + if (!sbp.eq_s_b(1, "a")) + return; + break; + case 2: + case 9: + if (!sbp.eq_s_b(1, "e")) + return; + break; + case 3: + if (!sbp.eq_s_b(1, "i")) + return; + break; + case 4: + if (!sbp.eq_s_b(1, "o")) + return; + break; + case 5: + if (!sbp.eq_s_b(1, "\u00E4")) + return; + break; + case 6: + if (!sbp.eq_s_b(1, "\u00F6")) + return; + break; + case 7: + v_2 = sbp.limit - sbp.cursor; + if (!r_LONG()) { + sbp.cursor = sbp.limit - v_2; + if (!sbp.eq_s_b(2, "ie")) { + sbp.cursor = sbp.limit - v_2; + break; + } + } + sbp.cursor = sbp.limit - v_2; + if (sbp.cursor <= sbp.limit_backward) { + sbp.cursor = sbp.limit - v_2; + break; + } + sbp.cursor--; + sbp.bra = sbp.cursor; + break; + case 8: + if (!sbp.in_grouping_b(g_V1, 97, 246) || !sbp.out_grouping_b(g_V1, 97, 246)) + return; + break; + } + sbp.slice_del(); + B_ending_removed = true; + } else + sbp.limit_backward = v_1; + } + } + + function r_other_endings() { + var among_var, v_1, v_2; + if (sbp.cursor >= I_p2) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p2; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_7, 14); + if (among_var) { + sbp.bra = sbp.cursor; + sbp.limit_backward = v_1; + if (among_var == 1) { + v_2 = sbp.limit - sbp.cursor; + if (sbp.eq_s_b(2, "po")) + return; + sbp.cursor = sbp.limit - v_2; + } + sbp.slice_del(); + } else + sbp.limit_backward = v_1; + } + } + + function r_i_plural() { + var v_1; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + if (sbp.find_among_b(a_8, 2)) { + sbp.bra = sbp.cursor; + sbp.limit_backward = v_1; + sbp.slice_del(); + } else + sbp.limit_backward = v_1; + } + } + + function r_t_plural() { + var among_var, v_1, v_2, v_3, v_4, v_5; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "t")) { + sbp.bra = sbp.cursor; + v_2 = sbp.limit - sbp.cursor; + if (sbp.in_grouping_b(g_V1, 97, 246)) { + sbp.cursor = sbp.limit - v_2; + sbp.slice_del(); + sbp.limit_backward = v_1; + v_3 = sbp.limit - sbp.cursor; + if (sbp.cursor >= I_p2) { + sbp.cursor = I_p2; + v_4 = sbp.limit_backward; + sbp.limit_backward = sbp.cursor; + sbp.cursor = sbp.limit - v_3; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_9, 2); + if (among_var) { + sbp.bra = sbp.cursor; + sbp.limit_backward = v_4; + if (among_var == 1) { + v_5 = sbp.limit - sbp.cursor; + if (sbp.eq_s_b(2, "po")) + return; + sbp.cursor = sbp.limit - v_5; + } + sbp.slice_del(); + return; + } + } + } + } + sbp.limit_backward = v_1; + } + } + + function r_tidy() { + var v_1, v_2, v_3, v_4; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + v_2 = sbp.limit - sbp.cursor; + if (r_LONG()) { + sbp.cursor = sbp.limit - v_2; + sbp.ket = sbp.cursor; + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + sbp.bra = sbp.cursor; + sbp.slice_del(); + } + } + sbp.cursor = sbp.limit - v_2; + sbp.ket = sbp.cursor; + if (sbp.in_grouping_b(g_AEI, 97, 228)) { + sbp.bra = sbp.cursor; + if (sbp.out_grouping_b(g_V1, 97, 246)) + sbp.slice_del(); + } + sbp.cursor = sbp.limit - v_2; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "j")) { + sbp.bra = sbp.cursor; + v_3 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "o")) { + sbp.cursor = sbp.limit - v_3; + if (sbp.eq_s_b(1, "u")) + sbp.slice_del(); + } else + sbp.slice_del(); + } + sbp.cursor = sbp.limit - v_2; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "o")) { + sbp.bra = sbp.cursor; + if (sbp.eq_s_b(1, "j")) + sbp.slice_del(); + } + sbp.cursor = sbp.limit - v_2; + sbp.limit_backward = v_1; + while (true) { + v_4 = sbp.limit - sbp.cursor; + if (sbp.out_grouping_b(g_V1, 97, 246)) { + sbp.cursor = sbp.limit - v_4; + break; + } + sbp.cursor = sbp.limit - v_4; + if (sbp.cursor <= sbp.limit_backward) + return; + sbp.cursor--; + } + sbp.ket = sbp.cursor; + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + sbp.bra = sbp.cursor; + S_x = sbp.slice_to(); + if (sbp.eq_v_b(S_x)) + sbp.slice_del(); + } + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_mark_regions(); + B_ending_removed = false; + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_particle_etc(); + sbp.cursor = sbp.limit; + r_possessive(); + sbp.cursor = sbp.limit; + r_case_ending(); + sbp.cursor = sbp.limit; + r_other_endings(); + sbp.cursor = sbp.limit; + if (B_ending_removed) { + r_i_plural(); + sbp.cursor = sbp.limit; + } else { + sbp.cursor = sbp.limit; + r_t_plural(); + sbp.cursor = sbp.limit; + } + r_tidy(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.fi.stemmer, 'stemmer-fi'); + + /* stop word filter function */ + lunr.fi.stopWordFilter = function(token) { + if (lunr.fi.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.fi.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.fi.stopWordFilter.stopWords.length = 236; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.fi.stopWordFilter.stopWords.elements = ' ei eivät emme en et ette että he heidän heidät heihin heille heillä heiltä heissä heistä heitä hän häneen hänelle hänellä häneltä hänen hänessä hänestä hänet häntä itse ja johon joiden joihin joiksi joilla joille joilta joina joissa joista joita joka joksi jolla jolle jolta jona jonka jos jossa josta jota jotka kanssa keiden keihin keiksi keille keillä keiltä keinä keissä keistä keitä keneen keneksi kenelle kenellä keneltä kenen kenenä kenessä kenestä kenet ketkä ketkä ketä koska kuin kuka kun me meidän meidät meihin meille meillä meiltä meissä meistä meitä mihin miksi mikä mille millä miltä minkä minkä minua minulla minulle minulta minun minussa minusta minut minuun minä minä missä mistä mitkä mitä mukaan mutta ne niiden niihin niiksi niille niillä niiltä niin niin niinä niissä niistä niitä noiden noihin noiksi noilla noille noilta noin noina noissa noista noita nuo nyt näiden näihin näiksi näille näillä näiltä näinä näissä näistä näitä nämä ole olemme olen olet olette oli olimme olin olisi olisimme olisin olisit olisitte olisivat olit olitte olivat olla olleet ollut on ovat poikki se sekä sen siihen siinä siitä siksi sille sillä sillä siltä sinua sinulla sinulle sinulta sinun sinussa sinusta sinut sinuun sinä sinä sitä tai te teidän teidät teihin teille teillä teiltä teissä teistä teitä tuo tuohon tuoksi tuolla tuolle tuolta tuon tuona tuossa tuosta tuota tähän täksi tälle tällä tältä tämä tämän tänä tässä tästä tätä vaan vai vaikka yli'.split(' '); + + lunr.Pipeline.registerFunction(lunr.fi.stopWordFilter, 'stopWordFilter-fi'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.fi.min.js b/themes/tabi-lean/static/js/lunr/lunr.fi.min.js new file mode 100644 index 0000000..a99beca --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.fi.min.js @@ -0,0 +1 @@ +!function(i,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():e()(i.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var q,v,r;e.fi=function(){this.pipeline.reset(),this.pipeline.add(e.fi.trimmer,e.fi.stopWordFilter,e.fi.stemmer)},e.fi.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.fi.trimmer=e.trimmerSupport.generateTrimmer(e.fi.wordCharacters),e.Pipeline.registerFunction(e.fi.trimmer,"trimmer-fi"),e.fi.stemmer=(q=e.stemmerSupport.Among,v=e.stemmerSupport.SnowballProgram,r=new function(){var n,t,s,o,l=[new q("pa",-1,1),new q("sti",-1,2),new q("kaan",-1,1),new q("han",-1,1),new q("kin",-1,1),new q("hän",-1,1),new q("kään",-1,1),new q("ko",-1,1),new q("pä",-1,1),new q("kö",-1,1)],a=[new q("lla",-1,-1),new q("na",-1,-1),new q("ssa",-1,-1),new q("ta",-1,-1),new q("lta",3,-1),new q("sta",3,-1)],u=[new q("llä",-1,-1),new q("nä",-1,-1),new q("ssä",-1,-1),new q("tä",-1,-1),new q("ltä",3,-1),new q("stä",3,-1)],c=[new q("lle",-1,-1),new q("ine",-1,-1)],m=[new q("nsa",-1,3),new q("mme",-1,3),new q("nne",-1,3),new q("ni",-1,2),new q("si",-1,1),new q("an",-1,4),new q("en",-1,6),new q("än",-1,5),new q("nsä",-1,3)],i=[new q("aa",-1,-1),new q("ee",-1,-1),new q("ii",-1,-1),new q("oo",-1,-1),new q("uu",-1,-1),new q("ää",-1,-1),new q("öö",-1,-1)],w=[new q("a",-1,8),new q("lla",0,-1),new q("na",0,-1),new q("ssa",0,-1),new q("ta",0,-1),new q("lta",4,-1),new q("sta",4,-1),new q("tta",4,9),new q("lle",-1,-1),new q("ine",-1,-1),new q("ksi",-1,-1),new q("n",-1,7),new q("han",11,1),new q("den",11,-1,r),new q("seen",11,-1,j),new q("hen",11,2),new q("tten",11,-1,r),new q("hin",11,3),new q("siin",11,-1,r),new q("hon",11,4),new q("hän",11,5),new q("hön",11,6),new q("ä",-1,8),new q("llä",22,-1),new q("nä",22,-1),new q("ssä",22,-1),new q("tä",22,-1),new q("ltä",26,-1),new q("stä",26,-1),new q("ttä",26,9)],_=[new q("eja",-1,-1),new q("mma",-1,1),new q("imma",1,-1),new q("mpa",-1,1),new q("impa",3,-1),new q("mmi",-1,1),new q("immi",5,-1),new q("mpi",-1,1),new q("impi",7,-1),new q("ejä",-1,-1),new q("mmä",-1,1),new q("immä",10,-1),new q("mpä",-1,1),new q("impä",12,-1)],k=[new q("i",-1,-1),new q("j",-1,-1)],b=[new q("mma",-1,1),new q("imma",0,-1)],d=[17,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8],f=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32],e=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32],p=[17,97,24,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32],h=new v;function g(){for(var i;i=h.cursor,!h.in_grouping(f,97,246);){if((h.cursor=i)>=h.limit)return 1;h.cursor++}for(h.cursor=i;!h.out_grouping(f,97,246);){if(h.cursor>=h.limit)return 1;h.cursor++}}function j(){return h.find_among_b(i,7)}function r(){return h.eq_s_b(1,"i")&&h.in_grouping_b(e,97,246)}this.setCurrent=function(i){h.setCurrent(i)},this.getCurrent=function(){return h.getCurrent()},this.stem=function(){var i,e,r=h.cursor;if(o=h.limit,s=o,g()||(o=h.cursor,g())||(s=h.cursor),n=!1,h.limit_backward=r,h.cursor=h.limit,function(){var i,e;if(h.cursor>=o)if(e=h.limit_backward,h.limit_backward=o,h.ket=h.cursor,i=h.find_among_b(l,10)){switch(h.bra=h.cursor,h.limit_backward=e,i){case 1:if(h.in_grouping_b(p,97,246))break;return;case 2:if(s<=h.cursor)break;return}h.slice_del()}else h.limit_backward=e}(),h.cursor=h.limit,h.cursor>=o)if(r=h.limit_backward,h.limit_backward=o,h.ket=h.cursor,e=h.find_among_b(m,9))switch(h.bra=h.cursor,h.limit_backward=r,e){case 1:i=h.limit-h.cursor,h.eq_s_b(1,"k")||(h.cursor=h.limit-i,h.slice_del());break;case 2:h.slice_del(),h.ket=h.cursor,h.eq_s_b(3,"kse")&&(h.bra=h.cursor,h.slice_from("ksi"));break;case 3:h.slice_del();break;case 4:h.find_among_b(a,6)&&h.slice_del();break;case 5:h.find_among_b(u,6)&&h.slice_del();break;case 6:h.find_among_b(c,2)&&h.slice_del()}else h.limit_backward=r;return h.cursor=h.limit,function(){var i,e,r;if(h.cursor>=o)if(e=h.limit_backward,h.limit_backward=o,h.ket=h.cursor,i=h.find_among_b(w,30)){switch(h.bra=h.cursor,h.limit_backward=e,i){case 1:if(h.eq_s_b(1,"a"))break;return;case 2:case 9:if(h.eq_s_b(1,"e"))break;return;case 3:if(h.eq_s_b(1,"i"))break;return;case 4:if(h.eq_s_b(1,"o"))break;return;case 5:if(h.eq_s_b(1,"ä"))break;return;case 6:if(h.eq_s_b(1,"ö"))break;return;case 7:r=h.limit-h.cursor,!j()&&(h.cursor=h.limit-r,!h.eq_s_b(2,"ie"))||(h.cursor=h.limit-r,h.cursor<=h.limit_backward)?h.cursor=h.limit-r:(h.cursor--,h.bra=h.cursor);break;case 8:if(h.in_grouping_b(f,97,246)&&h.out_grouping_b(f,97,246))break;return}h.slice_del(),n=!0}else h.limit_backward=e}(),h.cursor=h.limit,function(){var i,e;if(h.cursor>=s)if(i=h.limit_backward,h.limit_backward=s,h.ket=h.cursor,e=h.find_among_b(_,14)){if(h.bra=h.cursor,h.limit_backward=i,1==e){if(e=h.limit-h.cursor,h.eq_s_b(2,"po"))return;h.cursor=h.limit-e}h.slice_del()}else h.limit_backward=i}(),h.cursor=h.limit,n?h.cursor>=o&&(e=h.limit_backward,h.limit_backward=o,h.ket=h.cursor,h.find_among_b(k,2)?(h.bra=h.cursor,h.limit_backward=e,h.slice_del()):h.limit_backward=e):(h.cursor=h.limit,function(){var i,e,r,n;if(h.cursor>=o)if(e=h.limit_backward,h.limit_backward=o,h.ket=h.cursor,h.eq_s_b(1,"t")&&(h.bra=h.cursor,n=h.limit-h.cursor,h.in_grouping_b(f,97,246))&&(h.cursor=h.limit-n,h.slice_del(),h.limit_backward=e,n=h.limit-h.cursor,h.cursor>=s)&&(h.cursor=s,r=h.limit_backward,h.limit_backward=h.cursor,h.cursor=h.limit-n,h.ket=h.cursor,i=h.find_among_b(b,2))){if(h.bra=h.cursor,h.limit_backward=r,1==i){if(n=h.limit-h.cursor,h.eq_s_b(2,"po"))return;h.cursor=h.limit-n}h.slice_del()}else h.limit_backward=e}()),h.cursor=h.limit,function(){var i,e,r,n;if(h.cursor>=o){for(i=h.limit_backward,h.limit_backward=o,e=h.limit-h.cursor,j()&&(h.cursor=h.limit-e,h.ket=h.cursor,h.cursor>h.limit_backward)&&(h.cursor--,h.bra=h.cursor,h.slice_del()),h.cursor=h.limit-e,h.ket=h.cursor,h.in_grouping_b(d,97,228)&&(h.bra=h.cursor,h.out_grouping_b(f,97,246))&&h.slice_del(),h.cursor=h.limit-e,h.ket=h.cursor,h.eq_s_b(1,"j")&&(h.bra=h.cursor,r=h.limit-h.cursor,h.eq_s_b(1,"o")||(h.cursor=h.limit-r,h.eq_s_b(1,"u")))&&h.slice_del(),h.cursor=h.limit-e,h.ket=h.cursor,h.eq_s_b(1,"o")&&(h.bra=h.cursor,h.eq_s_b(1,"j"))&&h.slice_del(),h.cursor=h.limit-e,h.limit_backward=i;;){if(n=h.limit-h.cursor,h.out_grouping_b(f,97,246)){h.cursor=h.limit-n;break}if(h.cursor=h.limit-n,h.cursor<=h.limit_backward)return;h.cursor--}h.ket=h.cursor,h.cursor>h.limit_backward&&(h.cursor--,h.bra=h.cursor,t=h.slice_to(),h.eq_v_b(t))&&h.slice_del()}}(),!0}},function(i){return r.setCurrent(i),r.stem(),r.getCurrent()}),e.Pipeline.registerFunction(e.fi.stemmer,"stemmer-fi"),e.fi.stopWordFilter=function(i){if(-1===e.fi.stopWordFilter.stopWords.indexOf(i))return i},e.fi.stopWordFilter.stopWords=new e.SortedSet,e.fi.stopWordFilter.stopWords.length=236,e.fi.stopWordFilter.stopWords.elements=" ei eivät emme en et ette että he heidän heidät heihin heille heillä heiltä heissä heistä heitä hän häneen hänelle hänellä häneltä hänen hänessä hänestä hänet häntä itse ja johon joiden joihin joiksi joilla joille joilta joina joissa joista joita joka joksi jolla jolle jolta jona jonka jos jossa josta jota jotka kanssa keiden keihin keiksi keille keillä keiltä keinä keissä keistä keitä keneen keneksi kenelle kenellä keneltä kenen kenenä kenessä kenestä kenet ketkä ketkä ketä koska kuin kuka kun me meidän meidät meihin meille meillä meiltä meissä meistä meitä mihin miksi mikä mille millä miltä minkä minkä minua minulla minulle minulta minun minussa minusta minut minuun minä minä missä mistä mitkä mitä mukaan mutta ne niiden niihin niiksi niille niillä niiltä niin niin niinä niissä niistä niitä noiden noihin noiksi noilla noille noilta noin noina noissa noista noita nuo nyt näiden näihin näiksi näille näillä näiltä näinä näissä näistä näitä nämä ole olemme olen olet olette oli olimme olin olisi olisimme olisin olisit olisitte olisivat olit olitte olivat olla olleet ollut on ovat poikki se sekä sen siihen siinä siitä siksi sille sillä sillä siltä sinua sinulla sinulle sinulta sinun sinussa sinusta sinut sinuun sinä sinä sitä tai te teidän teidät teihin teille teillä teiltä teissä teistä teitä tuo tuohon tuoksi tuolla tuolle tuolta tuon tuona tuossa tuosta tuota tähän täksi tälle tällä tältä tämä tämän tänä tässä tästä tätä vaan vai vaikka yli".split(" "),e.Pipeline.registerFunction(e.fi.stopWordFilter,"stopWordFilter-fi")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.fr.js b/themes/tabi-lean/static/js/lunr/lunr.fr.js new file mode 100644 index 0000000..13c2420 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.fr.js @@ -0,0 +1,698 @@ +/*! + * Lunr languages, `French` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.fr = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.fr.trimmer, + lunr.fr.stopWordFilter, + lunr.fr.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.fr.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.fr.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.fr.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.fr.trimmer, 'trimmer-fr'); + + /* lunr stemmer function */ + lunr.fr.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function FrenchStemmer() { + var a_0 = [new Among("col", -1, -1), new Among("par", -1, -1), + new Among("tap", -1, -1) + ], + a_1 = [new Among("", -1, 4), + new Among("I", 0, 1), new Among("U", 0, 2), new Among("Y", 0, 3) + ], + a_2 = [ + new Among("iqU", -1, 3), new Among("abl", -1, 3), + new Among("I\u00E8r", -1, 4), new Among("i\u00E8r", -1, 4), + new Among("eus", -1, 2), new Among("iv", -1, 1) + ], + a_3 = [ + new Among("ic", -1, 2), new Among("abil", -1, 1), + new Among("iv", -1, 3) + ], + a_4 = [new Among("iqUe", -1, 1), + new Among("atrice", -1, 2), new Among("ance", -1, 1), + new Among("ence", -1, 5), new Among("logie", -1, 3), + new Among("able", -1, 1), new Among("isme", -1, 1), + new Among("euse", -1, 11), new Among("iste", -1, 1), + new Among("ive", -1, 8), new Among("if", -1, 8), + new Among("usion", -1, 4), new Among("ation", -1, 2), + new Among("ution", -1, 4), new Among("ateur", -1, 2), + new Among("iqUes", -1, 1), new Among("atrices", -1, 2), + new Among("ances", -1, 1), new Among("ences", -1, 5), + new Among("logies", -1, 3), new Among("ables", -1, 1), + new Among("ismes", -1, 1), new Among("euses", -1, 11), + new Among("istes", -1, 1), new Among("ives", -1, 8), + new Among("ifs", -1, 8), new Among("usions", -1, 4), + new Among("ations", -1, 2), new Among("utions", -1, 4), + new Among("ateurs", -1, 2), new Among("ments", -1, 15), + new Among("ements", 30, 6), new Among("issements", 31, 12), + new Among("it\u00E9s", -1, 7), new Among("ment", -1, 15), + new Among("ement", 34, 6), new Among("issement", 35, 12), + new Among("amment", 34, 13), new Among("emment", 34, 14), + new Among("aux", -1, 10), new Among("eaux", 39, 9), + new Among("eux", -1, 1), new Among("it\u00E9", -1, 7) + ], + a_5 = [ + new Among("ira", -1, 1), new Among("ie", -1, 1), + new Among("isse", -1, 1), new Among("issante", -1, 1), + new Among("i", -1, 1), new Among("irai", 4, 1), + new Among("ir", -1, 1), new Among("iras", -1, 1), + new Among("ies", -1, 1), new Among("\u00EEmes", -1, 1), + new Among("isses", -1, 1), new Among("issantes", -1, 1), + new Among("\u00EEtes", -1, 1), new Among("is", -1, 1), + new Among("irais", 13, 1), new Among("issais", 13, 1), + new Among("irions", -1, 1), new Among("issions", -1, 1), + new Among("irons", -1, 1), new Among("issons", -1, 1), + new Among("issants", -1, 1), new Among("it", -1, 1), + new Among("irait", 21, 1), new Among("issait", 21, 1), + new Among("issant", -1, 1), new Among("iraIent", -1, 1), + new Among("issaIent", -1, 1), new Among("irent", -1, 1), + new Among("issent", -1, 1), new Among("iront", -1, 1), + new Among("\u00EEt", -1, 1), new Among("iriez", -1, 1), + new Among("issiez", -1, 1), new Among("irez", -1, 1), + new Among("issez", -1, 1) + ], + a_6 = [new Among("a", -1, 3), + new Among("era", 0, 2), new Among("asse", -1, 3), + new Among("ante", -1, 3), new Among("\u00E9e", -1, 2), + new Among("ai", -1, 3), new Among("erai", 5, 2), + new Among("er", -1, 2), new Among("as", -1, 3), + new Among("eras", 8, 2), new Among("\u00E2mes", -1, 3), + new Among("asses", -1, 3), new Among("antes", -1, 3), + new Among("\u00E2tes", -1, 3), new Among("\u00E9es", -1, 2), + new Among("ais", -1, 3), new Among("erais", 15, 2), + new Among("ions", -1, 1), new Among("erions", 17, 2), + new Among("assions", 17, 3), new Among("erons", -1, 2), + new Among("ants", -1, 3), new Among("\u00E9s", -1, 2), + new Among("ait", -1, 3), new Among("erait", 23, 2), + new Among("ant", -1, 3), new Among("aIent", -1, 3), + new Among("eraIent", 26, 2), new Among("\u00E8rent", -1, 2), + new Among("assent", -1, 3), new Among("eront", -1, 2), + new Among("\u00E2t", -1, 3), new Among("ez", -1, 2), + new Among("iez", 32, 2), new Among("eriez", 33, 2), + new Among("assiez", 33, 3), new Among("erez", 32, 2), + new Among("\u00E9", -1, 2) + ], + a_7 = [new Among("e", -1, 3), + new Among("I\u00E8re", 0, 2), new Among("i\u00E8re", 0, 2), + new Among("ion", -1, 1), new Among("Ier", -1, 2), + new Among("ier", -1, 2), new Among("\u00EB", -1, 4) + ], + a_8 = [ + new Among("ell", -1, -1), new Among("eill", -1, -1), + new Among("enn", -1, -1), new Among("onn", -1, -1), + new Among("ett", -1, -1) + ], + g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 128, 130, 103, 8, 5 + ], + g_keep_with_s = [1, 65, 20, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 + ], + I_p2, I_p1, I_pV, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function habr1(c1, c2, v_1) { + if (sbp.eq_s(1, c1)) { + sbp.ket = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 251)) { + sbp.slice_from(c2); + sbp.cursor = v_1; + return true; + } + } + return false; + } + + function habr2(c1, c2, v_1) { + if (sbp.eq_s(1, c1)) { + sbp.ket = sbp.cursor; + sbp.slice_from(c2); + sbp.cursor = v_1; + return true; + } + return false; + } + + function r_prelude() { + var v_1, v_2; + while (true) { + v_1 = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 251)) { + sbp.bra = sbp.cursor; + v_2 = sbp.cursor; + if (habr1("u", "U", v_1)) + continue; + sbp.cursor = v_2; + if (habr1("i", "I", v_1)) + continue; + sbp.cursor = v_2; + if (habr2("y", "Y", v_1)) + continue; + } + sbp.cursor = v_1; + sbp.bra = v_1; + if (!habr1("y", "Y", v_1)) { + sbp.cursor = v_1; + if (sbp.eq_s(1, "q")) { + sbp.bra = sbp.cursor; + if (habr2("u", "U", v_1)) + continue; + } + sbp.cursor = v_1; + if (v_1 >= sbp.limit) + return; + sbp.cursor++; + } + } + } + + function habr3() { + while (!sbp.in_grouping(g_v, 97, 251)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 251)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + return false; + } + + function r_mark_regions() { + var v_1 = sbp.cursor; + I_pV = sbp.limit; + I_p1 = I_pV; + I_p2 = I_pV; + if (sbp.in_grouping(g_v, 97, 251) && sbp.in_grouping(g_v, 97, 251) && sbp.cursor < sbp.limit) + sbp.cursor++; + else { + sbp.cursor = v_1; + if (!sbp.find_among(a_0, 3)) { + sbp.cursor = v_1; + do { + if (sbp.cursor >= sbp.limit) { + sbp.cursor = I_pV; + break; + } + sbp.cursor++; + } while (!sbp.in_grouping(g_v, 97, 251)); + } + } + I_pV = sbp.cursor; + sbp.cursor = v_1; + if (!habr3()) { + I_p1 = sbp.cursor; + if (!habr3()) + I_p2 = sbp.cursor; + } + } + + function r_postlude() { + var among_var, v_1; + while (true) { + v_1 = sbp.cursor; + sbp.bra = v_1; + among_var = sbp.find_among(a_1, 4); + if (!among_var) + break; + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("i"); + break; + case 2: + sbp.slice_from("u"); + break; + case 3: + sbp.slice_from("y"); + break; + case 4: + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + break; + } + } + } + + function r_RV() { + return I_pV <= sbp.cursor; + } + + function r_R1() { + return I_p1 <= sbp.cursor; + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function r_standard_suffix() { + var among_var, v_1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_4, 43); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + return false; + sbp.slice_del(); + break; + case 2: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "ic")) { + sbp.bra = sbp.cursor; + if (!r_R2()) + sbp.slice_from("iqU"); + else + sbp.slice_del(); + } + break; + case 3: + if (!r_R2()) + return false; + sbp.slice_from("log"); + break; + case 4: + if (!r_R2()) + return false; + sbp.slice_from("u"); + break; + case 5: + if (!r_R2()) + return false; + sbp.slice_from("ent"); + break; + case 6: + if (!r_RV()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_2, 6); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_R2()) { + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "at")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + } + } + break; + case 2: + if (r_R2()) + sbp.slice_del(); + else if (r_R1()) + sbp.slice_from("eux"); + break; + case 3: + if (r_R2()) + sbp.slice_del(); + break; + case 4: + if (r_RV()) + sbp.slice_from("i"); + break; + } + } + break; + case 7: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_3, 3); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_R2()) + sbp.slice_del(); + else + sbp.slice_from("abl"); + break; + case 2: + if (r_R2()) + sbp.slice_del(); + else + sbp.slice_from("iqU"); + break; + case 3: + if (r_R2()) + sbp.slice_del(); + break; + } + } + break; + case 8: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "at")) { + sbp.bra = sbp.cursor; + if (r_R2()) { + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "ic")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + else + sbp.slice_from("iqU"); + break; + } + } + } + break; + case 9: + sbp.slice_from("eau"); + break; + case 10: + if (!r_R1()) + return false; + sbp.slice_from("al"); + break; + case 11: + if (r_R2()) + sbp.slice_del(); + else if (!r_R1()) + return false; + else + sbp.slice_from("eux"); + break; + case 12: + if (!r_R1() || !sbp.out_grouping_b(g_v, 97, 251)) + return false; + sbp.slice_del(); + break; + case 13: + if (r_RV()) + sbp.slice_from("ant"); + return false; + case 14: + if (r_RV()) + sbp.slice_from("ent"); + return false; + case 15: + v_1 = sbp.limit - sbp.cursor; + if (sbp.in_grouping_b(g_v, 97, 251) && r_RV()) { + sbp.cursor = sbp.limit - v_1; + sbp.slice_del(); + } + return false; + } + return true; + } + return false; + } + + function r_i_verb_suffix() { + var among_var, v_1; + if (sbp.cursor < I_pV) + return false; + v_1 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_5, 35); + if (!among_var) { + sbp.limit_backward = v_1; + return false; + } + sbp.bra = sbp.cursor; + if (among_var == 1) { + if (!sbp.out_grouping_b(g_v, 97, 251)) { + sbp.limit_backward = v_1; + return false; + } + sbp.slice_del(); + } + sbp.limit_backward = v_1; + return true; + } + + function r_verb_suffix() { + var among_var, v_2, v_3; + if (sbp.cursor < I_pV) + return false; + v_2 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_6, 38); + if (!among_var) { + sbp.limit_backward = v_2; + return false; + } + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (!r_R2()) { + sbp.limit_backward = v_2; + return false; + } + sbp.slice_del(); + break; + case 2: + sbp.slice_del(); + break; + case 3: + sbp.slice_del(); + v_3 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "e")) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + } else + sbp.cursor = sbp.limit - v_3; + break; + } + sbp.limit_backward = v_2; + return true; + } + + function r_residual_suffix() { + var among_var, v_1 = sbp.limit - sbp.cursor, + v_2, v_4, v_5; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "s")) { + sbp.bra = sbp.cursor; + v_2 = sbp.limit - sbp.cursor; + if (sbp.out_grouping_b(g_keep_with_s, 97, 232)) { + sbp.cursor = sbp.limit - v_2; + sbp.slice_del(); + } else + sbp.cursor = sbp.limit - v_1; + } else + sbp.cursor = sbp.limit - v_1; + if (sbp.cursor >= I_pV) { + v_4 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_7, 7); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_R2()) { + v_5 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "s")) { + sbp.cursor = sbp.limit - v_5; + if (!sbp.eq_s_b(1, "t")) + break; + } + sbp.slice_del(); + } + break; + case 2: + sbp.slice_from("i"); + break; + case 3: + sbp.slice_del(); + break; + case 4: + if (sbp.eq_s_b(2, "gu")) + sbp.slice_del(); + break; + } + } + sbp.limit_backward = v_4; + } + } + + function r_un_double() { + var v_1 = sbp.limit - sbp.cursor; + if (sbp.find_among_b(a_8, 5)) { + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + sbp.bra = sbp.cursor; + sbp.slice_del(); + } + } + } + + function r_un_accent() { + var v_1, v_2 = 1; + while (sbp.out_grouping_b(g_v, 97, 251)) + v_2--; + if (v_2 <= 0) { + sbp.ket = sbp.cursor; + v_1 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "\u00E9")) { + sbp.cursor = sbp.limit - v_1; + if (!sbp.eq_s_b(1, "\u00E8")) + return; + } + sbp.bra = sbp.cursor; + sbp.slice_from("e"); + } + } + + function habr5() { + if (!r_standard_suffix()) { + sbp.cursor = sbp.limit; + if (!r_i_verb_suffix()) { + sbp.cursor = sbp.limit; + if (!r_verb_suffix()) { + sbp.cursor = sbp.limit; + r_residual_suffix(); + return; + } + } + } + sbp.cursor = sbp.limit; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "Y")) { + sbp.bra = sbp.cursor; + sbp.slice_from("i"); + } else { + sbp.cursor = sbp.limit; + if (sbp.eq_s_b(1, "\u00E7")) { + sbp.bra = sbp.cursor; + sbp.slice_from("c"); + } + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_prelude(); + sbp.cursor = v_1; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + habr5(); + sbp.cursor = sbp.limit; + r_un_double(); + sbp.cursor = sbp.limit; + r_un_accent(); + sbp.cursor = sbp.limit_backward; + r_postlude(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.fr.stemmer, 'stemmer-fr'); + + /* stop word filter function */ + lunr.fr.stopWordFilter = function(token) { + if (lunr.fr.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.fr.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.fr.stopWordFilter.stopWords.length = 164; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.fr.stopWordFilter.stopWords.elements = ' ai aie aient aies ait as au aura aurai auraient aurais aurait auras aurez auriez aurions aurons auront aux avaient avais avait avec avez aviez avions avons ayant ayez ayons c ce ceci celà ces cet cette d dans de des du elle en es est et eu eue eues eurent eus eusse eussent eusses eussiez eussions eut eux eûmes eût eûtes furent fus fusse fussent fusses fussiez fussions fut fûmes fût fûtes ici il ils j je l la le les leur leurs lui m ma mais me mes moi mon même n ne nos notre nous on ont ou par pas pour qu que quel quelle quelles quels qui s sa sans se sera serai seraient serais serait seras serez seriez serions serons seront ses soi soient sois soit sommes son sont soyez soyons suis sur t ta te tes toi ton tu un une vos votre vous y à étaient étais était étant étiez étions été étée étées étés êtes'.split(' '); + + lunr.Pipeline.registerFunction(lunr.fr.stopWordFilter, 'stopWordFilter-fr'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.fr.min.js b/themes/tabi-lean/static/js/lunr/lunr.fr.min.js new file mode 100644 index 0000000..4382cb7 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.fr.min.js @@ -0,0 +1 @@ +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,s,i;r.fr=function(){this.pipeline.reset(),this.pipeline.add(r.fr.trimmer,r.fr.stopWordFilter,r.fr.stemmer)},r.fr.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.fr.trimmer=r.trimmerSupport.generateTrimmer(r.fr.wordCharacters),r.Pipeline.registerFunction(r.fr.trimmer,"trimmer-fr"),r.fr.stemmer=(e=r.stemmerSupport.Among,s=r.stemmerSupport.SnowballProgram,i=new function(){var o,u,c,a=[new e("col",-1,-1),new e("par",-1,-1),new e("tap",-1,-1)],l=[new e("",-1,4),new e("I",0,1),new e("U",0,2),new e("Y",0,3)],w=[new e("iqU",-1,3),new e("abl",-1,3),new e("Ièr",-1,4),new e("ièr",-1,4),new e("eus",-1,2),new e("iv",-1,1)],f=[new e("ic",-1,2),new e("abil",-1,1),new e("iv",-1,3)],m=[new e("iqUe",-1,1),new e("atrice",-1,2),new e("ance",-1,1),new e("ence",-1,5),new e("logie",-1,3),new e("able",-1,1),new e("isme",-1,1),new e("euse",-1,11),new e("iste",-1,1),new e("ive",-1,8),new e("if",-1,8),new e("usion",-1,4),new e("ation",-1,2),new e("ution",-1,4),new e("ateur",-1,2),new e("iqUes",-1,1),new e("atrices",-1,2),new e("ances",-1,1),new e("ences",-1,5),new e("logies",-1,3),new e("ables",-1,1),new e("ismes",-1,1),new e("euses",-1,11),new e("istes",-1,1),new e("ives",-1,8),new e("ifs",-1,8),new e("usions",-1,4),new e("ations",-1,2),new e("utions",-1,4),new e("ateurs",-1,2),new e("ments",-1,15),new e("ements",30,6),new e("issements",31,12),new e("ités",-1,7),new e("ment",-1,15),new e("ement",34,6),new e("issement",35,12),new e("amment",34,13),new e("emment",34,14),new e("aux",-1,10),new e("eaux",39,9),new e("eux",-1,1),new e("ité",-1,7)],_=[new e("ira",-1,1),new e("ie",-1,1),new e("isse",-1,1),new e("issante",-1,1),new e("i",-1,1),new e("irai",4,1),new e("ir",-1,1),new e("iras",-1,1),new e("ies",-1,1),new e("îmes",-1,1),new e("isses",-1,1),new e("issantes",-1,1),new e("îtes",-1,1),new e("is",-1,1),new e("irais",13,1),new e("issais",13,1),new e("irions",-1,1),new e("issions",-1,1),new e("irons",-1,1),new e("issons",-1,1),new e("issants",-1,1),new e("it",-1,1),new e("irait",21,1),new e("issait",21,1),new e("issant",-1,1),new e("iraIent",-1,1),new e("issaIent",-1,1),new e("irent",-1,1),new e("issent",-1,1),new e("iront",-1,1),new e("ît",-1,1),new e("iriez",-1,1),new e("issiez",-1,1),new e("irez",-1,1),new e("issez",-1,1)],b=[new e("a",-1,3),new e("era",0,2),new e("asse",-1,3),new e("ante",-1,3),new e("ée",-1,2),new e("ai",-1,3),new e("erai",5,2),new e("er",-1,2),new e("as",-1,3),new e("eras",8,2),new e("âmes",-1,3),new e("asses",-1,3),new e("antes",-1,3),new e("âtes",-1,3),new e("ées",-1,2),new e("ais",-1,3),new e("erais",15,2),new e("ions",-1,1),new e("erions",17,2),new e("assions",17,3),new e("erons",-1,2),new e("ants",-1,3),new e("és",-1,2),new e("ait",-1,3),new e("erait",23,2),new e("ant",-1,3),new e("aIent",-1,3),new e("eraIent",26,2),new e("èrent",-1,2),new e("assent",-1,3),new e("eront",-1,2),new e("ât",-1,3),new e("ez",-1,2),new e("iez",32,2),new e("eriez",33,2),new e("assiez",33,3),new e("erez",32,2),new e("é",-1,2)],d=[new e("e",-1,3),new e("Ière",0,2),new e("ière",0,2),new e("ion",-1,1),new e("Ier",-1,2),new e("ier",-1,2),new e("ë",-1,4)],k=[new e("ell",-1,-1),new e("eill",-1,-1),new e("enn",-1,-1),new e("onn",-1,-1),new e("ett",-1,-1)],p=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,128,130,103,8,5],g=[1,65,20,0,0,0,0,0,0,0,0,0,0,0,0,0,128],q=new s;function v(e,r,s){return q.eq_s(1,e)&&(q.ket=q.cursor,q.in_grouping(p,97,251))&&(q.slice_from(r),q.cursor=s,1)}function z(e,r,s){return q.eq_s(1,e)&&(q.ket=q.cursor,q.slice_from(r),q.cursor=s,1)}function h(){for(;!q.in_grouping(p,97,251);){if(q.cursor>=q.limit)return 1;q.cursor++}for(;!q.out_grouping(p,97,251);){if(q.cursor>=q.limit)return 1;q.cursor++}}function W(){return c<=q.cursor}function y(){return u<=q.cursor}function F(){return o<=q.cursor}this.setCurrent=function(e){q.setCurrent(e)},this.getCurrent=function(){return q.getCurrent()},this.stem=function(){var e=q.cursor,r=(function(){for(var e,r;;){if(e=q.cursor,q.in_grouping(p,97,251)){if(q.bra=q.cursor,r=q.cursor,v("u","U",e))continue;if(q.cursor=r,v("i","I",e))continue;if(q.cursor=r,z("y","Y",e))continue}if(q.cursor=e,q.bra=e,!v("y","Y",e)&&(q.cursor=e,!q.eq_s(1,"q")||(q.bra=q.cursor,!z("u","U",e)))){if((q.cursor=e)>=q.limit)return;q.cursor++}}}(),q.cursor=e,q.cursor);if(c=q.limit,o=u=c,q.in_grouping(p,97,251)&&q.in_grouping(p,97,251)&&q.cursor<q.limit)q.cursor++;else if(q.cursor=r,!q.find_among(a,3)){q.cursor=r;do{if(q.cursor>=q.limit){q.cursor=c;break}}while(q.cursor++,!q.in_grouping(p,97,251))}if(c=q.cursor,q.cursor=r,h()||(u=q.cursor,h())||(o=q.cursor),q.limit_backward=e,q.cursor=q.limit,function(){var e,r;if(q.ket=q.cursor,e=q.find_among_b(m,43)){switch(q.bra=q.cursor,e){case 1:if(!F())return;q.slice_del();break;case 2:if(!F())return;q.slice_del(),q.ket=q.cursor,q.eq_s_b(2,"ic")&&(q.bra=q.cursor,F()?q.slice_del():q.slice_from("iqU"));break;case 3:if(!F())return;q.slice_from("log");break;case 4:if(!F())return;q.slice_from("u");break;case 5:if(!F())return;q.slice_from("ent");break;case 6:if(!W())return;if(q.slice_del(),q.ket=q.cursor,e=q.find_among_b(w,6))switch(q.bra=q.cursor,e){case 1:F()&&(q.slice_del(),q.ket=q.cursor,q.eq_s_b(2,"at"))&&(q.bra=q.cursor,F())&&q.slice_del();break;case 2:F()?q.slice_del():y()&&q.slice_from("eux");break;case 3:F()&&q.slice_del();break;case 4:W()&&q.slice_from("i")}break;case 7:if(!F())return;if(q.slice_del(),q.ket=q.cursor,e=q.find_among_b(f,3))switch(q.bra=q.cursor,e){case 1:F()?q.slice_del():q.slice_from("abl");break;case 2:F()?q.slice_del():q.slice_from("iqU");break;case 3:F()&&q.slice_del()}break;case 8:if(!F())return;q.slice_del(),q.ket=q.cursor,q.eq_s_b(2,"at")&&(q.bra=q.cursor,F())&&(q.slice_del(),q.ket=q.cursor,q.eq_s_b(2,"ic"))&&(q.bra=q.cursor,F()?q.slice_del():q.slice_from("iqU"));break;case 9:q.slice_from("eau");break;case 10:if(!y())return;q.slice_from("al");break;case 11:if(F())q.slice_del();else{if(!y())return;q.slice_from("eux")}break;case 12:if(!y()||!q.out_grouping_b(p,97,251))return;q.slice_del();break;case 13:return W()&&q.slice_from("ant"),0;case 14:return W()&&q.slice_from("ent"),0;case 15:return r=q.limit-q.cursor,q.in_grouping_b(p,97,251)&&W()&&(q.cursor=q.limit-r,q.slice_del()),0}return 1}}()||(q.cursor=q.limit,function(){var e,r;if(!(q.cursor<c)){if(r=q.limit_backward,q.limit_backward=c,q.ket=q.cursor,e=q.find_among_b(_,35)){if(q.bra=q.cursor,1==e){if(!q.out_grouping_b(p,97,251))return q.limit_backward=r,0;q.slice_del()}return q.limit_backward=r,1}q.limit_backward=r}}())||(q.cursor=q.limit,function(){var e,r,s;if(!(q.cursor<c)){if(r=q.limit_backward,q.limit_backward=c,q.ket=q.cursor,e=q.find_among_b(b,38)){switch(q.bra=q.cursor,e){case 1:if(!F())return q.limit_backward=r,0;q.slice_del();break;case 2:q.slice_del();break;case 3:q.slice_del(),s=q.limit-q.cursor,q.ket=q.cursor,q.eq_s_b(1,"e")?(q.bra=q.cursor,q.slice_del()):q.cursor=q.limit-s}return q.limit_backward=r,1}q.limit_backward=r}}()))q.cursor=q.limit,q.ket=q.cursor,q.eq_s_b(1,"Y")?(q.bra=q.cursor,q.slice_from("i")):(q.cursor=q.limit,q.eq_s_b(1,"ç")&&(q.bra=q.cursor,q.slice_from("c")));else{q.cursor=q.limit;var s,i,n=q.limit-q.cursor;if(q.ket=q.cursor,q.eq_s_b(1,"s")&&(q.bra=q.cursor,s=q.limit-q.cursor,q.out_grouping_b(g,97,232))?(q.cursor=q.limit-s,q.slice_del()):q.cursor=q.limit-n,q.cursor>=c){if(s=q.limit_backward,q.limit_backward=c,q.ket=q.cursor,n=q.find_among_b(d,7))switch(q.bra=q.cursor,n){case 1:if(F()){if(i=q.limit-q.cursor,!q.eq_s_b(1,"s")&&(q.cursor=q.limit-i,!q.eq_s_b(1,"t")))break;q.slice_del()}break;case 2:q.slice_from("i");break;case 3:q.slice_del();break;case 4:q.eq_s_b(2,"gu")&&q.slice_del()}q.limit_backward=s}}q.cursor=q.limit,r=q.limit-q.cursor,q.find_among_b(k,5)&&(q.cursor=q.limit-r,q.ket=q.cursor,q.cursor>q.limit_backward)&&(q.cursor--,q.bra=q.cursor,q.slice_del()),q.cursor=q.limit;for(var t=1;q.out_grouping_b(p,97,251);)t--;return t<=0&&(q.ket=q.cursor,e=q.limit-q.cursor,q.eq_s_b(1,"é")||(q.cursor=q.limit-e,q.eq_s_b(1,"è")))&&(q.bra=q.cursor,q.slice_from("e")),q.cursor=q.limit_backward,function(){for(var e;e=q.cursor,q.bra=e,e=q.find_among(l,4);)switch(q.ket=q.cursor,e){case 1:q.slice_from("i");break;case 2:q.slice_from("u");break;case 3:q.slice_from("y");break;case 4:if(q.cursor>=q.limit)return;q.cursor++}}(),!0}},function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}),r.Pipeline.registerFunction(r.fr.stemmer,"stemmer-fr"),r.fr.stopWordFilter=function(e){if(-1===r.fr.stopWordFilter.stopWords.indexOf(e))return e},r.fr.stopWordFilter.stopWords=new r.SortedSet,r.fr.stopWordFilter.stopWords.length=164,r.fr.stopWordFilter.stopWords.elements=" ai aie aient aies ait as au aura aurai auraient aurais aurait auras aurez auriez aurions aurons auront aux avaient avais avait avec avez aviez avions avons ayant ayez ayons c ce ceci celà ces cet cette d dans de des du elle en es est et eu eue eues eurent eus eusse eussent eusses eussiez eussions eut eux eûmes eût eûtes furent fus fusse fussent fusses fussiez fussions fut fûmes fût fûtes ici il ils j je l la le les leur leurs lui m ma mais me mes moi mon même n ne nos notre nous on ont ou par pas pour qu que quel quelle quelles quels qui s sa sans se sera serai seraient serais serait seras serez seriez serions serons seront ses soi soient sois soit sommes son sont soyez soyons suis sur t ta te tes toi ton tu un une vos votre vous y à étaient étais était étant étiez étions été étée étées étés êtes".split(" "),r.Pipeline.registerFunction(r.fr.stopWordFilter,"stopWordFilter-fr")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.hu.js b/themes/tabi-lean/static/js/lunr/lunr.hu.js new file mode 100644 index 0000000..986ddb0 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.hu.js @@ -0,0 +1,561 @@ +/*! + * Lunr languages, `Hungarian` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.hu = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.hu.trimmer, + lunr.hu.stopWordFilter, + lunr.hu.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.hu.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.hu.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.hu.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.hu.trimmer, 'trimmer-hu'); + + /* lunr stemmer function */ + lunr.hu.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function HungarianStemmer() { + var a_0 = [new Among("cs", -1, -1), new Among("dzs", -1, -1), + new Among("gy", -1, -1), new Among("ly", -1, -1), + new Among("ny", -1, -1), new Among("sz", -1, -1), + new Among("ty", -1, -1), new Among("zs", -1, -1) + ], + a_1 = [ + new Among("\u00E1", -1, 1), new Among("\u00E9", -1, 2) + ], + a_2 = [ + new Among("bb", -1, -1), new Among("cc", -1, -1), + new Among("dd", -1, -1), new Among("ff", -1, -1), + new Among("gg", -1, -1), new Among("jj", -1, -1), + new Among("kk", -1, -1), new Among("ll", -1, -1), + new Among("mm", -1, -1), new Among("nn", -1, -1), + new Among("pp", -1, -1), new Among("rr", -1, -1), + new Among("ccs", -1, -1), new Among("ss", -1, -1), + new Among("zzs", -1, -1), new Among("tt", -1, -1), + new Among("vv", -1, -1), new Among("ggy", -1, -1), + new Among("lly", -1, -1), new Among("nny", -1, -1), + new Among("tty", -1, -1), new Among("ssz", -1, -1), + new Among("zz", -1, -1) + ], + a_3 = [new Among("al", -1, 1), + new Among("el", -1, 2) + ], + a_4 = [new Among("ba", -1, -1), + new Among("ra", -1, -1), new Among("be", -1, -1), + new Among("re", -1, -1), new Among("ig", -1, -1), + new Among("nak", -1, -1), new Among("nek", -1, -1), + new Among("val", -1, -1), new Among("vel", -1, -1), + new Among("ul", -1, -1), new Among("n\u00E1l", -1, -1), + new Among("n\u00E9l", -1, -1), new Among("b\u00F3l", -1, -1), + new Among("r\u00F3l", -1, -1), new Among("t\u00F3l", -1, -1), + new Among("b\u00F5l", -1, -1), new Among("r\u00F5l", -1, -1), + new Among("t\u00F5l", -1, -1), new Among("\u00FCl", -1, -1), + new Among("n", -1, -1), new Among("an", 19, -1), + new Among("ban", 20, -1), new Among("en", 19, -1), + new Among("ben", 22, -1), new Among("k\u00E9ppen", 22, -1), + new Among("on", 19, -1), new Among("\u00F6n", 19, -1), + new Among("k\u00E9pp", -1, -1), new Among("kor", -1, -1), + new Among("t", -1, -1), new Among("at", 29, -1), + new Among("et", 29, -1), new Among("k\u00E9nt", 29, -1), + new Among("ank\u00E9nt", 32, -1), new Among("enk\u00E9nt", 32, -1), + new Among("onk\u00E9nt", 32, -1), new Among("ot", 29, -1), + new Among("\u00E9rt", 29, -1), new Among("\u00F6t", 29, -1), + new Among("hez", -1, -1), new Among("hoz", -1, -1), + new Among("h\u00F6z", -1, -1), new Among("v\u00E1", -1, -1), + new Among("v\u00E9", -1, -1) + ], + a_5 = [new Among("\u00E1n", -1, 2), + new Among("\u00E9n", -1, 1), new Among("\u00E1nk\u00E9nt", -1, 3) + ], + a_6 = [ + new Among("stul", -1, 2), new Among("astul", 0, 1), + new Among("\u00E1stul", 0, 3), new Among("st\u00FCl", -1, 2), + new Among("est\u00FCl", 3, 1), new Among("\u00E9st\u00FCl", 3, 4) + ], + a_7 = [ + new Among("\u00E1", -1, 1), new Among("\u00E9", -1, 2) + ], + a_8 = [ + new Among("k", -1, 7), new Among("ak", 0, 4), + new Among("ek", 0, 6), new Among("ok", 0, 5), + new Among("\u00E1k", 0, 1), new Among("\u00E9k", 0, 2), + new Among("\u00F6k", 0, 3) + ], + a_9 = [new Among("\u00E9i", -1, 7), + new Among("\u00E1\u00E9i", 0, 6), new Among("\u00E9\u00E9i", 0, 5), + new Among("\u00E9", -1, 9), new Among("k\u00E9", 3, 4), + new Among("ak\u00E9", 4, 1), new Among("ek\u00E9", 4, 1), + new Among("ok\u00E9", 4, 1), new Among("\u00E1k\u00E9", 4, 3), + new Among("\u00E9k\u00E9", 4, 2), new Among("\u00F6k\u00E9", 4, 1), + new Among("\u00E9\u00E9", 3, 8) + ], + a_10 = [new Among("a", -1, 18), + new Among("ja", 0, 17), new Among("d", -1, 16), + new Among("ad", 2, 13), new Among("ed", 2, 13), + new Among("od", 2, 13), new Among("\u00E1d", 2, 14), + new Among("\u00E9d", 2, 15), new Among("\u00F6d", 2, 13), + new Among("e", -1, 18), new Among("je", 9, 17), + new Among("nk", -1, 4), new Among("unk", 11, 1), + new Among("\u00E1nk", 11, 2), new Among("\u00E9nk", 11, 3), + new Among("\u00FCnk", 11, 1), new Among("uk", -1, 8), + new Among("juk", 16, 7), new Among("\u00E1juk", 17, 5), + new Among("\u00FCk", -1, 8), new Among("j\u00FCk", 19, 7), + new Among("\u00E9j\u00FCk", 20, 6), new Among("m", -1, 12), + new Among("am", 22, 9), new Among("em", 22, 9), + new Among("om", 22, 9), new Among("\u00E1m", 22, 10), + new Among("\u00E9m", 22, 11), new Among("o", -1, 18), + new Among("\u00E1", -1, 19), new Among("\u00E9", -1, 20) + ], + a_11 = [ + new Among("id", -1, 10), new Among("aid", 0, 9), + new Among("jaid", 1, 6), new Among("eid", 0, 9), + new Among("jeid", 3, 6), new Among("\u00E1id", 0, 7), + new Among("\u00E9id", 0, 8), new Among("i", -1, 15), + new Among("ai", 7, 14), new Among("jai", 8, 11), + new Among("ei", 7, 14), new Among("jei", 10, 11), + new Among("\u00E1i", 7, 12), new Among("\u00E9i", 7, 13), + new Among("itek", -1, 24), new Among("eitek", 14, 21), + new Among("jeitek", 15, 20), new Among("\u00E9itek", 14, 23), + new Among("ik", -1, 29), new Among("aik", 18, 26), + new Among("jaik", 19, 25), new Among("eik", 18, 26), + new Among("jeik", 21, 25), new Among("\u00E1ik", 18, 27), + new Among("\u00E9ik", 18, 28), new Among("ink", -1, 20), + new Among("aink", 25, 17), new Among("jaink", 26, 16), + new Among("eink", 25, 17), new Among("jeink", 28, 16), + new Among("\u00E1ink", 25, 18), new Among("\u00E9ink", 25, 19), + new Among("aitok", -1, 21), new Among("jaitok", 32, 20), + new Among("\u00E1itok", -1, 22), new Among("im", -1, 5), + new Among("aim", 35, 4), new Among("jaim", 36, 1), + new Among("eim", 35, 4), new Among("jeim", 38, 1), + new Among("\u00E1im", 35, 2), new Among("\u00E9im", 35, 3) + ], + g_v = [ + 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 52, 14 + ], + I_p1, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function r_mark_regions() { + var v_1 = sbp.cursor, + v_2; + I_p1 = sbp.limit; + if (sbp.in_grouping(g_v, 97, 252)) { + while (true) { + v_2 = sbp.cursor; + if (sbp.out_grouping(g_v, 97, 252)) { + sbp.cursor = v_2; + if (!sbp.find_among(a_0, 8)) { + sbp.cursor = v_2; + if (v_2 < sbp.limit) + sbp.cursor++; + } + I_p1 = sbp.cursor; + return; + } + sbp.cursor = v_2; + if (v_2 >= sbp.limit) { + I_p1 = v_2; + return; + } + sbp.cursor++; + } + } + sbp.cursor = v_1; + if (sbp.out_grouping(g_v, 97, 252)) { + while (!sbp.in_grouping(g_v, 97, 252)) { + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + } + I_p1 = sbp.cursor; + } + } + + function r_R1() { + return I_p1 <= sbp.cursor; + } + + function r_v_ending() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_1, 2); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + sbp.slice_from("a"); + break; + case 2: + sbp.slice_from("e"); + break; + } + } + } + } + + function r_double() { + var v_1 = sbp.limit - sbp.cursor; + if (!sbp.find_among_b(a_2, 23)) + return false; + sbp.cursor = sbp.limit - v_1; + return true; + } + + function r_undouble() { + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + sbp.ket = sbp.cursor; + var c = sbp.cursor - 1; + if (sbp.limit_backward <= c && c <= sbp.limit) { + sbp.cursor = c; + sbp.bra = c; + sbp.slice_del(); + } + } + } + + function r_instrum() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_3, 2); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + if (among_var == 1 || among_var == 2) + if (!r_double()) + return; + sbp.slice_del(); + r_undouble(); + } + } + } + + function r_case() { + sbp.ket = sbp.cursor; + if (sbp.find_among_b(a_4, 44)) { + sbp.bra = sbp.cursor; + if (r_R1()) { + sbp.slice_del(); + r_v_ending(); + } + } + } + + function r_case_special() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_5, 3); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + sbp.slice_from("e"); + break; + case 2: + case 3: + sbp.slice_from("a"); + break; + } + } + } + } + + function r_case_other() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_6, 6); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + case 2: + sbp.slice_del(); + break; + case 3: + sbp.slice_from("a"); + break; + case 4: + sbp.slice_from("e"); + break; + } + } + } + } + + function r_factive() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_7, 2); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + if (among_var == 1 || among_var == 2) + if (!r_double()) + return; + sbp.slice_del(); + r_undouble() + } + } + } + + function r_plural() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_8, 7); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + sbp.slice_from("a"); + break; + case 2: + sbp.slice_from("e"); + break; + case 3: + case 4: + case 5: + case 6: + case 7: + sbp.slice_del(); + break; + } + } + } + } + + function r_owned() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_9, 12); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + case 4: + case 7: + case 9: + sbp.slice_del(); + break; + case 2: + case 5: + case 8: + sbp.slice_from("e"); + break; + case 3: + case 6: + sbp.slice_from("a"); + break; + } + } + } + } + + function r_sing_owner() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_10, 31); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + case 4: + case 7: + case 8: + case 9: + case 12: + case 13: + case 16: + case 17: + case 18: + sbp.slice_del(); + break; + case 2: + case 5: + case 10: + case 14: + case 19: + sbp.slice_from("a"); + break; + case 3: + case 6: + case 11: + case 15: + case 20: + sbp.slice_from("e"); + break; + } + } + } + } + + function r_plur_owner() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_11, 42); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + case 4: + case 5: + case 6: + case 9: + case 10: + case 11: + case 14: + case 15: + case 16: + case 17: + case 20: + case 21: + case 24: + case 25: + case 26: + case 29: + sbp.slice_del(); + break; + case 2: + case 7: + case 12: + case 18: + case 22: + case 27: + sbp.slice_from("a"); + break; + case 3: + case 8: + case 13: + case 19: + case 23: + case 28: + sbp.slice_from("e"); + break; + } + } + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_instrum(); + sbp.cursor = sbp.limit; + r_case(); + sbp.cursor = sbp.limit; + r_case_special(); + sbp.cursor = sbp.limit; + r_case_other(); + sbp.cursor = sbp.limit; + r_factive(); + sbp.cursor = sbp.limit; + r_owned(); + sbp.cursor = sbp.limit; + r_sing_owner(); + sbp.cursor = sbp.limit; + r_plur_owner(); + sbp.cursor = sbp.limit; + r_plural(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.hu.stemmer, 'stemmer-hu'); + + /* stop word filter function */ + lunr.hu.stopWordFilter = function(token) { + if (lunr.hu.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.hu.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.hu.stopWordFilter.stopWords.length = 200; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.hu.stopWordFilter.stopWords.elements = ' a abban ahhoz ahogy ahol aki akik akkor alatt amely amelyek amelyekben amelyeket amelyet amelynek ami amikor amit amolyan amíg annak arra arról az azok azon azonban azt aztán azután azzal azért be belül benne bár cikk cikkek cikkeket csak de e ebben eddig egy egyes egyetlen egyik egyre egyéb egész ehhez ekkor el ellen elsõ elég elõ elõször elõtt emilyen ennek erre ez ezek ezen ezt ezzel ezért fel felé hanem hiszen hogy hogyan igen ill ill. illetve ilyen ilyenkor ismét ison itt jobban jó jól kell kellett keressünk keresztül ki kívül között közül legalább legyen lehet lehetett lenne lenni lesz lett maga magát majd majd meg mellett mely melyek mert mi mikor milyen minden mindenki mindent mindig mint mintha mit mivel miért most már más másik még míg nagy nagyobb nagyon ne nekem neki nem nincs néha néhány nélkül olyan ott pedig persze rá s saját sem semmi sok sokat sokkal szemben szerint szinte számára talán tehát teljes tovább továbbá több ugyanis utolsó után utána vagy vagyis vagyok valaki valami valamint való van vannak vele vissza viszont volna volt voltak voltam voltunk által általában át én éppen és így õ õk õket össze úgy új újabb újra'.split(' '); + + lunr.Pipeline.registerFunction(lunr.hu.stopWordFilter, 'stopWordFilter-hu'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.hu.min.js b/themes/tabi-lean/static/js/lunr/lunr.hu.min.js new file mode 100644 index 0000000..1825c26 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.hu.min.js @@ -0,0 +1 @@ +!function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof exports?module.exports=n():n()(e.lunr)}(this,function(){return function(n){if(void 0===n)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===n.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,p,r;n.hu=function(){this.pipeline.reset(),this.pipeline.add(n.hu.trimmer,n.hu.stopWordFilter,n.hu.stemmer)},n.hu.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",n.hu.trimmer=n.trimmerSupport.generateTrimmer(n.hu.wordCharacters),n.Pipeline.registerFunction(n.hu.trimmer,"trimmer-hu"),n.hu.stemmer=(e=n.stemmerSupport.Among,p=n.stemmerSupport.SnowballProgram,r=new function(){var r,i=[new e("cs",-1,-1),new e("dzs",-1,-1),new e("gy",-1,-1),new e("ly",-1,-1),new e("ny",-1,-1),new e("sz",-1,-1),new e("ty",-1,-1),new e("zs",-1,-1)],s=[new e("á",-1,1),new e("é",-1,2)],n=[new e("bb",-1,-1),new e("cc",-1,-1),new e("dd",-1,-1),new e("ff",-1,-1),new e("gg",-1,-1),new e("jj",-1,-1),new e("kk",-1,-1),new e("ll",-1,-1),new e("mm",-1,-1),new e("nn",-1,-1),new e("pp",-1,-1),new e("rr",-1,-1),new e("ccs",-1,-1),new e("ss",-1,-1),new e("zzs",-1,-1),new e("tt",-1,-1),new e("vv",-1,-1),new e("ggy",-1,-1),new e("lly",-1,-1),new e("nny",-1,-1),new e("tty",-1,-1),new e("ssz",-1,-1),new e("zz",-1,-1)],a=[new e("al",-1,1),new e("el",-1,2)],t=[new e("ba",-1,-1),new e("ra",-1,-1),new e("be",-1,-1),new e("re",-1,-1),new e("ig",-1,-1),new e("nak",-1,-1),new e("nek",-1,-1),new e("val",-1,-1),new e("vel",-1,-1),new e("ul",-1,-1),new e("nál",-1,-1),new e("nél",-1,-1),new e("ból",-1,-1),new e("ról",-1,-1),new e("tól",-1,-1),new e("bõl",-1,-1),new e("rõl",-1,-1),new e("tõl",-1,-1),new e("ül",-1,-1),new e("n",-1,-1),new e("an",19,-1),new e("ban",20,-1),new e("en",19,-1),new e("ben",22,-1),new e("képpen",22,-1),new e("on",19,-1),new e("ön",19,-1),new e("képp",-1,-1),new e("kor",-1,-1),new e("t",-1,-1),new e("at",29,-1),new e("et",29,-1),new e("ként",29,-1),new e("anként",32,-1),new e("enként",32,-1),new e("onként",32,-1),new e("ot",29,-1),new e("ért",29,-1),new e("öt",29,-1),new e("hez",-1,-1),new e("hoz",-1,-1),new e("höz",-1,-1),new e("vá",-1,-1),new e("vé",-1,-1)],w=[new e("án",-1,2),new e("én",-1,1),new e("ánként",-1,3)],o=[new e("stul",-1,2),new e("astul",0,1),new e("ástul",0,3),new e("stül",-1,2),new e("estül",3,1),new e("éstül",3,4)],c=[new e("á",-1,1),new e("é",-1,2)],l=[new e("k",-1,7),new e("ak",0,4),new e("ek",0,6),new e("ok",0,5),new e("ák",0,1),new e("ék",0,2),new e("ök",0,3)],m=[new e("éi",-1,7),new e("áéi",0,6),new e("ééi",0,5),new e("é",-1,9),new e("ké",3,4),new e("aké",4,1),new e("eké",4,1),new e("oké",4,1),new e("áké",4,3),new e("éké",4,2),new e("öké",4,1),new e("éé",3,8)],u=[new e("a",-1,18),new e("ja",0,17),new e("d",-1,16),new e("ad",2,13),new e("ed",2,13),new e("od",2,13),new e("ád",2,14),new e("éd",2,15),new e("öd",2,13),new e("e",-1,18),new e("je",9,17),new e("nk",-1,4),new e("unk",11,1),new e("ánk",11,2),new e("énk",11,3),new e("ünk",11,1),new e("uk",-1,8),new e("juk",16,7),new e("ájuk",17,5),new e("ük",-1,8),new e("jük",19,7),new e("éjük",20,6),new e("m",-1,12),new e("am",22,9),new e("em",22,9),new e("om",22,9),new e("ám",22,10),new e("ém",22,11),new e("o",-1,18),new e("á",-1,19),new e("é",-1,20)],k=[new e("id",-1,10),new e("aid",0,9),new e("jaid",1,6),new e("eid",0,9),new e("jeid",3,6),new e("áid",0,7),new e("éid",0,8),new e("i",-1,15),new e("ai",7,14),new e("jai",8,11),new e("ei",7,14),new e("jei",10,11),new e("ái",7,12),new e("éi",7,13),new e("itek",-1,24),new e("eitek",14,21),new e("jeitek",15,20),new e("éitek",14,23),new e("ik",-1,29),new e("aik",18,26),new e("jaik",19,25),new e("eik",18,26),new e("jeik",21,25),new e("áik",18,27),new e("éik",18,28),new e("ink",-1,20),new e("aink",25,17),new e("jaink",26,16),new e("eink",25,17),new e("jeink",28,16),new e("áink",25,18),new e("éink",25,19),new e("aitok",-1,21),new e("jaitok",32,20),new e("áitok",-1,22),new e("im",-1,5),new e("aim",35,4),new e("jaim",36,1),new e("eim",35,4),new e("jeim",38,1),new e("áim",35,2),new e("éim",35,3)],d=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,52,14],b=new p;function f(){return r<=b.cursor}function g(){var e=b.limit-b.cursor;return b.find_among_b(n,23)&&(b.cursor=b.limit-e,1)}function h(){var e;b.cursor>b.limit_backward&&(b.cursor--,b.ket=b.cursor,e=b.cursor-1,b.limit_backward<=e)&&e<=b.limit&&(b.cursor=e,b.bra=e,b.slice_del())}this.setCurrent=function(e){b.setCurrent(e)},this.getCurrent=function(){return b.getCurrent()},this.stem=function(){var e,n=b.cursor;if(function(){var e,n=b.cursor;if(r=b.limit,b.in_grouping(d,97,252))for(;;){if(e=b.cursor,b.out_grouping(d,97,252))return b.cursor=e,b.find_among(i,8)||(b.cursor=e)<b.limit&&b.cursor++,r=b.cursor;if((b.cursor=e)>=b.limit)return r=e;b.cursor++}if(b.cursor=n,b.out_grouping(d,97,252)){for(;!b.in_grouping(d,97,252);){if(b.cursor>=b.limit)return;b.cursor++}r=b.cursor}}(),b.limit_backward=n,b.cursor=b.limit,b.ket=b.cursor,(n=b.find_among_b(a,2))&&(b.bra=b.cursor,f())&&(1!=n&&2!=n||g())&&(b.slice_del(),h()),b.cursor=b.limit,b.ket=b.cursor,b.find_among_b(t,44)&&(b.bra=b.cursor,f())&&(b.slice_del(),b.ket=b.cursor,e=b.find_among_b(s,2))&&(b.bra=b.cursor,f()))switch(e){case 1:b.slice_from("a");break;case 2:b.slice_from("e")}if(b.cursor=b.limit,b.ket=b.cursor,(n=b.find_among_b(w,3))&&(b.bra=b.cursor,f()))switch(n){case 1:b.slice_from("e");break;case 2:case 3:b.slice_from("a")}if(b.cursor=b.limit,b.ket=b.cursor,(n=b.find_among_b(o,6))&&(b.bra=b.cursor,f()))switch(n){case 1:case 2:b.slice_del();break;case 3:b.slice_from("a");break;case 4:b.slice_from("e")}if(b.cursor=b.limit,b.ket=b.cursor,(n=b.find_among_b(c,2))&&(b.bra=b.cursor,f())&&(1!=n&&2!=n||g())&&(b.slice_del(),h()),b.cursor=b.limit,b.ket=b.cursor,(n=b.find_among_b(m,12))&&(b.bra=b.cursor,f()))switch(n){case 1:case 4:case 7:case 9:b.slice_del();break;case 2:case 5:case 8:b.slice_from("e");break;case 3:case 6:b.slice_from("a")}if(b.cursor=b.limit,b.ket=b.cursor,(n=b.find_among_b(u,31))&&(b.bra=b.cursor,f()))switch(n){case 1:case 4:case 7:case 8:case 9:case 12:case 13:case 16:case 17:case 18:b.slice_del();break;case 2:case 5:case 10:case 14:case 19:b.slice_from("a");break;case 3:case 6:case 11:case 15:case 20:b.slice_from("e")}if(b.cursor=b.limit,b.ket=b.cursor,(n=b.find_among_b(k,42))&&(b.bra=b.cursor,f()))switch(n){case 1:case 4:case 5:case 6:case 9:case 10:case 11:case 14:case 15:case 16:case 17:case 20:case 21:case 24:case 25:case 26:case 29:b.slice_del();break;case 2:case 7:case 12:case 18:case 22:case 27:b.slice_from("a");break;case 3:case 8:case 13:case 19:case 23:case 28:b.slice_from("e")}if(b.cursor=b.limit,b.ket=b.cursor,(n=b.find_among_b(l,7))&&(b.bra=b.cursor,f()))switch(n){case 1:b.slice_from("a");break;case 2:b.slice_from("e");break;case 3:case 4:case 5:case 6:case 7:b.slice_del()}return!0}},function(e){return r.setCurrent(e),r.stem(),r.getCurrent()}),n.Pipeline.registerFunction(n.hu.stemmer,"stemmer-hu"),n.hu.stopWordFilter=function(e){if(-1===n.hu.stopWordFilter.stopWords.indexOf(e))return e},n.hu.stopWordFilter.stopWords=new n.SortedSet,n.hu.stopWordFilter.stopWords.length=200,n.hu.stopWordFilter.stopWords.elements=" a abban ahhoz ahogy ahol aki akik akkor alatt amely amelyek amelyekben amelyeket amelyet amelynek ami amikor amit amolyan amíg annak arra arról az azok azon azonban azt aztán azután azzal azért be belül benne bár cikk cikkek cikkeket csak de e ebben eddig egy egyes egyetlen egyik egyre egyéb egész ehhez ekkor el ellen elsõ elég elõ elõször elõtt emilyen ennek erre ez ezek ezen ezt ezzel ezért fel felé hanem hiszen hogy hogyan igen ill ill. illetve ilyen ilyenkor ismét ison itt jobban jó jól kell kellett keressünk keresztül ki kívül között közül legalább legyen lehet lehetett lenne lenni lesz lett maga magát majd majd meg mellett mely melyek mert mi mikor milyen minden mindenki mindent mindig mint mintha mit mivel miért most már más másik még míg nagy nagyobb nagyon ne nekem neki nem nincs néha néhány nélkül olyan ott pedig persze rá s saját sem semmi sok sokat sokkal szemben szerint szinte számára talán tehát teljes tovább továbbá több ugyanis utolsó után utána vagy vagyis vagyok valaki valami valamint való van vannak vele vissza viszont volna volt voltak voltam voltunk által általában át én éppen és így õ õk õket össze úgy új újabb újra".split(" "),n.Pipeline.registerFunction(n.hu.stopWordFilter,"stopWordFilter-hu")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.it.js b/themes/tabi-lean/static/js/lunr/lunr.it.js new file mode 100644 index 0000000..90014d7 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.it.js @@ -0,0 +1,612 @@ +/*! + * Lunr languages, `Italian` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.it = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.it.trimmer, + lunr.it.stopWordFilter, + lunr.it.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.it.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.it.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.it.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.it.trimmer, 'trimmer-it'); + + /* lunr stemmer function */ + lunr.it.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function ItalianStemmer() { + var a_0 = [new Among("", -1, 7), new Among("qu", 0, 6), + new Among("\u00E1", 0, 1), new Among("\u00E9", 0, 2), + new Among("\u00ED", 0, 3), new Among("\u00F3", 0, 4), + new Among("\u00FA", 0, 5) + ], + a_1 = [new Among("", -1, 3), + new Among("I", 0, 1), new Among("U", 0, 2) + ], + a_2 = [ + new Among("la", -1, -1), new Among("cela", 0, -1), + new Among("gliela", 0, -1), new Among("mela", 0, -1), + new Among("tela", 0, -1), new Among("vela", 0, -1), + new Among("le", -1, -1), new Among("cele", 6, -1), + new Among("gliele", 6, -1), new Among("mele", 6, -1), + new Among("tele", 6, -1), new Among("vele", 6, -1), + new Among("ne", -1, -1), new Among("cene", 12, -1), + new Among("gliene", 12, -1), new Among("mene", 12, -1), + new Among("sene", 12, -1), new Among("tene", 12, -1), + new Among("vene", 12, -1), new Among("ci", -1, -1), + new Among("li", -1, -1), new Among("celi", 20, -1), + new Among("glieli", 20, -1), new Among("meli", 20, -1), + new Among("teli", 20, -1), new Among("veli", 20, -1), + new Among("gli", 20, -1), new Among("mi", -1, -1), + new Among("si", -1, -1), new Among("ti", -1, -1), + new Among("vi", -1, -1), new Among("lo", -1, -1), + new Among("celo", 31, -1), new Among("glielo", 31, -1), + new Among("melo", 31, -1), new Among("telo", 31, -1), + new Among("velo", 31, -1) + ], + a_3 = [new Among("ando", -1, 1), + new Among("endo", -1, 1), new Among("ar", -1, 2), + new Among("er", -1, 2), new Among("ir", -1, 2) + ], + a_4 = [ + new Among("ic", -1, -1), new Among("abil", -1, -1), + new Among("os", -1, -1), new Among("iv", -1, 1) + ], + a_5 = [ + new Among("ic", -1, 1), new Among("abil", -1, 1), + new Among("iv", -1, 1) + ], + a_6 = [new Among("ica", -1, 1), + new Among("logia", -1, 3), new Among("osa", -1, 1), + new Among("ista", -1, 1), new Among("iva", -1, 9), + new Among("anza", -1, 1), new Among("enza", -1, 5), + new Among("ice", -1, 1), new Among("atrice", 7, 1), + new Among("iche", -1, 1), new Among("logie", -1, 3), + new Among("abile", -1, 1), new Among("ibile", -1, 1), + new Among("usione", -1, 4), new Among("azione", -1, 2), + new Among("uzione", -1, 4), new Among("atore", -1, 2), + new Among("ose", -1, 1), new Among("ante", -1, 1), + new Among("mente", -1, 1), new Among("amente", 19, 7), + new Among("iste", -1, 1), new Among("ive", -1, 9), + new Among("anze", -1, 1), new Among("enze", -1, 5), + new Among("ici", -1, 1), new Among("atrici", 25, 1), + new Among("ichi", -1, 1), new Among("abili", -1, 1), + new Among("ibili", -1, 1), new Among("ismi", -1, 1), + new Among("usioni", -1, 4), new Among("azioni", -1, 2), + new Among("uzioni", -1, 4), new Among("atori", -1, 2), + new Among("osi", -1, 1), new Among("anti", -1, 1), + new Among("amenti", -1, 6), new Among("imenti", -1, 6), + new Among("isti", -1, 1), new Among("ivi", -1, 9), + new Among("ico", -1, 1), new Among("ismo", -1, 1), + new Among("oso", -1, 1), new Among("amento", -1, 6), + new Among("imento", -1, 6), new Among("ivo", -1, 9), + new Among("it\u00E0", -1, 8), new Among("ist\u00E0", -1, 1), + new Among("ist\u00E8", -1, 1), new Among("ist\u00EC", -1, 1) + ], + a_7 = [ + new Among("isca", -1, 1), new Among("enda", -1, 1), + new Among("ata", -1, 1), new Among("ita", -1, 1), + new Among("uta", -1, 1), new Among("ava", -1, 1), + new Among("eva", -1, 1), new Among("iva", -1, 1), + new Among("erebbe", -1, 1), new Among("irebbe", -1, 1), + new Among("isce", -1, 1), new Among("ende", -1, 1), + new Among("are", -1, 1), new Among("ere", -1, 1), + new Among("ire", -1, 1), new Among("asse", -1, 1), + new Among("ate", -1, 1), new Among("avate", 16, 1), + new Among("evate", 16, 1), new Among("ivate", 16, 1), + new Among("ete", -1, 1), new Among("erete", 20, 1), + new Among("irete", 20, 1), new Among("ite", -1, 1), + new Among("ereste", -1, 1), new Among("ireste", -1, 1), + new Among("ute", -1, 1), new Among("erai", -1, 1), + new Among("irai", -1, 1), new Among("isci", -1, 1), + new Among("endi", -1, 1), new Among("erei", -1, 1), + new Among("irei", -1, 1), new Among("assi", -1, 1), + new Among("ati", -1, 1), new Among("iti", -1, 1), + new Among("eresti", -1, 1), new Among("iresti", -1, 1), + new Among("uti", -1, 1), new Among("avi", -1, 1), + new Among("evi", -1, 1), new Among("ivi", -1, 1), + new Among("isco", -1, 1), new Among("ando", -1, 1), + new Among("endo", -1, 1), new Among("Yamo", -1, 1), + new Among("iamo", -1, 1), new Among("avamo", -1, 1), + new Among("evamo", -1, 1), new Among("ivamo", -1, 1), + new Among("eremo", -1, 1), new Among("iremo", -1, 1), + new Among("assimo", -1, 1), new Among("ammo", -1, 1), + new Among("emmo", -1, 1), new Among("eremmo", 54, 1), + new Among("iremmo", 54, 1), new Among("immo", -1, 1), + new Among("ano", -1, 1), new Among("iscano", 58, 1), + new Among("avano", 58, 1), new Among("evano", 58, 1), + new Among("ivano", 58, 1), new Among("eranno", -1, 1), + new Among("iranno", -1, 1), new Among("ono", -1, 1), + new Among("iscono", 65, 1), new Among("arono", 65, 1), + new Among("erono", 65, 1), new Among("irono", 65, 1), + new Among("erebbero", -1, 1), new Among("irebbero", -1, 1), + new Among("assero", -1, 1), new Among("essero", -1, 1), + new Among("issero", -1, 1), new Among("ato", -1, 1), + new Among("ito", -1, 1), new Among("uto", -1, 1), + new Among("avo", -1, 1), new Among("evo", -1, 1), + new Among("ivo", -1, 1), new Among("ar", -1, 1), + new Among("ir", -1, 1), new Among("er\u00E0", -1, 1), + new Among("ir\u00E0", -1, 1), new Among("er\u00F2", -1, 1), + new Among("ir\u00F2", -1, 1) + ], + g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 128, 128, 8, 2, 1 + ], + g_AEIO = [17, 65, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2 + ], + g_CG = [17], + I_p2, I_p1, I_pV, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function habr1(c1, c2, v_1) { + if (sbp.eq_s(1, c1)) { + sbp.ket = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 249)) { + sbp.slice_from(c2); + sbp.cursor = v_1; + return true; + } + } + return false; + } + + function r_prelude() { + var among_var, v_1 = sbp.cursor, + v_2, v_3, v_4; + while (true) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among(a_0, 7); + if (among_var) { + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("\u00E0"); + continue; + case 2: + sbp.slice_from("\u00E8"); + continue; + case 3: + sbp.slice_from("\u00EC"); + continue; + case 4: + sbp.slice_from("\u00F2"); + continue; + case 5: + sbp.slice_from("\u00F9"); + continue; + case 6: + sbp.slice_from("qU"); + continue; + case 7: + if (sbp.cursor >= sbp.limit) + break; + sbp.cursor++; + continue; + } + } + break; + } + sbp.cursor = v_1; + while (true) { + v_2 = sbp.cursor; + while (true) { + v_3 = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 249)) { + sbp.bra = sbp.cursor; + v_4 = sbp.cursor; + if (habr1("u", "U", v_3)) + break; + sbp.cursor = v_4; + if (habr1("i", "I", v_3)) + break; + } + sbp.cursor = v_3; + if (sbp.cursor >= sbp.limit) { + sbp.cursor = v_2; + return; + } + sbp.cursor++; + } + } + } + + function habr2(v_1) { + sbp.cursor = v_1; + if (!sbp.in_grouping(g_v, 97, 249)) + return false; + while (!sbp.out_grouping(g_v, 97, 249)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + return true; + } + + function habr3() { + if (sbp.in_grouping(g_v, 97, 249)) { + var v_1 = sbp.cursor; + if (sbp.out_grouping(g_v, 97, 249)) { + while (!sbp.in_grouping(g_v, 97, 249)) { + if (sbp.cursor >= sbp.limit) + return habr2(v_1); + sbp.cursor++; + } + return true; + } + return habr2(v_1); + } + return false; + } + + function habr4() { + var v_1 = sbp.cursor, + v_2; + if (!habr3()) { + sbp.cursor = v_1; + if (!sbp.out_grouping(g_v, 97, 249)) + return; + v_2 = sbp.cursor; + if (sbp.out_grouping(g_v, 97, 249)) { + while (!sbp.in_grouping(g_v, 97, 249)) { + if (sbp.cursor >= sbp.limit) { + sbp.cursor = v_2; + if (sbp.in_grouping(g_v, 97, 249) && sbp.cursor < sbp.limit) + sbp.cursor++; + return; + } + sbp.cursor++; + } + I_pV = sbp.cursor; + return; + } + sbp.cursor = v_2; + if (!sbp.in_grouping(g_v, 97, 249) || sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + } + I_pV = sbp.cursor; + } + + function habr5() { + while (!sbp.in_grouping(g_v, 97, 249)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 249)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + return true; + } + + function r_mark_regions() { + var v_1 = sbp.cursor; + I_pV = sbp.limit; + I_p1 = I_pV; + I_p2 = I_pV; + habr4(); + sbp.cursor = v_1; + if (habr5()) { + I_p1 = sbp.cursor; + if (habr5()) + I_p2 = sbp.cursor; + } + } + + function r_postlude() { + var among_var; + while (true) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among(a_1, 3); + if (!among_var) + break; + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("i"); + break; + case 2: + sbp.slice_from("u"); + break; + case 3: + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + break; + } + } + } + + function r_RV() { + return I_pV <= sbp.cursor; + } + + function r_R1() { + return I_p1 <= sbp.cursor; + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function r_attached_pronoun() { + var among_var; + sbp.ket = sbp.cursor; + if (sbp.find_among_b(a_2, 37)) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among_b(a_3, 5); + if (among_var && r_RV()) { + switch (among_var) { + case 1: + sbp.slice_del(); + break; + case 2: + sbp.slice_from("e"); + break; + } + } + } + } + + function r_standard_suffix() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_6, 51); + if (!among_var) + return false; + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + return false; + sbp.slice_del(); + break; + case 2: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "ic")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + } + break; + case 3: + if (!r_R2()) + return false; + sbp.slice_from("log"); + break; + case 4: + if (!r_R2()) + return false; + sbp.slice_from("u"); + break; + case 5: + if (!r_R2()) + return false; + sbp.slice_from("ente"); + break; + case 6: + if (!r_RV()) + return false; + sbp.slice_del(); + break; + case 7: + if (!r_R1()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_4, 4); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R2()) { + sbp.slice_del(); + if (among_var == 1) { + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "at")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + } + } + } + } + break; + case 8: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_5, 3); + if (among_var) { + sbp.bra = sbp.cursor; + if (among_var == 1) + if (r_R2()) + sbp.slice_del(); + } + break; + case 9: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "at")) { + sbp.bra = sbp.cursor; + if (r_R2()) { + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "ic")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + } + } + } + break; + } + return true; + } + + function r_verb_suffix() { + var among_var, v_1; + if (sbp.cursor >= I_pV) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_7, 87); + if (among_var) { + sbp.bra = sbp.cursor; + if (among_var == 1) + sbp.slice_del(); + } + sbp.limit_backward = v_1; + } + } + + function habr6() { + var v_1 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (sbp.in_grouping_b(g_AEIO, 97, 242)) { + sbp.bra = sbp.cursor; + if (r_RV()) { + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "i")) { + sbp.bra = sbp.cursor; + if (r_RV()) { + sbp.slice_del(); + return; + } + } + } + } + sbp.cursor = sbp.limit - v_1; + } + + function r_vowel_suffix() { + habr6(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "h")) { + sbp.bra = sbp.cursor; + if (sbp.in_grouping_b(g_CG, 99, 103)) + if (r_RV()) + sbp.slice_del(); + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_prelude(); + sbp.cursor = v_1; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_attached_pronoun(); + sbp.cursor = sbp.limit; + if (!r_standard_suffix()) { + sbp.cursor = sbp.limit; + r_verb_suffix(); + } + sbp.cursor = sbp.limit; + r_vowel_suffix(); + sbp.cursor = sbp.limit_backward; + r_postlude(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.it.stemmer, 'stemmer-it'); + + /* stop word filter function */ + lunr.it.stopWordFilter = function(token) { + if (lunr.it.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.it.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.it.stopWordFilter.stopWords.length = 280; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.it.stopWordFilter.stopWords.elements = ' a abbia abbiamo abbiano abbiate ad agl agli ai al all alla alle allo anche avemmo avendo avesse avessero avessi avessimo aveste avesti avete aveva avevamo avevano avevate avevi avevo avrai avranno avrebbe avrebbero avrei avremmo avremo avreste avresti avrete avrà avrò avuta avute avuti avuto c che chi ci coi col come con contro cui da dagl dagli dai dal dall dalla dalle dallo degl degli dei del dell della delle dello di dov dove e ebbe ebbero ebbi ed era erano eravamo eravate eri ero essendo faccia facciamo facciano facciate faccio facemmo facendo facesse facessero facessi facessimo faceste facesti faceva facevamo facevano facevate facevi facevo fai fanno farai faranno farebbe farebbero farei faremmo faremo fareste faresti farete farà farò fece fecero feci fosse fossero fossi fossimo foste fosti fu fui fummo furono gli ha hai hanno ho i il in io l la le lei li lo loro lui ma mi mia mie miei mio ne negl negli nei nel nell nella nelle nello noi non nostra nostre nostri nostro o per perché più quale quanta quante quanti quanto quella quelle quelli quello questa queste questi questo sarai saranno sarebbe sarebbero sarei saremmo saremo sareste saresti sarete sarà sarò se sei si sia siamo siano siate siete sono sta stai stando stanno starai staranno starebbe starebbero starei staremmo staremo stareste staresti starete starà starò stava stavamo stavano stavate stavi stavo stemmo stesse stessero stessi stessimo steste stesti stette stettero stetti stia stiamo stiano stiate sto su sua sue sugl sugli sui sul sull sulla sulle sullo suo suoi ti tra tu tua tue tuo tuoi tutti tutto un una uno vi voi vostra vostre vostri vostro è'.split(' '); + + lunr.Pipeline.registerFunction(lunr.it.stopWordFilter, 'stopWordFilter-it'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.it.min.js b/themes/tabi-lean/static/js/lunr/lunr.it.min.js new file mode 100644 index 0000000..36b30b5 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.it.min.js @@ -0,0 +1 @@ +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,i,n;r.it=function(){this.pipeline.reset(),this.pipeline.add(r.it.trimmer,r.it.stopWordFilter,r.it.stemmer)},r.it.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.it.trimmer=r.trimmerSupport.generateTrimmer(r.it.wordCharacters),r.Pipeline.registerFunction(r.it.trimmer,"trimmer-it"),r.it.stemmer=(e=r.stemmerSupport.Among,i=r.stemmerSupport.SnowballProgram,n=new function(){var n,o,s,t=[new e("",-1,7),new e("qu",0,6),new e("á",0,1),new e("é",0,2),new e("í",0,3),new e("ó",0,4),new e("ú",0,5)],a=[new e("",-1,3),new e("I",0,1),new e("U",0,2)],u=[new e("la",-1,-1),new e("cela",0,-1),new e("gliela",0,-1),new e("mela",0,-1),new e("tela",0,-1),new e("vela",0,-1),new e("le",-1,-1),new e("cele",6,-1),new e("gliele",6,-1),new e("mele",6,-1),new e("tele",6,-1),new e("vele",6,-1),new e("ne",-1,-1),new e("cene",12,-1),new e("gliene",12,-1),new e("mene",12,-1),new e("sene",12,-1),new e("tene",12,-1),new e("vene",12,-1),new e("ci",-1,-1),new e("li",-1,-1),new e("celi",20,-1),new e("glieli",20,-1),new e("meli",20,-1),new e("teli",20,-1),new e("veli",20,-1),new e("gli",20,-1),new e("mi",-1,-1),new e("si",-1,-1),new e("ti",-1,-1),new e("vi",-1,-1),new e("lo",-1,-1),new e("celo",31,-1),new e("glielo",31,-1),new e("melo",31,-1),new e("telo",31,-1),new e("velo",31,-1)],c=[new e("ando",-1,1),new e("endo",-1,1),new e("ar",-1,2),new e("er",-1,2),new e("ir",-1,2)],w=[new e("ic",-1,-1),new e("abil",-1,-1),new e("os",-1,-1),new e("iv",-1,1)],l=[new e("ic",-1,1),new e("abil",-1,1),new e("iv",-1,1)],m=[new e("ica",-1,1),new e("logia",-1,3),new e("osa",-1,1),new e("ista",-1,1),new e("iva",-1,9),new e("anza",-1,1),new e("enza",-1,5),new e("ice",-1,1),new e("atrice",7,1),new e("iche",-1,1),new e("logie",-1,3),new e("abile",-1,1),new e("ibile",-1,1),new e("usione",-1,4),new e("azione",-1,2),new e("uzione",-1,4),new e("atore",-1,2),new e("ose",-1,1),new e("ante",-1,1),new e("mente",-1,1),new e("amente",19,7),new e("iste",-1,1),new e("ive",-1,9),new e("anze",-1,1),new e("enze",-1,5),new e("ici",-1,1),new e("atrici",25,1),new e("ichi",-1,1),new e("abili",-1,1),new e("ibili",-1,1),new e("ismi",-1,1),new e("usioni",-1,4),new e("azioni",-1,2),new e("uzioni",-1,4),new e("atori",-1,2),new e("osi",-1,1),new e("anti",-1,1),new e("amenti",-1,6),new e("imenti",-1,6),new e("isti",-1,1),new e("ivi",-1,9),new e("ico",-1,1),new e("ismo",-1,1),new e("oso",-1,1),new e("amento",-1,6),new e("imento",-1,6),new e("ivo",-1,9),new e("ità",-1,8),new e("istà",-1,1),new e("istè",-1,1),new e("istì",-1,1)],f=[new e("isca",-1,1),new e("enda",-1,1),new e("ata",-1,1),new e("ita",-1,1),new e("uta",-1,1),new e("ava",-1,1),new e("eva",-1,1),new e("iva",-1,1),new e("erebbe",-1,1),new e("irebbe",-1,1),new e("isce",-1,1),new e("ende",-1,1),new e("are",-1,1),new e("ere",-1,1),new e("ire",-1,1),new e("asse",-1,1),new e("ate",-1,1),new e("avate",16,1),new e("evate",16,1),new e("ivate",16,1),new e("ete",-1,1),new e("erete",20,1),new e("irete",20,1),new e("ite",-1,1),new e("ereste",-1,1),new e("ireste",-1,1),new e("ute",-1,1),new e("erai",-1,1),new e("irai",-1,1),new e("isci",-1,1),new e("endi",-1,1),new e("erei",-1,1),new e("irei",-1,1),new e("assi",-1,1),new e("ati",-1,1),new e("iti",-1,1),new e("eresti",-1,1),new e("iresti",-1,1),new e("uti",-1,1),new e("avi",-1,1),new e("evi",-1,1),new e("ivi",-1,1),new e("isco",-1,1),new e("ando",-1,1),new e("endo",-1,1),new e("Yamo",-1,1),new e("iamo",-1,1),new e("avamo",-1,1),new e("evamo",-1,1),new e("ivamo",-1,1),new e("eremo",-1,1),new e("iremo",-1,1),new e("assimo",-1,1),new e("ammo",-1,1),new e("emmo",-1,1),new e("eremmo",54,1),new e("iremmo",54,1),new e("immo",-1,1),new e("ano",-1,1),new e("iscano",58,1),new e("avano",58,1),new e("evano",58,1),new e("ivano",58,1),new e("eranno",-1,1),new e("iranno",-1,1),new e("ono",-1,1),new e("iscono",65,1),new e("arono",65,1),new e("erono",65,1),new e("irono",65,1),new e("erebbero",-1,1),new e("irebbero",-1,1),new e("assero",-1,1),new e("essero",-1,1),new e("issero",-1,1),new e("ato",-1,1),new e("ito",-1,1),new e("uto",-1,1),new e("avo",-1,1),new e("evo",-1,1),new e("ivo",-1,1),new e("ar",-1,1),new e("ir",-1,1),new e("erà",-1,1),new e("irà",-1,1),new e("erò",-1,1),new e("irò",-1,1)],v=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,128,128,8,2,1],b=[17,65,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,8,2],d=[17],_=new i;function g(e,r,i){return _.eq_s(1,e)&&(_.ket=_.cursor,_.in_grouping(v,97,249))&&(_.slice_from(r),_.cursor=i,1)}function p(e){if(_.cursor=e,!_.in_grouping(v,97,249))return!1;for(;!_.out_grouping(v,97,249);){if(_.cursor>=_.limit)return!1;_.cursor++}return!0}function k(){for(;!_.in_grouping(v,97,249);){if(_.cursor>=_.limit)return;_.cursor++}for(;!_.out_grouping(v,97,249);){if(_.cursor>=_.limit)return;_.cursor++}return 1}function h(){return s<=_.cursor}function q(){return n<=_.cursor}this.setCurrent=function(e){_.setCurrent(e)},this.getCurrent=function(){return _.getCurrent()},this.stem=function(){var e,r,i=_.cursor;if(function(){for(var e,r,i,n,o=_.cursor;;){if(_.bra=_.cursor,e=_.find_among(t,7))switch(_.ket=_.cursor,e){case 1:_.slice_from("à");continue;case 2:_.slice_from("è");continue;case 3:_.slice_from("ì");continue;case 4:_.slice_from("ò");continue;case 5:_.slice_from("ù");continue;case 6:_.slice_from("qU");continue;case 7:if(!(_.cursor>=_.limit)){_.cursor++;continue}}break}for(_.cursor=o;;)for(r=_.cursor;;){if(i=_.cursor,_.in_grouping(v,97,249)){if(_.bra=_.cursor,n=_.cursor,g("u","U",i))break;if(_.cursor=n,g("i","I",i))break}if(_.cursor=i,_.cursor>=_.limit)return _.cursor=r;_.cursor++}}(),_.cursor=i,e=_.cursor,s=_.limit,n=o=s,function(){var e,r=_.cursor;if(!function(){if(_.in_grouping(v,97,249)){var e=_.cursor;if(_.out_grouping(v,97,249)){for(;!_.in_grouping(v,97,249);){if(_.cursor>=_.limit)return p(e);_.cursor++}return 1}return p(e)}}()){if(_.cursor=r,!_.out_grouping(v,97,249))return;if(e=_.cursor,_.out_grouping(v,97,249)){for(;!_.in_grouping(v,97,249);){if(_.cursor>=_.limit)return _.cursor=e,_.in_grouping(v,97,249)&&_.cursor<_.limit&&_.cursor++;_.cursor++}return s=_.cursor}if(_.cursor=e,!_.in_grouping(v,97,249)||_.cursor>=_.limit)return;_.cursor++}s=_.cursor}(),_.cursor=e,k()&&(o=_.cursor,k())&&(n=_.cursor),_.limit_backward=i,_.cursor=_.limit,_.ket=_.cursor,_.find_among_b(u,37)&&(_.bra=_.cursor,r=_.find_among_b(c,5))&&h())switch(r){case 1:_.slice_del();break;case 2:_.slice_from("e")}return _.cursor=_.limit,function(){var e;if(_.ket=_.cursor,e=_.find_among_b(m,51)){switch(_.bra=_.cursor,e){case 1:if(!q())return;_.slice_del();break;case 2:if(!q())return;_.slice_del(),_.ket=_.cursor,_.eq_s_b(2,"ic")&&(_.bra=_.cursor,q())&&_.slice_del();break;case 3:if(!q())return;_.slice_from("log");break;case 4:if(!q())return;_.slice_from("u");break;case 5:if(!q())return;_.slice_from("ente");break;case 6:if(!h())return;_.slice_del();break;case 7:if(!(o<=_.cursor))return;_.slice_del(),_.ket=_.cursor,(e=_.find_among_b(w,4))&&(_.bra=_.cursor,q())&&(_.slice_del(),1==e)&&(_.ket=_.cursor,_.eq_s_b(2,"at"))&&(_.bra=_.cursor,q())&&_.slice_del();break;case 8:if(!q())return;_.slice_del(),_.ket=_.cursor,(e=_.find_among_b(l,3))&&(_.bra=_.cursor,1==e)&&q()&&_.slice_del();break;case 9:if(!q())return;_.slice_del(),_.ket=_.cursor,_.eq_s_b(2,"at")&&(_.bra=_.cursor,q())&&(_.slice_del(),_.ket=_.cursor,_.eq_s_b(2,"ic"))&&(_.bra=_.cursor,q())&&_.slice_del()}return 1}}()||(_.cursor=_.limit,_.cursor>=s&&(e=_.limit_backward,_.limit_backward=s,_.ket=_.cursor,(i=_.find_among_b(f,87))&&(_.bra=_.cursor,1==i)&&_.slice_del(),_.limit_backward=e)),_.cursor=_.limit,r=_.limit-_.cursor,_.ket=_.cursor,_.in_grouping_b(b,97,242)&&(_.bra=_.cursor,h())&&(_.slice_del(),_.ket=_.cursor,_.eq_s_b(1,"i"))&&(_.bra=_.cursor,h())?_.slice_del():_.cursor=_.limit-r,_.ket=_.cursor,_.eq_s_b(1,"h")&&(_.bra=_.cursor,_.in_grouping_b(d,99,103))&&h()&&_.slice_del(),_.cursor=_.limit_backward,function(){for(var e;_.bra=_.cursor,e=_.find_among(a,3);)switch(_.ket=_.cursor,e){case 1:_.slice_from("i");break;case 2:_.slice_from("u");break;case 3:if(_.cursor>=_.limit)return;_.cursor++}}(),!0}},function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}),r.Pipeline.registerFunction(r.it.stemmer,"stemmer-it"),r.it.stopWordFilter=function(e){if(-1===r.it.stopWordFilter.stopWords.indexOf(e))return e},r.it.stopWordFilter.stopWords=new r.SortedSet,r.it.stopWordFilter.stopWords.length=280,r.it.stopWordFilter.stopWords.elements=" a abbia abbiamo abbiano abbiate ad agl agli ai al all alla alle allo anche avemmo avendo avesse avessero avessi avessimo aveste avesti avete aveva avevamo avevano avevate avevi avevo avrai avranno avrebbe avrebbero avrei avremmo avremo avreste avresti avrete avrà avrò avuta avute avuti avuto c che chi ci coi col come con contro cui da dagl dagli dai dal dall dalla dalle dallo degl degli dei del dell della delle dello di dov dove e ebbe ebbero ebbi ed era erano eravamo eravate eri ero essendo faccia facciamo facciano facciate faccio facemmo facendo facesse facessero facessi facessimo faceste facesti faceva facevamo facevano facevate facevi facevo fai fanno farai faranno farebbe farebbero farei faremmo faremo fareste faresti farete farà farò fece fecero feci fosse fossero fossi fossimo foste fosti fu fui fummo furono gli ha hai hanno ho i il in io l la le lei li lo loro lui ma mi mia mie miei mio ne negl negli nei nel nell nella nelle nello noi non nostra nostre nostri nostro o per perché più quale quanta quante quanti quanto quella quelle quelli quello questa queste questi questo sarai saranno sarebbe sarebbero sarei saremmo saremo sareste saresti sarete sarà sarò se sei si sia siamo siano siate siete sono sta stai stando stanno starai staranno starebbe starebbero starei staremmo staremo stareste staresti starete starà starò stava stavamo stavano stavate stavi stavo stemmo stesse stessero stessi stessimo steste stesti stette stettero stetti stia stiamo stiano stiate sto su sua sue sugl sugli sui sul sull sulla sulle sullo suo suoi ti tra tu tua tue tuo tuoi tutti tutto un una uno vi voi vostra vostre vostri vostro è".split(" "),r.Pipeline.registerFunction(r.it.stopWordFilter,"stopWordFilter-it")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.jp.js b/themes/tabi-lean/static/js/lunr/lunr.jp.js new file mode 100644 index 0000000..90a7629 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.jp.js @@ -0,0 +1,120 @@ +/*! + * Lunr languages, `Japanese` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Chad Liu + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.jp = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.jp.stopWordFilter, + lunr.jp.stemmer + ); + // change the tokenizer for japanese one + lunr.tokenizer = lunr.jp.tokenizer; + }; + var segmenter = new TinySegmenter(); // インスタンス生成 + + lunr.jp.tokenizer = function (obj) { + if (!arguments.length || obj == null || obj == undefined) return []; + if (Array.isArray(obj)) + return obj.map(function (t) { + return t.toLowerCase(); + }); + + var str = obj.toString().replace(/^\s+/, ''); + + for (var i = str.length - 1; i >= 0; i--) { + if (/\S/.test(str.charAt(i))) { + str = str.substring(0, i + 1); + break; + } + } + + var segs = segmenter.segment(str); // 単語の配列が返る + return segs + .filter(function (token) { + return !!token; + }) + .map(function (token) { + return token; + }); + }; + + /* lunr stemmer function */ + lunr.jp.stemmer = (function () { + /* TODO japanese stemmer */ + return function (word) { + return word; + }; + })(); + + lunr.Pipeline.registerFunction(lunr.jp.stemmer, 'stemmer-jp'); + + /* stop word filter function */ + lunr.jp.stopWordFilter = function(token) { + if (lunr.jp.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.jp.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.jp.stopWordFilter.stopWords.length = 45; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + // stopword for japanese is from http://www.ranks.nl/stopwords/japanese + lunr.jp.stopWordFilter.stopWords.elements = ' これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし'.split(' '); + lunr.Pipeline.registerFunction(lunr.jp.stopWordFilter, 'stopWordFilter-jp'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.jp.min.js b/themes/tabi-lean/static/js/lunr/lunr.jp.min.js new file mode 100644 index 0000000..a978f34 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.jp.min.js @@ -0,0 +1 @@ +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");r.jp=function(){this.pipeline.reset(),this.pipeline.add(r.jp.stopWordFilter,r.jp.stemmer),r.tokenizer=r.jp.tokenizer};var n=new TinySegmenter;r.jp.tokenizer=function(e){if(!arguments.length||null==e)return[];if(Array.isArray(e))return e.map(function(e){return e.toLowerCase()});for(var r=e.toString().replace(/^\s+/,""),t=r.length-1;0<=t;t--)if(/\S/.test(r.charAt(t))){r=r.substring(0,t+1);break}return n.segment(r).filter(function(e){return!!e}).map(function(e){return e})},r.jp.stemmer=function(e){return e},r.Pipeline.registerFunction(r.jp.stemmer,"stemmer-jp"),r.jp.stopWordFilter=function(e){if(-1===r.jp.stopWordFilter.stopWords.indexOf(e))return e},r.jp.stopWordFilter.stopWords=new r.SortedSet,r.jp.stopWordFilter.stopWords.length=45,r.jp.stopWordFilter.stopWords.elements=" これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" "),r.Pipeline.registerFunction(r.jp.stopWordFilter,"stopWordFilter-jp")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.no.js b/themes/tabi-lean/static/js/lunr/lunr.no.js new file mode 100644 index 0000000..5917006 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.no.js @@ -0,0 +1,253 @@ +/*! + * Lunr languages, `Norwegian` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.no = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.no.trimmer, + lunr.no.stopWordFilter, + lunr.no.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.no.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.no.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.no.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.no.trimmer, 'trimmer-no'); + + /* lunr stemmer function */ + lunr.no.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function NorwegianStemmer() { + var a_0 = [new Among("a", -1, 1), new Among("e", -1, 1), + new Among("ede", 1, 1), new Among("ande", 1, 1), + new Among("ende", 1, 1), new Among("ane", 1, 1), + new Among("ene", 1, 1), new Among("hetene", 6, 1), + new Among("erte", 1, 3), new Among("en", -1, 1), + new Among("heten", 9, 1), new Among("ar", -1, 1), + new Among("er", -1, 1), new Among("heter", 12, 1), + new Among("s", -1, 2), new Among("as", 14, 1), + new Among("es", 14, 1), new Among("edes", 16, 1), + new Among("endes", 16, 1), new Among("enes", 16, 1), + new Among("hetenes", 19, 1), new Among("ens", 14, 1), + new Among("hetens", 21, 1), new Among("ers", 14, 1), + new Among("ets", 14, 1), new Among("et", -1, 1), + new Among("het", 25, 1), new Among("ert", -1, 3), + new Among("ast", -1, 1) + ], + a_1 = [new Among("dt", -1, -1), + new Among("vt", -1, -1) + ], + a_2 = [new Among("leg", -1, 1), + new Among("eleg", 0, 1), new Among("ig", -1, 1), + new Among("eig", 2, 1), new Among("lig", 2, 1), + new Among("elig", 4, 1), new Among("els", -1, 1), + new Among("lov", -1, 1), new Among("elov", 7, 1), + new Among("slov", 7, 1), new Among("hetslov", 9, 1) + ], + g_v = [17, + 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 + ], + g_s_ending = [ + 119, 125, 149, 1 + ], + I_x, I_p1, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function r_mark_regions() { + var v_1, c = sbp.cursor + 3; + I_p1 = sbp.limit; + if (0 <= c || c <= sbp.limit) { + I_x = c; + while (true) { + v_1 = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 248)) { + sbp.cursor = v_1; + break; + } + if (v_1 >= sbp.limit) + return; + sbp.cursor = v_1 + 1; + } + while (!sbp.out_grouping(g_v, 97, 248)) { + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + } + I_p1 = sbp.cursor; + if (I_p1 < I_x) + I_p1 = I_x; + } + } + + function r_main_suffix() { + var among_var, v_1, v_2; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_0, 29); + sbp.limit_backward = v_1; + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_del(); + break; + case 2: + v_2 = sbp.limit - sbp.cursor; + if (sbp.in_grouping_b(g_s_ending, 98, 122)) + sbp.slice_del(); + else { + sbp.cursor = sbp.limit - v_2; + if (sbp.eq_s_b(1, "k") && sbp.out_grouping_b(g_v, 97, 248)) + sbp.slice_del(); + } + break; + case 3: + sbp.slice_from("er"); + break; + } + } + } + } + + function r_consonant_pair() { + var v_1 = sbp.limit - sbp.cursor, + v_2; + if (sbp.cursor >= I_p1) { + v_2 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + if (sbp.find_among_b(a_1, 2)) { + sbp.bra = sbp.cursor; + sbp.limit_backward = v_2; + sbp.cursor = sbp.limit - v_1; + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + sbp.bra = sbp.cursor; + sbp.slice_del(); + } + } else + sbp.limit_backward = v_2; + } + } + + function r_other_suffix() { + var among_var, v_1; + if (sbp.cursor >= I_p1) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_2, 11); + if (among_var) { + sbp.bra = sbp.cursor; + sbp.limit_backward = v_1; + if (among_var == 1) + sbp.slice_del(); + } else + sbp.limit_backward = v_1; + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_main_suffix(); + sbp.cursor = sbp.limit; + r_consonant_pair(); + sbp.cursor = sbp.limit; + r_other_suffix(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.no.stemmer, 'stemmer-no'); + + /* stop word filter function */ + lunr.no.stopWordFilter = function(token) { + if (lunr.no.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.no.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.no.stopWordFilter.stopWords.length = 177; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.no.stopWordFilter.stopWords.elements = ' alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å'.split(' '); + + lunr.Pipeline.registerFunction(lunr.no.stopWordFilter, 'stopWordFilter-no'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.no.min.js b/themes/tabi-lean/static/js/lunr/lunr.no.min.js new file mode 100644 index 0000000..f809a60 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.no.min.js @@ -0,0 +1 @@ +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,n,i;r.no=function(){this.pipeline.reset(),this.pipeline.add(r.no.trimmer,r.no.stopWordFilter,r.no.stemmer)},r.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.no.trimmer=r.trimmerSupport.generateTrimmer(r.no.wordCharacters),r.Pipeline.registerFunction(r.no.trimmer,"trimmer-no"),r.no.stemmer=(e=r.stemmerSupport.Among,n=r.stemmerSupport.SnowballProgram,i=new function(){var i,t,o=[new e("a",-1,1),new e("e",-1,1),new e("ede",1,1),new e("ande",1,1),new e("ende",1,1),new e("ane",1,1),new e("ene",1,1),new e("hetene",6,1),new e("erte",1,3),new e("en",-1,1),new e("heten",9,1),new e("ar",-1,1),new e("er",-1,1),new e("heter",12,1),new e("s",-1,2),new e("as",14,1),new e("es",14,1),new e("edes",16,1),new e("endes",16,1),new e("enes",16,1),new e("hetenes",19,1),new e("ens",14,1),new e("hetens",21,1),new e("ers",14,1),new e("ets",14,1),new e("et",-1,1),new e("het",25,1),new e("ert",-1,3),new e("ast",-1,1)],s=[new e("dt",-1,-1),new e("vt",-1,-1)],m=[new e("leg",-1,1),new e("eleg",0,1),new e("ig",-1,1),new e("eig",2,1),new e("lig",2,1),new e("elig",4,1),new e("els",-1,1),new e("lov",-1,1),new e("elov",7,1),new e("slov",7,1),new e("hetslov",9,1)],a=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],l=[119,125,149,1],d=new n;this.setCurrent=function(e){d.setCurrent(e)},this.getCurrent=function(){return d.getCurrent()},this.stem=function(){var e,r,n=d.cursor;if(function(){var e,r=d.cursor+3;if(t=d.limit,0<=r||r<=d.limit){for(i=r;;){if(e=d.cursor,d.in_grouping(a,97,248)){d.cursor=e;break}if(e>=d.limit)return;d.cursor=e+1}for(;!d.out_grouping(a,97,248);){if(d.cursor>=d.limit)return;d.cursor++}(t=d.cursor)<i&&(t=i)}}(),d.limit_backward=n,d.cursor=d.limit,d.cursor>=t&&(n=d.limit_backward,d.limit_backward=t,d.ket=d.cursor,r=d.find_among_b(o,29),d.limit_backward=n,r))switch(d.bra=d.cursor,r){case 1:d.slice_del();break;case 2:e=d.limit-d.cursor,(d.in_grouping_b(l,98,122)||(d.cursor=d.limit-e,d.eq_s_b(1,"k")&&d.out_grouping_b(a,97,248)))&&d.slice_del();break;case 3:d.slice_from("er")}return d.cursor=d.limit,n=d.limit-d.cursor,d.cursor>=t&&(r=d.limit_backward,d.limit_backward=t,d.ket=d.cursor,d.find_among_b(s,2)?(d.bra=d.cursor,d.limit_backward=r,d.cursor=d.limit-n,d.cursor>d.limit_backward&&(d.cursor--,d.bra=d.cursor,d.slice_del())):d.limit_backward=r),d.cursor=d.limit,d.cursor>=t&&(n=d.limit_backward,d.limit_backward=t,d.ket=d.cursor,(r=d.find_among_b(m,11))?(d.bra=d.cursor,d.limit_backward=n,1==r&&d.slice_del()):d.limit_backward=n),!0}},function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}),r.Pipeline.registerFunction(r.no.stemmer,"stemmer-no"),r.no.stopWordFilter=function(e){if(-1===r.no.stopWordFilter.stopWords.indexOf(e))return e},r.no.stopWordFilter.stopWords=new r.SortedSet,r.no.stopWordFilter.stopWords.length=177,r.no.stopWordFilter.stopWords.elements=" alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" "),r.Pipeline.registerFunction(r.no.stopWordFilter,"stopWordFilter-no")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.pt.js b/themes/tabi-lean/static/js/lunr/lunr.pt.js new file mode 100644 index 0000000..d960d97 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.pt.js @@ -0,0 +1,566 @@ +/*! + * Lunr languages, `Portuguese` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.pt = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.pt.trimmer, + lunr.pt.stopWordFilter, + lunr.pt.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.pt.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.pt.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.pt.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.pt.trimmer, 'trimmer-pt'); + + /* lunr stemmer function */ + lunr.pt.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function PortugueseStemmer() { + var a_0 = [new Among("", -1, 3), new Among("\u00E3", 0, 1), + new Among("\u00F5", 0, 2) + ], + a_1 = [new Among("", -1, 3), + new Among("a~", 0, 1), new Among("o~", 0, 2) + ], + a_2 = [ + new Among("ic", -1, -1), new Among("ad", -1, -1), + new Among("os", -1, -1), new Among("iv", -1, 1) + ], + a_3 = [ + new Among("ante", -1, 1), new Among("avel", -1, 1), + new Among("\u00EDvel", -1, 1) + ], + a_4 = [new Among("ic", -1, 1), + new Among("abil", -1, 1), new Among("iv", -1, 1) + ], + a_5 = [ + new Among("ica", -1, 1), new Among("\u00E2ncia", -1, 1), + new Among("\u00EAncia", -1, 4), new Among("ira", -1, 9), + new Among("adora", -1, 1), new Among("osa", -1, 1), + new Among("ista", -1, 1), new Among("iva", -1, 8), + new Among("eza", -1, 1), new Among("log\u00EDa", -1, 2), + new Among("idade", -1, 7), new Among("ante", -1, 1), + new Among("mente", -1, 6), new Among("amente", 12, 5), + new Among("\u00E1vel", -1, 1), new Among("\u00EDvel", -1, 1), + new Among("uci\u00F3n", -1, 3), new Among("ico", -1, 1), + new Among("ismo", -1, 1), new Among("oso", -1, 1), + new Among("amento", -1, 1), new Among("imento", -1, 1), + new Among("ivo", -1, 8), new Among("a\u00E7a~o", -1, 1), + new Among("ador", -1, 1), new Among("icas", -1, 1), + new Among("\u00EAncias", -1, 4), new Among("iras", -1, 9), + new Among("adoras", -1, 1), new Among("osas", -1, 1), + new Among("istas", -1, 1), new Among("ivas", -1, 8), + new Among("ezas", -1, 1), new Among("log\u00EDas", -1, 2), + new Among("idades", -1, 7), new Among("uciones", -1, 3), + new Among("adores", -1, 1), new Among("antes", -1, 1), + new Among("a\u00E7o~es", -1, 1), new Among("icos", -1, 1), + new Among("ismos", -1, 1), new Among("osos", -1, 1), + new Among("amentos", -1, 1), new Among("imentos", -1, 1), + new Among("ivos", -1, 8) + ], + a_6 = [new Among("ada", -1, 1), + new Among("ida", -1, 1), new Among("ia", -1, 1), + new Among("aria", 2, 1), new Among("eria", 2, 1), + new Among("iria", 2, 1), new Among("ara", -1, 1), + new Among("era", -1, 1), new Among("ira", -1, 1), + new Among("ava", -1, 1), new Among("asse", -1, 1), + new Among("esse", -1, 1), new Among("isse", -1, 1), + new Among("aste", -1, 1), new Among("este", -1, 1), + new Among("iste", -1, 1), new Among("ei", -1, 1), + new Among("arei", 16, 1), new Among("erei", 16, 1), + new Among("irei", 16, 1), new Among("am", -1, 1), + new Among("iam", 20, 1), new Among("ariam", 21, 1), + new Among("eriam", 21, 1), new Among("iriam", 21, 1), + new Among("aram", 20, 1), new Among("eram", 20, 1), + new Among("iram", 20, 1), new Among("avam", 20, 1), + new Among("em", -1, 1), new Among("arem", 29, 1), + new Among("erem", 29, 1), new Among("irem", 29, 1), + new Among("assem", 29, 1), new Among("essem", 29, 1), + new Among("issem", 29, 1), new Among("ado", -1, 1), + new Among("ido", -1, 1), new Among("ando", -1, 1), + new Among("endo", -1, 1), new Among("indo", -1, 1), + new Among("ara~o", -1, 1), new Among("era~o", -1, 1), + new Among("ira~o", -1, 1), new Among("ar", -1, 1), + new Among("er", -1, 1), new Among("ir", -1, 1), + new Among("as", -1, 1), new Among("adas", 47, 1), + new Among("idas", 47, 1), new Among("ias", 47, 1), + new Among("arias", 50, 1), new Among("erias", 50, 1), + new Among("irias", 50, 1), new Among("aras", 47, 1), + new Among("eras", 47, 1), new Among("iras", 47, 1), + new Among("avas", 47, 1), new Among("es", -1, 1), + new Among("ardes", 58, 1), new Among("erdes", 58, 1), + new Among("irdes", 58, 1), new Among("ares", 58, 1), + new Among("eres", 58, 1), new Among("ires", 58, 1), + new Among("asses", 58, 1), new Among("esses", 58, 1), + new Among("isses", 58, 1), new Among("astes", 58, 1), + new Among("estes", 58, 1), new Among("istes", 58, 1), + new Among("is", -1, 1), new Among("ais", 71, 1), + new Among("eis", 71, 1), new Among("areis", 73, 1), + new Among("ereis", 73, 1), new Among("ireis", 73, 1), + new Among("\u00E1reis", 73, 1), new Among("\u00E9reis", 73, 1), + new Among("\u00EDreis", 73, 1), new Among("\u00E1sseis", 73, 1), + new Among("\u00E9sseis", 73, 1), new Among("\u00EDsseis", 73, 1), + new Among("\u00E1veis", 73, 1), new Among("\u00EDeis", 73, 1), + new Among("ar\u00EDeis", 84, 1), new Among("er\u00EDeis", 84, 1), + new Among("ir\u00EDeis", 84, 1), new Among("ados", -1, 1), + new Among("idos", -1, 1), new Among("amos", -1, 1), + new Among("\u00E1ramos", 90, 1), new Among("\u00E9ramos", 90, 1), + new Among("\u00EDramos", 90, 1), new Among("\u00E1vamos", 90, 1), + new Among("\u00EDamos", 90, 1), new Among("ar\u00EDamos", 95, 1), + new Among("er\u00EDamos", 95, 1), new Among("ir\u00EDamos", 95, 1), + new Among("emos", -1, 1), new Among("aremos", 99, 1), + new Among("eremos", 99, 1), new Among("iremos", 99, 1), + new Among("\u00E1ssemos", 99, 1), new Among("\u00EAssemos", 99, 1), + new Among("\u00EDssemos", 99, 1), new Among("imos", -1, 1), + new Among("armos", -1, 1), new Among("ermos", -1, 1), + new Among("irmos", -1, 1), new Among("\u00E1mos", -1, 1), + new Among("ar\u00E1s", -1, 1), new Among("er\u00E1s", -1, 1), + new Among("ir\u00E1s", -1, 1), new Among("eu", -1, 1), + new Among("iu", -1, 1), new Among("ou", -1, 1), + new Among("ar\u00E1", -1, 1), new Among("er\u00E1", -1, 1), + new Among("ir\u00E1", -1, 1) + ], + a_7 = [new Among("a", -1, 1), + new Among("i", -1, 1), new Among("o", -1, 1), + new Among("os", -1, 1), new Among("\u00E1", -1, 1), + new Among("\u00ED", -1, 1), new Among("\u00F3", -1, 1) + ], + a_8 = [ + new Among("e", -1, 1), new Among("\u00E7", -1, 2), + new Among("\u00E9", -1, 1), new Among("\u00EA", -1, 1) + ], + g_v = [17, + 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 19, 12, 2 + ], + I_p2, I_p1, I_pV, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function r_prelude() { + var among_var; + while (true) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among(a_0, 3); + if (among_var) { + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("a~"); + continue; + case 2: + sbp.slice_from("o~"); + continue; + case 3: + if (sbp.cursor >= sbp.limit) + break; + sbp.cursor++; + continue; + } + } + break; + } + } + + function habr2() { + if (sbp.out_grouping(g_v, 97, 250)) { + while (!sbp.in_grouping(g_v, 97, 250)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + return false; + } + return true; + } + + function habr3() { + if (sbp.in_grouping(g_v, 97, 250)) { + while (!sbp.out_grouping(g_v, 97, 250)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + } + I_pV = sbp.cursor; + return true; + } + + function habr4() { + var v_1 = sbp.cursor, + v_2, v_3; + if (sbp.in_grouping(g_v, 97, 250)) { + v_2 = sbp.cursor; + if (habr2()) { + sbp.cursor = v_2; + if (habr3()) + return; + } else + I_pV = sbp.cursor; + } + sbp.cursor = v_1; + if (sbp.out_grouping(g_v, 97, 250)) { + v_3 = sbp.cursor; + if (habr2()) { + sbp.cursor = v_3; + if (!sbp.in_grouping(g_v, 97, 250) || sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + } + I_pV = sbp.cursor; + } + } + + function habr5() { + while (!sbp.in_grouping(g_v, 97, 250)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 250)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + return true; + } + + function r_mark_regions() { + var v_1 = sbp.cursor; + I_pV = sbp.limit; + I_p1 = I_pV; + I_p2 = I_pV; + habr4(); + sbp.cursor = v_1; + if (habr5()) { + I_p1 = sbp.cursor; + if (habr5()) + I_p2 = sbp.cursor; + } + } + + function r_postlude() { + var among_var; + while (true) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among(a_1, 3); + if (among_var) { + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("\u00E3"); + continue; + case 2: + sbp.slice_from("\u00F5"); + continue; + case 3: + if (sbp.cursor >= sbp.limit) + break; + sbp.cursor++; + continue; + } + } + break; + } + } + + function r_RV() { + return I_pV <= sbp.cursor; + } + + function r_R1() { + return I_p1 <= sbp.cursor; + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function r_standard_suffix() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_5, 45); + if (!among_var) + return false; + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + return false; + sbp.slice_del(); + break; + case 2: + if (!r_R2()) + return false; + sbp.slice_from("log"); + break; + case 3: + if (!r_R2()) + return false; + sbp.slice_from("u"); + break; + case 4: + if (!r_R2()) + return false; + sbp.slice_from("ente"); + break; + case 5: + if (!r_R1()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_2, 4); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R2()) { + sbp.slice_del(); + if (among_var == 1) { + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "at")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + } + } + } + } + break; + case 6: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_3, 3); + if (among_var) { + sbp.bra = sbp.cursor; + if (among_var == 1) + if (r_R2()) + sbp.slice_del(); + } + break; + case 7: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_4, 3); + if (among_var) { + sbp.bra = sbp.cursor; + if (among_var == 1) + if (r_R2()) + sbp.slice_del(); + } + break; + case 8: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "at")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + } + break; + case 9: + if (!r_RV() || !sbp.eq_s_b(1, "e")) + return false; + sbp.slice_from("ir"); + break; + } + return true; + } + + function r_verb_suffix() { + var among_var, v_1; + if (sbp.cursor >= I_pV) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_6, 120); + if (among_var) { + sbp.bra = sbp.cursor; + if (among_var == 1) + sbp.slice_del(); + sbp.limit_backward = v_1; + return true; + } + sbp.limit_backward = v_1; + } + return false; + } + + function r_residual_suffix() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_7, 7); + if (among_var) { + sbp.bra = sbp.cursor; + if (among_var == 1) + if (r_RV()) + sbp.slice_del(); + } + } + + function habr6(c1, c2) { + if (sbp.eq_s_b(1, c1)) { + sbp.bra = sbp.cursor; + var v_1 = sbp.limit - sbp.cursor; + if (sbp.eq_s_b(1, c2)) { + sbp.cursor = sbp.limit - v_1; + if (r_RV()) + sbp.slice_del(); + return false; + } + } + return true; + } + + function r_residual_form() { + var among_var, v_1, v_2, v_3; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_8, 4); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_RV()) { + sbp.slice_del(); + sbp.ket = sbp.cursor; + v_1 = sbp.limit - sbp.cursor; + if (habr6("u", "g")) + habr6("i", "c") + } + break; + case 2: + sbp.slice_from("c"); + break; + } + } + } + + function habr1() { + if (!r_standard_suffix()) { + sbp.cursor = sbp.limit; + if (!r_verb_suffix()) { + sbp.cursor = sbp.limit; + r_residual_suffix(); + return; + } + } + sbp.cursor = sbp.limit; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "i")) { + sbp.bra = sbp.cursor; + if (sbp.eq_s_b(1, "c")) { + sbp.cursor = sbp.limit; + if (r_RV()) + sbp.slice_del(); + } + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_prelude(); + sbp.cursor = v_1; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + habr1(); + sbp.cursor = sbp.limit; + r_residual_form(); + sbp.cursor = sbp.limit_backward; + r_postlude(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.pt.stemmer, 'stemmer-pt'); + + /* stop word filter function */ + lunr.pt.stopWordFilter = function(token) { + if (lunr.pt.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.pt.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.pt.stopWordFilter.stopWords.length = 204; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.pt.stopWordFilter.stopWords.elements = ' a ao aos aquela aquelas aquele aqueles aquilo as até com como da das de dela delas dele deles depois do dos e ela elas ele eles em entre era eram essa essas esse esses esta estamos estas estava estavam este esteja estejam estejamos estes esteve estive estivemos estiver estivera estiveram estiverem estivermos estivesse estivessem estivéramos estivéssemos estou está estávamos estão eu foi fomos for fora foram forem formos fosse fossem fui fôramos fôssemos haja hajam hajamos havemos hei houve houvemos houver houvera houveram houverei houverem houveremos houveria houveriam houvermos houverá houverão houveríamos houvesse houvessem houvéramos houvéssemos há hão isso isto já lhe lhes mais mas me mesmo meu meus minha minhas muito na nas nem no nos nossa nossas nosso nossos num numa não nós o os ou para pela pelas pelo pelos por qual quando que quem se seja sejam sejamos sem serei seremos seria seriam será serão seríamos seu seus somos sou sua suas são só também te tem temos tenha tenham tenhamos tenho terei teremos teria teriam terá terão teríamos teu teus teve tinha tinham tive tivemos tiver tivera tiveram tiverem tivermos tivesse tivessem tivéramos tivéssemos tu tua tuas tém tínhamos um uma você vocês vos à às éramos'.split(' '); + + lunr.Pipeline.registerFunction(lunr.pt.stopWordFilter, 'stopWordFilter-pt'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.pt.min.js b/themes/tabi-lean/static/js/lunr/lunr.pt.min.js new file mode 100644 index 0000000..9776adc --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.pt.min.js @@ -0,0 +1 @@ +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,s,n;r.pt=function(){this.pipeline.reset(),this.pipeline.add(r.pt.trimmer,r.pt.stopWordFilter,r.pt.stemmer)},r.pt.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.pt.trimmer=r.trimmerSupport.generateTrimmer(r.pt.wordCharacters),r.Pipeline.registerFunction(r.pt.trimmer,"trimmer-pt"),r.pt.stemmer=(e=r.stemmerSupport.Among,s=r.stemmerSupport.SnowballProgram,n=new function(){var o,i,t,a=[new e("",-1,3),new e("ã",0,1),new e("õ",0,2)],u=[new e("",-1,3),new e("a~",0,1),new e("o~",0,2)],w=[new e("ic",-1,-1),new e("ad",-1,-1),new e("os",-1,-1),new e("iv",-1,1)],m=[new e("ante",-1,1),new e("avel",-1,1),new e("ível",-1,1)],c=[new e("ic",-1,1),new e("abil",-1,1),new e("iv",-1,1)],l=[new e("ica",-1,1),new e("ância",-1,1),new e("ência",-1,4),new e("ira",-1,9),new e("adora",-1,1),new e("osa",-1,1),new e("ista",-1,1),new e("iva",-1,8),new e("eza",-1,1),new e("logía",-1,2),new e("idade",-1,7),new e("ante",-1,1),new e("mente",-1,6),new e("amente",12,5),new e("ável",-1,1),new e("ível",-1,1),new e("ución",-1,3),new e("ico",-1,1),new e("ismo",-1,1),new e("oso",-1,1),new e("amento",-1,1),new e("imento",-1,1),new e("ivo",-1,8),new e("aça~o",-1,1),new e("ador",-1,1),new e("icas",-1,1),new e("ências",-1,4),new e("iras",-1,9),new e("adoras",-1,1),new e("osas",-1,1),new e("istas",-1,1),new e("ivas",-1,8),new e("ezas",-1,1),new e("logías",-1,2),new e("idades",-1,7),new e("uciones",-1,3),new e("adores",-1,1),new e("antes",-1,1),new e("aço~es",-1,1),new e("icos",-1,1),new e("ismos",-1,1),new e("osos",-1,1),new e("amentos",-1,1),new e("imentos",-1,1),new e("ivos",-1,8)],f=[new e("ada",-1,1),new e("ida",-1,1),new e("ia",-1,1),new e("aria",2,1),new e("eria",2,1),new e("iria",2,1),new e("ara",-1,1),new e("era",-1,1),new e("ira",-1,1),new e("ava",-1,1),new e("asse",-1,1),new e("esse",-1,1),new e("isse",-1,1),new e("aste",-1,1),new e("este",-1,1),new e("iste",-1,1),new e("ei",-1,1),new e("arei",16,1),new e("erei",16,1),new e("irei",16,1),new e("am",-1,1),new e("iam",20,1),new e("ariam",21,1),new e("eriam",21,1),new e("iriam",21,1),new e("aram",20,1),new e("eram",20,1),new e("iram",20,1),new e("avam",20,1),new e("em",-1,1),new e("arem",29,1),new e("erem",29,1),new e("irem",29,1),new e("assem",29,1),new e("essem",29,1),new e("issem",29,1),new e("ado",-1,1),new e("ido",-1,1),new e("ando",-1,1),new e("endo",-1,1),new e("indo",-1,1),new e("ara~o",-1,1),new e("era~o",-1,1),new e("ira~o",-1,1),new e("ar",-1,1),new e("er",-1,1),new e("ir",-1,1),new e("as",-1,1),new e("adas",47,1),new e("idas",47,1),new e("ias",47,1),new e("arias",50,1),new e("erias",50,1),new e("irias",50,1),new e("aras",47,1),new e("eras",47,1),new e("iras",47,1),new e("avas",47,1),new e("es",-1,1),new e("ardes",58,1),new e("erdes",58,1),new e("irdes",58,1),new e("ares",58,1),new e("eres",58,1),new e("ires",58,1),new e("asses",58,1),new e("esses",58,1),new e("isses",58,1),new e("astes",58,1),new e("estes",58,1),new e("istes",58,1),new e("is",-1,1),new e("ais",71,1),new e("eis",71,1),new e("areis",73,1),new e("ereis",73,1),new e("ireis",73,1),new e("áreis",73,1),new e("éreis",73,1),new e("íreis",73,1),new e("ásseis",73,1),new e("ésseis",73,1),new e("ísseis",73,1),new e("áveis",73,1),new e("íeis",73,1),new e("aríeis",84,1),new e("eríeis",84,1),new e("iríeis",84,1),new e("ados",-1,1),new e("idos",-1,1),new e("amos",-1,1),new e("áramos",90,1),new e("éramos",90,1),new e("íramos",90,1),new e("ávamos",90,1),new e("íamos",90,1),new e("aríamos",95,1),new e("eríamos",95,1),new e("iríamos",95,1),new e("emos",-1,1),new e("aremos",99,1),new e("eremos",99,1),new e("iremos",99,1),new e("ássemos",99,1),new e("êssemos",99,1),new e("íssemos",99,1),new e("imos",-1,1),new e("armos",-1,1),new e("ermos",-1,1),new e("irmos",-1,1),new e("ámos",-1,1),new e("arás",-1,1),new e("erás",-1,1),new e("irás",-1,1),new e("eu",-1,1),new e("iu",-1,1),new e("ou",-1,1),new e("ará",-1,1),new e("erá",-1,1),new e("irá",-1,1)],d=[new e("a",-1,1),new e("i",-1,1),new e("o",-1,1),new e("os",-1,1),new e("á",-1,1),new e("í",-1,1),new e("ó",-1,1)],p=[new e("e",-1,1),new e("ç",-1,2),new e("é",-1,1),new e("ê",-1,1)],v=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,3,19,12,2],_=new s;function h(){if(!_.out_grouping(v,97,250))return 1;for(;!_.in_grouping(v,97,250);){if(_.cursor>=_.limit)return 1;_.cursor++}}function b(){for(;!_.in_grouping(v,97,250);){if(_.cursor>=_.limit)return;_.cursor++}for(;!_.out_grouping(v,97,250);){if(_.cursor>=_.limit)return;_.cursor++}return 1}function g(){return t<=_.cursor}function k(){return o<=_.cursor}function q(e,r){return!_.eq_s_b(1,e)||(_.bra=_.cursor,e=_.limit-_.cursor,!_.eq_s_b(1,r))||(_.cursor=_.limit-e,g()&&_.slice_del(),0)}this.setCurrent=function(e){_.setCurrent(e)},this.getCurrent=function(){return _.getCurrent()},this.stem=function(){for(var e,r,s,n=_.cursor;;){if(_.bra=_.cursor,e=_.find_among(a,3))switch(_.ket=_.cursor,e){case 1:_.slice_from("a~");continue;case 2:_.slice_from("o~");continue;case 3:if(!(_.cursor>=_.limit)){_.cursor++;continue}}break}if(_.cursor=n,r=_.cursor,t=_.limit,o=i=t,function(){var e,r=_.cursor;if(_.in_grouping(v,97,250))if(e=_.cursor,h()){if(_.cursor=e,function(){if(_.in_grouping(v,97,250))for(;!_.out_grouping(v,97,250);){if(_.cursor>=_.limit)return;_.cursor++}return t=_.cursor,1}())return}else t=_.cursor;if(_.cursor=r,_.out_grouping(v,97,250)){if(e=_.cursor,h()){if(_.cursor=e,!_.in_grouping(v,97,250)||_.cursor>=_.limit)return;_.cursor++}t=_.cursor}}(),_.cursor=r,b()&&(i=_.cursor,b())&&(o=_.cursor),_.limit_backward=n,_.cursor=_.limit,function(){var e;if(_.ket=_.cursor,e=_.find_among_b(l,45)){switch(_.bra=_.cursor,e){case 1:if(!k())return;_.slice_del();break;case 2:if(!k())return;_.slice_from("log");break;case 3:if(!k())return;_.slice_from("u");break;case 4:if(!k())return;_.slice_from("ente");break;case 5:if(!(i<=_.cursor))return;_.slice_del(),_.ket=_.cursor,(e=_.find_among_b(w,4))&&(_.bra=_.cursor,k())&&(_.slice_del(),1==e)&&(_.ket=_.cursor,_.eq_s_b(2,"at"))&&(_.bra=_.cursor,k())&&_.slice_del();break;case 6:if(!k())return;_.slice_del(),_.ket=_.cursor,(e=_.find_among_b(m,3))&&(_.bra=_.cursor,1==e)&&k()&&_.slice_del();break;case 7:if(!k())return;_.slice_del(),_.ket=_.cursor,(e=_.find_among_b(c,3))&&(_.bra=_.cursor,1==e)&&k()&&_.slice_del();break;case 8:if(!k())return;_.slice_del(),_.ket=_.cursor,_.eq_s_b(2,"at")&&(_.bra=_.cursor,k())&&_.slice_del();break;case 9:if(!g()||!_.eq_s_b(1,"e"))return;_.slice_from("ir")}return 1}}()||(_.cursor=_.limit,function(){var e,r;if(_.cursor>=t){if(r=_.limit_backward,_.limit_backward=t,_.ket=_.cursor,e=_.find_among_b(f,120))return _.bra=_.cursor,1==e&&_.slice_del(),_.limit_backward=r,1;_.limit_backward=r}}())?(_.cursor=_.limit,_.ket=_.cursor,_.eq_s_b(1,"i")&&(_.bra=_.cursor,_.eq_s_b(1,"c"))&&(_.cursor=_.limit,g())&&_.slice_del()):(_.cursor=_.limit,_.ket=_.cursor,(n=_.find_among_b(d,7))&&(_.bra=_.cursor,1==n)&&g()&&_.slice_del()),_.cursor=_.limit,_.ket=_.cursor,r=_.find_among_b(p,4))switch(_.bra=_.cursor,r){case 1:g()&&(_.slice_del(),_.ket=_.cursor,_.limit,_.cursor,q("u","g"))&&q("i","c");break;case 2:_.slice_from("c")}for(_.cursor=_.limit_backward;;){if(_.bra=_.cursor,s=_.find_among(u,3))switch(_.ket=_.cursor,s){case 1:_.slice_from("ã");continue;case 2:_.slice_from("õ");continue;case 3:if(!(_.cursor>=_.limit)){_.cursor++;continue}}break}return!0}},function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}),r.Pipeline.registerFunction(r.pt.stemmer,"stemmer-pt"),r.pt.stopWordFilter=function(e){if(-1===r.pt.stopWordFilter.stopWords.indexOf(e))return e},r.pt.stopWordFilter.stopWords=new r.SortedSet,r.pt.stopWordFilter.stopWords.length=204,r.pt.stopWordFilter.stopWords.elements=" a ao aos aquela aquelas aquele aqueles aquilo as até com como da das de dela delas dele deles depois do dos e ela elas ele eles em entre era eram essa essas esse esses esta estamos estas estava estavam este esteja estejam estejamos estes esteve estive estivemos estiver estivera estiveram estiverem estivermos estivesse estivessem estivéramos estivéssemos estou está estávamos estão eu foi fomos for fora foram forem formos fosse fossem fui fôramos fôssemos haja hajam hajamos havemos hei houve houvemos houver houvera houveram houverei houverem houveremos houveria houveriam houvermos houverá houverão houveríamos houvesse houvessem houvéramos houvéssemos há hão isso isto já lhe lhes mais mas me mesmo meu meus minha minhas muito na nas nem no nos nossa nossas nosso nossos num numa não nós o os ou para pela pelas pelo pelos por qual quando que quem se seja sejam sejamos sem serei seremos seria seriam será serão seríamos seu seus somos sou sua suas são só também te tem temos tenha tenham tenhamos tenho terei teremos teria teriam terá terão teríamos teu teus teve tinha tinham tive tivemos tiver tivera tiveram tiverem tivermos tivesse tivessem tivéramos tivéssemos tu tua tuas tém tínhamos um uma você vocês vos à às éramos".split(" "),r.Pipeline.registerFunction(r.pt.stopWordFilter,"stopWordFilter-pt")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.ro.js b/themes/tabi-lean/static/js/lunr/lunr.ro.js new file mode 100644 index 0000000..9638278 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.ro.js @@ -0,0 +1,554 @@ +/*! + * Lunr languages, `Romanian` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.ro = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.ro.trimmer, + lunr.ro.stopWordFilter, + lunr.ro.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.ro.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.ro.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.ro.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.ro.trimmer, 'trimmer-ro'); + + /* lunr stemmer function */ + lunr.ro.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function RomanianStemmer() { + var a_0 = [new Among("", -1, 3), new Among("I", 0, 1), new Among("U", 0, 2)], + a_1 = [ + new Among("ea", -1, 3), new Among("a\u0163ia", -1, 7), + new Among("aua", -1, 2), new Among("iua", -1, 4), + new Among("a\u0163ie", -1, 7), new Among("ele", -1, 3), + new Among("ile", -1, 5), new Among("iile", 6, 4), + new Among("iei", -1, 4), new Among("atei", -1, 6), + new Among("ii", -1, 4), new Among("ului", -1, 1), + new Among("ul", -1, 1), new Among("elor", -1, 3), + new Among("ilor", -1, 4), new Among("iilor", 14, 4) + ], + a_2 = [ + new Among("icala", -1, 4), new Among("iciva", -1, 4), + new Among("ativa", -1, 5), new Among("itiva", -1, 6), + new Among("icale", -1, 4), new Among("a\u0163iune", -1, 5), + new Among("i\u0163iune", -1, 6), new Among("atoare", -1, 5), + new Among("itoare", -1, 6), new Among("\u0103toare", -1, 5), + new Among("icitate", -1, 4), new Among("abilitate", -1, 1), + new Among("ibilitate", -1, 2), new Among("ivitate", -1, 3), + new Among("icive", -1, 4), new Among("ative", -1, 5), + new Among("itive", -1, 6), new Among("icali", -1, 4), + new Among("atori", -1, 5), new Among("icatori", 18, 4), + new Among("itori", -1, 6), new Among("\u0103tori", -1, 5), + new Among("icitati", -1, 4), new Among("abilitati", -1, 1), + new Among("ivitati", -1, 3), new Among("icivi", -1, 4), + new Among("ativi", -1, 5), new Among("itivi", -1, 6), + new Among("icit\u0103i", -1, 4), new Among("abilit\u0103i", -1, 1), + new Among("ivit\u0103i", -1, 3), + new Among("icit\u0103\u0163i", -1, 4), + new Among("abilit\u0103\u0163i", -1, 1), + new Among("ivit\u0103\u0163i", -1, 3), new Among("ical", -1, 4), + new Among("ator", -1, 5), new Among("icator", 35, 4), + new Among("itor", -1, 6), new Among("\u0103tor", -1, 5), + new Among("iciv", -1, 4), new Among("ativ", -1, 5), + new Among("itiv", -1, 6), new Among("ical\u0103", -1, 4), + new Among("iciv\u0103", -1, 4), new Among("ativ\u0103", -1, 5), + new Among("itiv\u0103", -1, 6) + ], + a_3 = [new Among("ica", -1, 1), + new Among("abila", -1, 1), new Among("ibila", -1, 1), + new Among("oasa", -1, 1), new Among("ata", -1, 1), + new Among("ita", -1, 1), new Among("anta", -1, 1), + new Among("ista", -1, 3), new Among("uta", -1, 1), + new Among("iva", -1, 1), new Among("ic", -1, 1), + new Among("ice", -1, 1), new Among("abile", -1, 1), + new Among("ibile", -1, 1), new Among("isme", -1, 3), + new Among("iune", -1, 2), new Among("oase", -1, 1), + new Among("ate", -1, 1), new Among("itate", 17, 1), + new Among("ite", -1, 1), new Among("ante", -1, 1), + new Among("iste", -1, 3), new Among("ute", -1, 1), + new Among("ive", -1, 1), new Among("ici", -1, 1), + new Among("abili", -1, 1), new Among("ibili", -1, 1), + new Among("iuni", -1, 2), new Among("atori", -1, 1), + new Among("osi", -1, 1), new Among("ati", -1, 1), + new Among("itati", 30, 1), new Among("iti", -1, 1), + new Among("anti", -1, 1), new Among("isti", -1, 3), + new Among("uti", -1, 1), new Among("i\u015Fti", -1, 3), + new Among("ivi", -1, 1), new Among("it\u0103i", -1, 1), + new Among("o\u015Fi", -1, 1), new Among("it\u0103\u0163i", -1, 1), + new Among("abil", -1, 1), new Among("ibil", -1, 1), + new Among("ism", -1, 3), new Among("ator", -1, 1), + new Among("os", -1, 1), new Among("at", -1, 1), + new Among("it", -1, 1), new Among("ant", -1, 1), + new Among("ist", -1, 3), new Among("ut", -1, 1), + new Among("iv", -1, 1), new Among("ic\u0103", -1, 1), + new Among("abil\u0103", -1, 1), new Among("ibil\u0103", -1, 1), + new Among("oas\u0103", -1, 1), new Among("at\u0103", -1, 1), + new Among("it\u0103", -1, 1), new Among("ant\u0103", -1, 1), + new Among("ist\u0103", -1, 3), new Among("ut\u0103", -1, 1), + new Among("iv\u0103", -1, 1) + ], + a_4 = [new Among("ea", -1, 1), + new Among("ia", -1, 1), new Among("esc", -1, 1), + new Among("\u0103sc", -1, 1), new Among("ind", -1, 1), + new Among("\u00E2nd", -1, 1), new Among("are", -1, 1), + new Among("ere", -1, 1), new Among("ire", -1, 1), + new Among("\u00E2re", -1, 1), new Among("se", -1, 2), + new Among("ase", 10, 1), new Among("sese", 10, 2), + new Among("ise", 10, 1), new Among("use", 10, 1), + new Among("\u00E2se", 10, 1), new Among("e\u015Fte", -1, 1), + new Among("\u0103\u015Fte", -1, 1), new Among("eze", -1, 1), + new Among("ai", -1, 1), new Among("eai", 19, 1), + new Among("iai", 19, 1), new Among("sei", -1, 2), + new Among("e\u015Fti", -1, 1), new Among("\u0103\u015Fti", -1, 1), + new Among("ui", -1, 1), new Among("ezi", -1, 1), + new Among("\u00E2i", -1, 1), new Among("a\u015Fi", -1, 1), + new Among("se\u015Fi", -1, 2), new Among("ase\u015Fi", 29, 1), + new Among("sese\u015Fi", 29, 2), new Among("ise\u015Fi", 29, 1), + new Among("use\u015Fi", 29, 1), + new Among("\u00E2se\u015Fi", 29, 1), new Among("i\u015Fi", -1, 1), + new Among("u\u015Fi", -1, 1), new Among("\u00E2\u015Fi", -1, 1), + new Among("a\u0163i", -1, 2), new Among("ea\u0163i", 38, 1), + new Among("ia\u0163i", 38, 1), new Among("e\u0163i", -1, 2), + new Among("i\u0163i", -1, 2), new Among("\u00E2\u0163i", -1, 2), + new Among("ar\u0103\u0163i", -1, 1), + new Among("ser\u0103\u0163i", -1, 2), + new Among("aser\u0103\u0163i", 45, 1), + new Among("seser\u0103\u0163i", 45, 2), + new Among("iser\u0103\u0163i", 45, 1), + new Among("user\u0103\u0163i", 45, 1), + new Among("\u00E2ser\u0103\u0163i", 45, 1), + new Among("ir\u0103\u0163i", -1, 1), + new Among("ur\u0103\u0163i", -1, 1), + new Among("\u00E2r\u0103\u0163i", -1, 1), new Among("am", -1, 1), + new Among("eam", 54, 1), new Among("iam", 54, 1), + new Among("em", -1, 2), new Among("asem", 57, 1), + new Among("sesem", 57, 2), new Among("isem", 57, 1), + new Among("usem", 57, 1), new Among("\u00E2sem", 57, 1), + new Among("im", -1, 2), new Among("\u00E2m", -1, 2), + new Among("\u0103m", -1, 2), new Among("ar\u0103m", 65, 1), + new Among("ser\u0103m", 65, 2), new Among("aser\u0103m", 67, 1), + new Among("seser\u0103m", 67, 2), new Among("iser\u0103m", 67, 1), + new Among("user\u0103m", 67, 1), + new Among("\u00E2ser\u0103m", 67, 1), + new Among("ir\u0103m", 65, 1), new Among("ur\u0103m", 65, 1), + new Among("\u00E2r\u0103m", 65, 1), new Among("au", -1, 1), + new Among("eau", 76, 1), new Among("iau", 76, 1), + new Among("indu", -1, 1), new Among("\u00E2ndu", -1, 1), + new Among("ez", -1, 1), new Among("easc\u0103", -1, 1), + new Among("ar\u0103", -1, 1), new Among("ser\u0103", -1, 2), + new Among("aser\u0103", 84, 1), new Among("seser\u0103", 84, 2), + new Among("iser\u0103", 84, 1), new Among("user\u0103", 84, 1), + new Among("\u00E2ser\u0103", 84, 1), new Among("ir\u0103", -1, 1), + new Among("ur\u0103", -1, 1), new Among("\u00E2r\u0103", -1, 1), + new Among("eaz\u0103", -1, 1) + ], + a_5 = [new Among("a", -1, 1), + new Among("e", -1, 1), new Among("ie", 1, 1), + new Among("i", -1, 1), new Among("\u0103", -1, 1) + ], + g_v = [17, 65, + 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 32, 0, 0, 4 + ], + B_standard_suffix_removed, I_p2, I_p1, I_pV, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function habr1(c1, c2) { + if (sbp.eq_s(1, c1)) { + sbp.ket = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 259)) + sbp.slice_from(c2); + } + } + + function r_prelude() { + var v_1, v_2; + while (true) { + v_1 = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 259)) { + v_2 = sbp.cursor; + sbp.bra = v_2; + habr1("u", "U"); + sbp.cursor = v_2; + habr1("i", "I"); + } + sbp.cursor = v_1; + if (sbp.cursor >= sbp.limit) { + break; + } + sbp.cursor++; + } + } + + function habr2() { + if (sbp.out_grouping(g_v, 97, 259)) { + while (!sbp.in_grouping(g_v, 97, 259)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + return false; + } + return true; + } + + function habr3() { + if (sbp.in_grouping(g_v, 97, 259)) { + while (!sbp.out_grouping(g_v, 97, 259)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + } + return false; + } + + function habr4() { + var v_1 = sbp.cursor, + v_2, v_3; + if (sbp.in_grouping(g_v, 97, 259)) { + v_2 = sbp.cursor; + if (habr2()) { + sbp.cursor = v_2; + if (!habr3()) { + I_pV = sbp.cursor; + return; + } + } else { + I_pV = sbp.cursor; + return; + } + } + sbp.cursor = v_1; + if (sbp.out_grouping(g_v, 97, 259)) { + v_3 = sbp.cursor; + if (habr2()) { + sbp.cursor = v_3; + if (sbp.in_grouping(g_v, 97, 259) && sbp.cursor < sbp.limit) + sbp.cursor++; + } + I_pV = sbp.cursor; + } + } + + function habr5() { + while (!sbp.in_grouping(g_v, 97, 259)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 259)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + return true; + } + + function r_mark_regions() { + var v_1 = sbp.cursor; + I_pV = sbp.limit; + I_p1 = I_pV; + I_p2 = I_pV; + habr4(); + sbp.cursor = v_1; + if (habr5()) { + I_p1 = sbp.cursor; + if (habr5()) + I_p2 = sbp.cursor; + } + } + + function r_postlude() { + var among_var; + while (true) { + sbp.bra = sbp.cursor; + among_var = sbp.find_among(a_0, 3); + if (among_var) { + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("i"); + continue; + case 2: + sbp.slice_from("u"); + continue; + case 3: + if (sbp.cursor >= sbp.limit) + break; + sbp.cursor++; + continue; + } + } + break; + } + } + + function r_RV() { + return I_pV <= sbp.cursor; + } + + function r_R1() { + return I_p1 <= sbp.cursor; + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function r_step_0() { + var among_var, v_1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_1, 16); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + sbp.slice_del(); + break; + case 2: + sbp.slice_from("a"); + break; + case 3: + sbp.slice_from("e"); + break; + case 4: + sbp.slice_from("i"); + break; + case 5: + v_1 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(2, "ab")) { + sbp.cursor = sbp.limit - v_1; + sbp.slice_from("i"); + } + break; + case 6: + sbp.slice_from("at"); + break; + case 7: + sbp.slice_from("a\u0163i"); + break; + } + } + } + } + + function r_combo_suffix() { + var among_var, v_1 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_2, 46); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R1()) { + switch (among_var) { + case 1: + sbp.slice_from("abil"); + break; + case 2: + sbp.slice_from("ibil"); + break; + case 3: + sbp.slice_from("iv"); + break; + case 4: + sbp.slice_from("ic"); + break; + case 5: + sbp.slice_from("at"); + break; + case 6: + sbp.slice_from("it"); + break; + } + B_standard_suffix_removed = true; + sbp.cursor = sbp.limit - v_1; + return true; + } + } + return false; + } + + function r_standard_suffix() { + var among_var, v_1; + B_standard_suffix_removed = false; + while (true) { + v_1 = sbp.limit - sbp.cursor; + if (!r_combo_suffix()) { + sbp.cursor = sbp.limit - v_1; + break; + } + } + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_3, 62); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R2()) { + switch (among_var) { + case 1: + sbp.slice_del(); + break; + case 2: + if (sbp.eq_s_b(1, "\u0163")) { + sbp.bra = sbp.cursor; + sbp.slice_from("t"); + } + break; + case 3: + sbp.slice_from("ist"); + break; + } + B_standard_suffix_removed = true; + } + } + } + + function r_verb_suffix() { + var among_var, v_1, v_2; + if (sbp.cursor >= I_pV) { + v_1 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_4, 94); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + v_2 = sbp.limit - sbp.cursor; + if (!sbp.out_grouping_b(g_v, 97, 259)) { + sbp.cursor = sbp.limit - v_2; + if (!sbp.eq_s_b(1, "u")) + break; + } + case 2: + sbp.slice_del(); + break; + } + } + sbp.limit_backward = v_1; + } + } + + function r_vowel_suffix() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_5, 5); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_RV() && among_var == 1) + sbp.slice_del(); + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_prelude(); + sbp.cursor = v_1; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_step_0(); + sbp.cursor = sbp.limit; + r_standard_suffix(); + sbp.cursor = sbp.limit; + if (!B_standard_suffix_removed) { + sbp.cursor = sbp.limit; + r_verb_suffix(); + sbp.cursor = sbp.limit; + } + r_vowel_suffix(); + sbp.cursor = sbp.limit_backward; + r_postlude(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.ro.stemmer, 'stemmer-ro'); + + /* stop word filter function */ + lunr.ro.stopWordFilter = function(token) { + if (lunr.ro.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.ro.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.ro.stopWordFilter.stopWords.length = 282; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.ro.stopWordFilter.stopWords.elements = ' acea aceasta această aceea acei aceia acel acela acele acelea acest acesta aceste acestea aceşti aceştia acolo acord acum ai aia aibă aici al ale alea altceva altcineva am ar are asemenea asta astea astăzi asupra au avea avem aveţi azi aş aşadar aţi bine bucur bună ca care caut ce cel ceva chiar cinci cine cineva contra cu cum cumva curând curînd când cât câte câtva câţi cînd cît cîte cîtva cîţi că căci cărei căror cărui către da dacă dar datorită dată dau de deci deja deoarece departe deşi din dinaintea dintr- dintre doi doilea două drept după dă ea ei el ele eram este eu eşti face fata fi fie fiecare fii fim fiu fiţi frumos fără graţie halbă iar ieri la le li lor lui lângă lîngă mai mea mei mele mereu meu mi mie mine mult multă mulţi mulţumesc mâine mîine mă ne nevoie nici nicăieri nimeni nimeri nimic nişte noastre noastră noi noroc nostru nouă noştri nu opt ori oricare orice oricine oricum oricând oricât oricînd oricît oriunde patra patru patrulea pe pentru peste pic poate pot prea prima primul prin puţin puţina puţină până pînă rog sa sale sau se spate spre sub sunt suntem sunteţi sută sînt sîntem sînteţi să săi său ta tale te timp tine toate toată tot totuşi toţi trei treia treilea tu tăi tău un una unde undeva unei uneia unele uneori unii unor unora unu unui unuia unul vi voastre voastră voi vostru vouă voştri vreme vreo vreun vă zece zero zi zice îi îl îmi împotriva în înainte înaintea încotro încât încît între întrucât întrucît îţi ăla ălea ăsta ăstea ăştia şapte şase şi ştiu ţi ţie'.split(' '); + + lunr.Pipeline.registerFunction(lunr.ro.stopWordFilter, 'stopWordFilter-ro'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.ro.min.js b/themes/tabi-lean/static/js/lunr/lunr.ro.min.js new file mode 100644 index 0000000..4fe0c44 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.ro.min.js @@ -0,0 +1 @@ +!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(i){if(void 0===i)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===i.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,r,n;i.ro=function(){this.pipeline.reset(),this.pipeline.add(i.ro.trimmer,i.ro.stopWordFilter,i.ro.stemmer)},i.ro.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",i.ro.trimmer=i.trimmerSupport.generateTrimmer(i.ro.wordCharacters),i.Pipeline.registerFunction(i.ro.trimmer,"trimmer-ro"),i.ro.stemmer=(e=i.stemmerSupport.Among,r=i.stemmerSupport.SnowballProgram,n=new function(){var u,w,m,l,f=[new e("",-1,3),new e("I",0,1),new e("U",0,2)],p=[new e("ea",-1,3),new e("aţia",-1,7),new e("aua",-1,2),new e("iua",-1,4),new e("aţie",-1,7),new e("ele",-1,3),new e("ile",-1,5),new e("iile",6,4),new e("iei",-1,4),new e("atei",-1,6),new e("ii",-1,4),new e("ului",-1,1),new e("ul",-1,1),new e("elor",-1,3),new e("ilor",-1,4),new e("iilor",14,4)],d=[new e("icala",-1,4),new e("iciva",-1,4),new e("ativa",-1,5),new e("itiva",-1,6),new e("icale",-1,4),new e("aţiune",-1,5),new e("iţiune",-1,6),new e("atoare",-1,5),new e("itoare",-1,6),new e("ătoare",-1,5),new e("icitate",-1,4),new e("abilitate",-1,1),new e("ibilitate",-1,2),new e("ivitate",-1,3),new e("icive",-1,4),new e("ative",-1,5),new e("itive",-1,6),new e("icali",-1,4),new e("atori",-1,5),new e("icatori",18,4),new e("itori",-1,6),new e("ători",-1,5),new e("icitati",-1,4),new e("abilitati",-1,1),new e("ivitati",-1,3),new e("icivi",-1,4),new e("ativi",-1,5),new e("itivi",-1,6),new e("icităi",-1,4),new e("abilităi",-1,1),new e("ivităi",-1,3),new e("icităţi",-1,4),new e("abilităţi",-1,1),new e("ivităţi",-1,3),new e("ical",-1,4),new e("ator",-1,5),new e("icator",35,4),new e("itor",-1,6),new e("ător",-1,5),new e("iciv",-1,4),new e("ativ",-1,5),new e("itiv",-1,6),new e("icală",-1,4),new e("icivă",-1,4),new e("ativă",-1,5),new e("itivă",-1,6)],b=[new e("ica",-1,1),new e("abila",-1,1),new e("ibila",-1,1),new e("oasa",-1,1),new e("ata",-1,1),new e("ita",-1,1),new e("anta",-1,1),new e("ista",-1,3),new e("uta",-1,1),new e("iva",-1,1),new e("ic",-1,1),new e("ice",-1,1),new e("abile",-1,1),new e("ibile",-1,1),new e("isme",-1,3),new e("iune",-1,2),new e("oase",-1,1),new e("ate",-1,1),new e("itate",17,1),new e("ite",-1,1),new e("ante",-1,1),new e("iste",-1,3),new e("ute",-1,1),new e("ive",-1,1),new e("ici",-1,1),new e("abili",-1,1),new e("ibili",-1,1),new e("iuni",-1,2),new e("atori",-1,1),new e("osi",-1,1),new e("ati",-1,1),new e("itati",30,1),new e("iti",-1,1),new e("anti",-1,1),new e("isti",-1,3),new e("uti",-1,1),new e("işti",-1,3),new e("ivi",-1,1),new e("ităi",-1,1),new e("oşi",-1,1),new e("ităţi",-1,1),new e("abil",-1,1),new e("ibil",-1,1),new e("ism",-1,3),new e("ator",-1,1),new e("os",-1,1),new e("at",-1,1),new e("it",-1,1),new e("ant",-1,1),new e("ist",-1,3),new e("ut",-1,1),new e("iv",-1,1),new e("ică",-1,1),new e("abilă",-1,1),new e("ibilă",-1,1),new e("oasă",-1,1),new e("ată",-1,1),new e("ită",-1,1),new e("antă",-1,1),new e("istă",-1,3),new e("ută",-1,1),new e("ivă",-1,1)],_=[new e("ea",-1,1),new e("ia",-1,1),new e("esc",-1,1),new e("ăsc",-1,1),new e("ind",-1,1),new e("ând",-1,1),new e("are",-1,1),new e("ere",-1,1),new e("ire",-1,1),new e("âre",-1,1),new e("se",-1,2),new e("ase",10,1),new e("sese",10,2),new e("ise",10,1),new e("use",10,1),new e("âse",10,1),new e("eşte",-1,1),new e("ăşte",-1,1),new e("eze",-1,1),new e("ai",-1,1),new e("eai",19,1),new e("iai",19,1),new e("sei",-1,2),new e("eşti",-1,1),new e("ăşti",-1,1),new e("ui",-1,1),new e("ezi",-1,1),new e("âi",-1,1),new e("aşi",-1,1),new e("seşi",-1,2),new e("aseşi",29,1),new e("seseşi",29,2),new e("iseşi",29,1),new e("useşi",29,1),new e("âseşi",29,1),new e("işi",-1,1),new e("uşi",-1,1),new e("âşi",-1,1),new e("aţi",-1,2),new e("eaţi",38,1),new e("iaţi",38,1),new e("eţi",-1,2),new e("iţi",-1,2),new e("âţi",-1,2),new e("arăţi",-1,1),new e("serăţi",-1,2),new e("aserăţi",45,1),new e("seserăţi",45,2),new e("iserăţi",45,1),new e("userăţi",45,1),new e("âserăţi",45,1),new e("irăţi",-1,1),new e("urăţi",-1,1),new e("ârăţi",-1,1),new e("am",-1,1),new e("eam",54,1),new e("iam",54,1),new e("em",-1,2),new e("asem",57,1),new e("sesem",57,2),new e("isem",57,1),new e("usem",57,1),new e("âsem",57,1),new e("im",-1,2),new e("âm",-1,2),new e("ăm",-1,2),new e("arăm",65,1),new e("serăm",65,2),new e("aserăm",67,1),new e("seserăm",67,2),new e("iserăm",67,1),new e("userăm",67,1),new e("âserăm",67,1),new e("irăm",65,1),new e("urăm",65,1),new e("ârăm",65,1),new e("au",-1,1),new e("eau",76,1),new e("iau",76,1),new e("indu",-1,1),new e("ându",-1,1),new e("ez",-1,1),new e("ească",-1,1),new e("ară",-1,1),new e("seră",-1,2),new e("aseră",84,1),new e("seseră",84,2),new e("iseră",84,1),new e("useră",84,1),new e("âseră",84,1),new e("iră",-1,1),new e("ură",-1,1),new e("âră",-1,1),new e("ează",-1,1)],v=[new e("a",-1,1),new e("e",-1,1),new e("ie",1,1),new e("i",-1,1),new e("ă",-1,1)],g=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,2,32,0,0,4],k=new r;function h(e,i){k.eq_s(1,e)&&(k.ket=k.cursor,k.in_grouping(g,97,259))&&k.slice_from(i)}function W(){if(!k.out_grouping(g,97,259))return 1;for(;!k.in_grouping(g,97,259);){if(k.cursor>=k.limit)return 1;k.cursor++}}function z(){for(;!k.in_grouping(g,97,259);){if(k.cursor>=k.limit)return;k.cursor++}for(;!k.out_grouping(g,97,259);){if(k.cursor>=k.limit)return;k.cursor++}return 1}function F(){return m<=k.cursor}this.setCurrent=function(e){k.setCurrent(e)},this.getCurrent=function(){return k.getCurrent()},this.stem=function(){for(var e,i,r,n,t,a,o,s,c=k.cursor;e=k.cursor,k.in_grouping(g,97,259)&&(i=k.cursor,k.bra=i,h("u","U"),k.cursor=i,h("i","I")),k.cursor=e,!(k.cursor>=k.limit);)k.cursor++;if(k.cursor=c,n=k.cursor,l=k.limit,w=m=l,function(){var e,i=k.cursor;if(k.in_grouping(g,97,259)){if(e=k.cursor,!W())return l=k.cursor;if(k.cursor=e,!function(){if(k.in_grouping(g,97,259))for(;!k.out_grouping(g,97,259);){if(k.cursor>=k.limit)return 1;k.cursor++}}())return l=k.cursor}k.cursor=i,k.out_grouping(g,97,259)&&(e=k.cursor,W()&&(k.cursor=e,k.in_grouping(g,97,259))&&k.cursor<k.limit&&k.cursor++,l=k.cursor)}(),k.cursor=n,z()&&(m=k.cursor,z())&&(w=k.cursor),k.limit_backward=c,k.cursor=k.limit,k.ket=k.cursor,(n=k.find_among_b(p,16))&&(k.bra=k.cursor,F()))switch(n){case 1:k.slice_del();break;case 2:k.slice_from("a");break;case 3:k.slice_from("e");break;case 4:k.slice_from("i");break;case 5:r=k.limit-k.cursor,k.eq_s_b(2,"ab")||(k.cursor=k.limit-r,k.slice_from("i"));break;case 6:k.slice_from("at");break;case 7:k.slice_from("aţi")}for(k.cursor=k.limit,u=!1;;)if(o=k.limit-k.cursor,!function(){var e,i=k.limit-k.cursor;if(k.ket=k.cursor,(e=k.find_among_b(d,46))&&(k.bra=k.cursor,F())){switch(e){case 1:k.slice_from("abil");break;case 2:k.slice_from("ibil");break;case 3:k.slice_from("iv");break;case 4:k.slice_from("ic");break;case 5:k.slice_from("at");break;case 6:k.slice_from("it")}return u=!0,k.cursor=k.limit-i,1}}()){k.cursor=k.limit-o;break}if(k.ket=k.cursor,(s=k.find_among_b(b,62))&&(k.bra=k.cursor,w<=k.cursor)){switch(s){case 1:k.slice_del();break;case 2:k.eq_s_b(1,"ţ")&&(k.bra=k.cursor,k.slice_from("t"));break;case 3:k.slice_from("ist")}u=!0}if(k.cursor=k.limit,!u){if(k.cursor=k.limit,k.cursor>=l){if(c=k.limit_backward,k.limit_backward=l,k.ket=k.cursor,n=k.find_among_b(_,94))switch(k.bra=k.cursor,n){case 1:if(t=k.limit-k.cursor,!k.out_grouping_b(g,97,259)&&(k.cursor=k.limit-t,!k.eq_s_b(1,"u")))break;case 2:k.slice_del()}k.limit_backward=c}k.cursor=k.limit}for(k.ket=k.cursor,(s=k.find_among_b(v,5))&&(k.bra=k.cursor,l<=k.cursor)&&1==s&&k.slice_del(),k.cursor=k.limit_backward;;){if(k.bra=k.cursor,a=k.find_among(f,3))switch(k.ket=k.cursor,a){case 1:k.slice_from("i");continue;case 2:k.slice_from("u");continue;case 3:if(!(k.cursor>=k.limit)){k.cursor++;continue}}break}return!0}},function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}),i.Pipeline.registerFunction(i.ro.stemmer,"stemmer-ro"),i.ro.stopWordFilter=function(e){if(-1===i.ro.stopWordFilter.stopWords.indexOf(e))return e},i.ro.stopWordFilter.stopWords=new i.SortedSet,i.ro.stopWordFilter.stopWords.length=282,i.ro.stopWordFilter.stopWords.elements=" acea aceasta această aceea acei aceia acel acela acele acelea acest acesta aceste acestea aceşti aceştia acolo acord acum ai aia aibă aici al ale alea altceva altcineva am ar are asemenea asta astea astăzi asupra au avea avem aveţi azi aş aşadar aţi bine bucur bună ca care caut ce cel ceva chiar cinci cine cineva contra cu cum cumva curând curînd când cât câte câtva câţi cînd cît cîte cîtva cîţi că căci cărei căror cărui către da dacă dar datorită dată dau de deci deja deoarece departe deşi din dinaintea dintr- dintre doi doilea două drept după dă ea ei el ele eram este eu eşti face fata fi fie fiecare fii fim fiu fiţi frumos fără graţie halbă iar ieri la le li lor lui lângă lîngă mai mea mei mele mereu meu mi mie mine mult multă mulţi mulţumesc mâine mîine mă ne nevoie nici nicăieri nimeni nimeri nimic nişte noastre noastră noi noroc nostru nouă noştri nu opt ori oricare orice oricine oricum oricând oricât oricînd oricît oriunde patra patru patrulea pe pentru peste pic poate pot prea prima primul prin puţin puţina puţină până pînă rog sa sale sau se spate spre sub sunt suntem sunteţi sută sînt sîntem sînteţi să săi său ta tale te timp tine toate toată tot totuşi toţi trei treia treilea tu tăi tău un una unde undeva unei uneia unele uneori unii unor unora unu unui unuia unul vi voastre voastră voi vostru vouă voştri vreme vreo vreun vă zece zero zi zice îi îl îmi împotriva în înainte înaintea încotro încât încît între întrucât întrucît îţi ăla ălea ăsta ăstea ăştia şapte şase şi ştiu ţi ţie".split(" "),i.Pipeline.registerFunction(i.ro.stopWordFilter,"stopWordFilter-ro")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.ru.js b/themes/tabi-lean/static/js/lunr/lunr.ru.js new file mode 100644 index 0000000..4a0c415 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.ru.js @@ -0,0 +1,387 @@ +/*! + * Lunr languages, `Russian` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.ru = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.ru.trimmer, + lunr.ru.stopWordFilter, + lunr.ru.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.ru.wordCharacters = "\u0400-\u0484\u0487-\u052F\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F"; + lunr.ru.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.ru.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.ru.trimmer, 'trimmer-ru'); + + /* lunr stemmer function */ + lunr.ru.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function RussianStemmer() { + var a_0 = [new Among("\u0432", -1, 1), new Among("\u0438\u0432", 0, 2), + new Among("\u044B\u0432", 0, 2), + new Among("\u0432\u0448\u0438", -1, 1), + new Among("\u0438\u0432\u0448\u0438", 3, 2), + new Among("\u044B\u0432\u0448\u0438", 3, 2), + new Among("\u0432\u0448\u0438\u0441\u044C", -1, 1), + new Among("\u0438\u0432\u0448\u0438\u0441\u044C", 6, 2), + new Among("\u044B\u0432\u0448\u0438\u0441\u044C", 6, 2) + ], + a_1 = [ + new Among("\u0435\u0435", -1, 1), new Among("\u0438\u0435", -1, 1), + new Among("\u043E\u0435", -1, 1), new Among("\u044B\u0435", -1, 1), + new Among("\u0438\u043C\u0438", -1, 1), + new Among("\u044B\u043C\u0438", -1, 1), + new Among("\u0435\u0439", -1, 1), new Among("\u0438\u0439", -1, 1), + new Among("\u043E\u0439", -1, 1), new Among("\u044B\u0439", -1, 1), + new Among("\u0435\u043C", -1, 1), new Among("\u0438\u043C", -1, 1), + new Among("\u043E\u043C", -1, 1), new Among("\u044B\u043C", -1, 1), + new Among("\u0435\u0433\u043E", -1, 1), + new Among("\u043E\u0433\u043E", -1, 1), + new Among("\u0435\u043C\u0443", -1, 1), + new Among("\u043E\u043C\u0443", -1, 1), + new Among("\u0438\u0445", -1, 1), new Among("\u044B\u0445", -1, 1), + new Among("\u0435\u044E", -1, 1), new Among("\u043E\u044E", -1, 1), + new Among("\u0443\u044E", -1, 1), new Among("\u044E\u044E", -1, 1), + new Among("\u0430\u044F", -1, 1), new Among("\u044F\u044F", -1, 1) + ], + a_2 = [ + new Among("\u0435\u043C", -1, 1), new Among("\u043D\u043D", -1, 1), + new Among("\u0432\u0448", -1, 1), + new Among("\u0438\u0432\u0448", 2, 2), + new Among("\u044B\u0432\u0448", 2, 2), new Among("\u0449", -1, 1), + new Among("\u044E\u0449", 5, 1), + new Among("\u0443\u044E\u0449", 6, 2) + ], + a_3 = [ + new Among("\u0441\u044C", -1, 1), new Among("\u0441\u044F", -1, 1) + ], + a_4 = [ + new Among("\u043B\u0430", -1, 1), + new Among("\u0438\u043B\u0430", 0, 2), + new Among("\u044B\u043B\u0430", 0, 2), + new Among("\u043D\u0430", -1, 1), + new Among("\u0435\u043D\u0430", 3, 2), + new Among("\u0435\u0442\u0435", -1, 1), + new Among("\u0438\u0442\u0435", -1, 2), + new Among("\u0439\u0442\u0435", -1, 1), + new Among("\u0435\u0439\u0442\u0435", 7, 2), + new Among("\u0443\u0439\u0442\u0435", 7, 2), + new Among("\u043B\u0438", -1, 1), + new Among("\u0438\u043B\u0438", 10, 2), + new Among("\u044B\u043B\u0438", 10, 2), new Among("\u0439", -1, 1), + new Among("\u0435\u0439", 13, 2), new Among("\u0443\u0439", 13, 2), + new Among("\u043B", -1, 1), new Among("\u0438\u043B", 16, 2), + new Among("\u044B\u043B", 16, 2), new Among("\u0435\u043C", -1, 1), + new Among("\u0438\u043C", -1, 2), new Among("\u044B\u043C", -1, 2), + new Among("\u043D", -1, 1), new Among("\u0435\u043D", 22, 2), + new Among("\u043B\u043E", -1, 1), + new Among("\u0438\u043B\u043E", 24, 2), + new Among("\u044B\u043B\u043E", 24, 2), + new Among("\u043D\u043E", -1, 1), + new Among("\u0435\u043D\u043E", 27, 2), + new Among("\u043D\u043D\u043E", 27, 1), + new Among("\u0435\u0442", -1, 1), + new Among("\u0443\u0435\u0442", 30, 2), + new Among("\u0438\u0442", -1, 2), new Among("\u044B\u0442", -1, 2), + new Among("\u044E\u0442", -1, 1), + new Among("\u0443\u044E\u0442", 34, 2), + new Among("\u044F\u0442", -1, 2), new Among("\u043D\u044B", -1, 1), + new Among("\u0435\u043D\u044B", 37, 2), + new Among("\u0442\u044C", -1, 1), + new Among("\u0438\u0442\u044C", 39, 2), + new Among("\u044B\u0442\u044C", 39, 2), + new Among("\u0435\u0448\u044C", -1, 1), + new Among("\u0438\u0448\u044C", -1, 2), new Among("\u044E", -1, 2), + new Among("\u0443\u044E", 44, 2) + ], + a_5 = [ + new Among("\u0430", -1, 1), new Among("\u0435\u0432", -1, 1), + new Among("\u043E\u0432", -1, 1), new Among("\u0435", -1, 1), + new Among("\u0438\u0435", 3, 1), new Among("\u044C\u0435", 3, 1), + new Among("\u0438", -1, 1), new Among("\u0435\u0438", 6, 1), + new Among("\u0438\u0438", 6, 1), + new Among("\u0430\u043C\u0438", 6, 1), + new Among("\u044F\u043C\u0438", 6, 1), + new Among("\u0438\u044F\u043C\u0438", 10, 1), + new Among("\u0439", -1, 1), new Among("\u0435\u0439", 12, 1), + new Among("\u0438\u0435\u0439", 13, 1), + new Among("\u0438\u0439", 12, 1), new Among("\u043E\u0439", 12, 1), + new Among("\u0430\u043C", -1, 1), new Among("\u0435\u043C", -1, 1), + new Among("\u0438\u0435\u043C", 18, 1), + new Among("\u043E\u043C", -1, 1), new Among("\u044F\u043C", -1, 1), + new Among("\u0438\u044F\u043C", 21, 1), new Among("\u043E", -1, 1), + new Among("\u0443", -1, 1), new Among("\u0430\u0445", -1, 1), + new Among("\u044F\u0445", -1, 1), + new Among("\u0438\u044F\u0445", 26, 1), new Among("\u044B", -1, 1), + new Among("\u044C", -1, 1), new Among("\u044E", -1, 1), + new Among("\u0438\u044E", 30, 1), new Among("\u044C\u044E", 30, 1), + new Among("\u044F", -1, 1), new Among("\u0438\u044F", 33, 1), + new Among("\u044C\u044F", 33, 1) + ], + a_6 = [ + new Among("\u043E\u0441\u0442", -1, 1), + new Among("\u043E\u0441\u0442\u044C", -1, 1) + ], + a_7 = [ + new Among("\u0435\u0439\u0448\u0435", -1, 1), + new Among("\u043D", -1, 2), new Among("\u0435\u0439\u0448", -1, 1), + new Among("\u044C", -1, 3) + ], + g_v = [33, 65, 8, 232], + I_p2, I_pV, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function habr3() { + while (!sbp.in_grouping(g_v, 1072, 1103)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + return true; + } + + function habr4() { + while (!sbp.out_grouping(g_v, 1072, 1103)) { + if (sbp.cursor >= sbp.limit) + return false; + sbp.cursor++; + } + return true; + } + + function r_mark_regions() { + I_pV = sbp.limit; + I_p2 = I_pV; + if (habr3()) { + I_pV = sbp.cursor; + if (habr4()) + if (habr3()) + if (habr4()) + I_p2 = sbp.cursor; + } + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function habr2(a, n) { + var among_var, v_1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a, n); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + v_1 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "\u0430")) { + sbp.cursor = sbp.limit - v_1; + if (!sbp.eq_s_b(1, "\u044F")) + return false; + } + case 2: + sbp.slice_del(); + break; + } + return true; + } + return false; + } + + function r_perfective_gerund() { + return habr2(a_0, 9); + } + + function habr1(a, n) { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a, n); + if (among_var) { + sbp.bra = sbp.cursor; + if (among_var == 1) + sbp.slice_del(); + return true; + } + return false; + } + + function r_adjective() { + return habr1(a_1, 26); + } + + function r_adjectival() { + var among_var; + if (r_adjective()) { + habr2(a_2, 8); + return true; + } + return false; + } + + function r_reflexive() { + return habr1(a_3, 2); + } + + function r_verb() { + return habr2(a_4, 46); + } + + function r_noun() { + habr1(a_5, 36); + } + + function r_derivational() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_6, 2); + if (among_var) { + sbp.bra = sbp.cursor; + if (r_R2() && among_var == 1) + sbp.slice_del(); + } + } + + function r_tidy_up() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_7, 4); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (!sbp.eq_s_b(1, "\u043D")) + break; + sbp.bra = sbp.cursor; + case 2: + if (!sbp.eq_s_b(1, "\u043D")) + break; + case 3: + sbp.slice_del(); + break; + } + } + } + this.stem = function() { + r_mark_regions(); + sbp.cursor = sbp.limit; + if (sbp.cursor < I_pV) + return false; + sbp.limit_backward = I_pV; + if (!r_perfective_gerund()) { + sbp.cursor = sbp.limit; + if (!r_reflexive()) + sbp.cursor = sbp.limit; + if (!r_adjectival()) { + sbp.cursor = sbp.limit; + if (!r_verb()) { + sbp.cursor = sbp.limit; + r_noun(); + } + } + } + sbp.cursor = sbp.limit; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "\u0438")) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + } else + sbp.cursor = sbp.limit; + r_derivational(); + sbp.cursor = sbp.limit; + r_tidy_up(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.ru.stemmer, 'stemmer-ru'); + + /* stop word filter function */ + lunr.ru.stopWordFilter = function(token) { + if (lunr.ru.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.ru.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.ru.stopWordFilter.stopWords.length = 422; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.ru.stopWordFilter.stopWords.elements = ' алло без близко более больше будем будет будете будешь будто буду будут будь бы бывает бывь был была были было быть в важная важное важные важный вам вами вас ваш ваша ваше ваши вверх вдали вдруг ведь везде весь вниз внизу во вокруг вон восемнадцатый восемнадцать восемь восьмой вот впрочем времени время все всегда всего всем всеми всему всех всею всю всюду вся всё второй вы г где говорил говорит год года году да давно даже далеко дальше даром два двадцатый двадцать две двенадцатый двенадцать двух девятнадцатый девятнадцать девятый девять действительно дел день десятый десять для до довольно долго должно другая другие других друго другое другой е его ее ей ему если есть еще ещё ею её ж же жизнь за занят занята занято заняты затем зато зачем здесь значит и из или им именно иметь ими имя иногда их к каждая каждое каждые каждый кажется как какая какой кем когда кого ком кому конечно которая которого которой которые который которых кроме кругом кто куда лет ли лишь лучше люди м мало между меля менее меньше меня миллионов мимо мира мне много многочисленная многочисленное многочисленные многочисленный мной мною мог могут мож может можно можхо мои мой мор мочь моя моё мы на наверху над надо назад наиболее наконец нам нами нас начала наш наша наше наши не него недавно недалеко нее ней нельзя нем немного нему непрерывно нередко несколько нет нею неё ни нибудь ниже низко никогда никуда ними них ничего но ну нужно нх о об оба обычно один одиннадцатый одиннадцать однажды однако одного одной около он она они оно опять особенно от отовсюду отсюда очень первый перед по под пожалуйста позже пока пор пора после посреди потом потому почему почти прекрасно при про просто против процентов пятнадцатый пятнадцать пятый пять раз разве рано раньше рядом с сам сама сами самим самими самих само самого самой самом самому саму свое своего своей свои своих свою сеаой себе себя сегодня седьмой сейчас семнадцатый семнадцать семь сих сказал сказала сказать сколько слишком сначала снова со собой собою совсем спасибо стал суть т та так такая также такие такое такой там твой твоя твоё те тебе тебя тем теми теперь тех то тобой тобою тогда того тоже только том тому тот тою третий три тринадцатый тринадцать ту туда тут ты тысяч у уж уже уметь хорошо хотеть хоть хотя хочешь часто чаще чего человек чем чему через четвертый четыре четырнадцатый четырнадцать что чтоб чтобы чуть шестнадцатый шестнадцать шестой шесть эта эти этим этими этих это этого этой этом этому этот эту я а'.split(' '); + + lunr.Pipeline.registerFunction(lunr.ru.stopWordFilter, 'stopWordFilter-ru'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.ru.min.js b/themes/tabi-lean/static/js/lunr/lunr.ru.min.js new file mode 100644 index 0000000..f254753 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.ru.min.js @@ -0,0 +1 @@ +!function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof exports?module.exports=n():n()(e.lunr)}(this,function(){return function(n){if(void 0===n)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===n.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var _,b,r;n.ru=function(){this.pipeline.reset(),this.pipeline.add(n.ru.trimmer,n.ru.stopWordFilter,n.ru.stemmer)},n.ru.wordCharacters="Ѐ-҄҇-ԯᴫᵸⷠ-ⷿꙀ-ꚟ︮︯",n.ru.trimmer=n.trimmerSupport.generateTrimmer(n.ru.wordCharacters),n.Pipeline.registerFunction(n.ru.trimmer,"trimmer-ru"),n.ru.stemmer=(_=n.stemmerSupport.Among,b=n.stemmerSupport.SnowballProgram,r=new function(){var n,r,w=[new _("в",-1,1),new _("ив",0,2),new _("ыв",0,2),new _("вши",-1,1),new _("ивши",3,2),new _("ывши",3,2),new _("вшись",-1,1),new _("ившись",6,2),new _("ывшись",6,2)],t=[new _("ее",-1,1),new _("ие",-1,1),new _("ое",-1,1),new _("ые",-1,1),new _("ими",-1,1),new _("ыми",-1,1),new _("ей",-1,1),new _("ий",-1,1),new _("ой",-1,1),new _("ый",-1,1),new _("ем",-1,1),new _("им",-1,1),new _("ом",-1,1),new _("ым",-1,1),new _("его",-1,1),new _("ого",-1,1),new _("ему",-1,1),new _("ому",-1,1),new _("их",-1,1),new _("ых",-1,1),new _("ею",-1,1),new _("ою",-1,1),new _("ую",-1,1),new _("юю",-1,1),new _("ая",-1,1),new _("яя",-1,1)],i=[new _("ем",-1,1),new _("нн",-1,1),new _("вш",-1,1),new _("ивш",2,2),new _("ывш",2,2),new _("щ",-1,1),new _("ющ",5,1),new _("ующ",6,2)],o=[new _("сь",-1,1),new _("ся",-1,1)],s=[new _("ла",-1,1),new _("ила",0,2),new _("ыла",0,2),new _("на",-1,1),new _("ена",3,2),new _("ете",-1,1),new _("ите",-1,2),new _("йте",-1,1),new _("ейте",7,2),new _("уйте",7,2),new _("ли",-1,1),new _("или",10,2),new _("ыли",10,2),new _("й",-1,1),new _("ей",13,2),new _("уй",13,2),new _("л",-1,1),new _("ил",16,2),new _("ыл",16,2),new _("ем",-1,1),new _("им",-1,2),new _("ым",-1,2),new _("н",-1,1),new _("ен",22,2),new _("ло",-1,1),new _("ило",24,2),new _("ыло",24,2),new _("но",-1,1),new _("ено",27,2),new _("нно",27,1),new _("ет",-1,1),new _("ует",30,2),new _("ит",-1,2),new _("ыт",-1,2),new _("ют",-1,1),new _("уют",34,2),new _("ят",-1,2),new _("ны",-1,1),new _("ены",37,2),new _("ть",-1,1),new _("ить",39,2),new _("ыть",39,2),new _("ешь",-1,1),new _("ишь",-1,2),new _("ю",-1,2),new _("ую",44,2)],u=[new _("а",-1,1),new _("ев",-1,1),new _("ов",-1,1),new _("е",-1,1),new _("ие",3,1),new _("ье",3,1),new _("и",-1,1),new _("еи",6,1),new _("ии",6,1),new _("ами",6,1),new _("ями",6,1),new _("иями",10,1),new _("й",-1,1),new _("ей",12,1),new _("ией",13,1),new _("ий",12,1),new _("ой",12,1),new _("ам",-1,1),new _("ем",-1,1),new _("ием",18,1),new _("ом",-1,1),new _("ям",-1,1),new _("иям",21,1),new _("о",-1,1),new _("у",-1,1),new _("ах",-1,1),new _("ях",-1,1),new _("иях",26,1),new _("ы",-1,1),new _("ь",-1,1),new _("ю",-1,1),new _("ию",30,1),new _("ью",30,1),new _("я",-1,1),new _("ия",33,1),new _("ья",33,1)],c=[new _("ост",-1,1),new _("ость",-1,1)],m=[new _("ейше",-1,1),new _("н",-1,2),new _("ейш",-1,1),new _("ь",-1,3)],e=[33,65,8,232],l=new b;function f(){for(;!l.in_grouping(e,1072,1103);){if(l.cursor>=l.limit)return;l.cursor++}return 1}function p(){for(;!l.out_grouping(e,1072,1103);){if(l.cursor>=l.limit)return;l.cursor++}return 1}function d(e,n){var r;if(l.ket=l.cursor,e=l.find_among_b(e,n)){switch(l.bra=l.cursor,e){case 1:if(r=l.limit-l.cursor,!l.eq_s_b(1,"а")&&(l.cursor=l.limit-r,!l.eq_s_b(1,"я")))return;case 2:l.slice_del()}return 1}}function a(e,n){return l.ket=l.cursor,(e=l.find_among_b(e,n))&&(l.bra=l.cursor,1==e&&l.slice_del(),1)}this.setCurrent=function(e){l.setCurrent(e)},this.getCurrent=function(){return l.getCurrent()},this.stem=function(){if(r=l.limit,n=r,f()&&(r=l.cursor,p())&&f()&&p()&&(n=l.cursor),l.cursor=l.limit,l.cursor<r)return!1;var e;if(l.limit_backward=r,d(w,9)||(l.cursor=l.limit,a(o,2)||(l.cursor=l.limit),a(t,26)&&(d(i,8),1))||(l.cursor=l.limit,d(s,46))||(l.cursor=l.limit,a(u,36)),l.cursor=l.limit,l.ket=l.cursor,l.eq_s_b(1,"и")?(l.bra=l.cursor,l.slice_del()):l.cursor=l.limit,l.ket=l.cursor,(e=l.find_among_b(c,2))&&(l.bra=l.cursor,n<=l.cursor)&&1==e&&l.slice_del(),l.cursor=l.limit,l.ket=l.cursor,e=l.find_among_b(m,4))switch(l.bra=l.cursor,e){case 1:if(l.slice_del(),l.ket=l.cursor,!l.eq_s_b(1,"н"))break;l.bra=l.cursor;case 2:if(!l.eq_s_b(1,"н"))break;case 3:l.slice_del()}return!0}},function(e){return r.setCurrent(e),r.stem(),r.getCurrent()}),n.Pipeline.registerFunction(n.ru.stemmer,"stemmer-ru"),n.ru.stopWordFilter=function(e){if(-1===n.ru.stopWordFilter.stopWords.indexOf(e))return e},n.ru.stopWordFilter.stopWords=new n.SortedSet,n.ru.stopWordFilter.stopWords.length=422,n.ru.stopWordFilter.stopWords.elements=" алло без близко более больше будем будет будете будешь будто буду будут будь бы бывает бывь был была были было быть в важная важное важные важный вам вами вас ваш ваша ваше ваши вверх вдали вдруг ведь везде весь вниз внизу во вокруг вон восемнадцатый восемнадцать восемь восьмой вот впрочем времени время все всегда всего всем всеми всему всех всею всю всюду вся всё второй вы г где говорил говорит год года году да давно даже далеко дальше даром два двадцатый двадцать две двенадцатый двенадцать двух девятнадцатый девятнадцать девятый девять действительно дел день десятый десять для до довольно долго должно другая другие других друго другое другой е его ее ей ему если есть еще ещё ею её ж же жизнь за занят занята занято заняты затем зато зачем здесь значит и из или им именно иметь ими имя иногда их к каждая каждое каждые каждый кажется как какая какой кем когда кого ком кому конечно которая которого которой которые который которых кроме кругом кто куда лет ли лишь лучше люди м мало между меля менее меньше меня миллионов мимо мира мне много многочисленная многочисленное многочисленные многочисленный мной мною мог могут мож может можно можхо мои мой мор мочь моя моё мы на наверху над надо назад наиболее наконец нам нами нас начала наш наша наше наши не него недавно недалеко нее ней нельзя нем немного нему непрерывно нередко несколько нет нею неё ни нибудь ниже низко никогда никуда ними них ничего но ну нужно нх о об оба обычно один одиннадцатый одиннадцать однажды однако одного одной около он она они оно опять особенно от отовсюду отсюда очень первый перед по под пожалуйста позже пока пор пора после посреди потом потому почему почти прекрасно при про просто против процентов пятнадцатый пятнадцать пятый пять раз разве рано раньше рядом с сам сама сами самим самими самих само самого самой самом самому саму свое своего своей свои своих свою сеаой себе себя сегодня седьмой сейчас семнадцатый семнадцать семь сих сказал сказала сказать сколько слишком сначала снова со собой собою совсем спасибо стал суть т та так такая также такие такое такой там твой твоя твоё те тебе тебя тем теми теперь тех то тобой тобою тогда того тоже только том тому тот тою третий три тринадцатый тринадцать ту туда тут ты тысяч у уж уже уметь хорошо хотеть хоть хотя хочешь часто чаще чего человек чем чему через четвертый четыре четырнадцатый четырнадцать что чтоб чтобы чуть шестнадцатый шестнадцать шестой шесть эта эти этим этими этих это этого этой этом этому этот эту я \ufeffа".split(" "),n.Pipeline.registerFunction(n.ru.stopWordFilter,"stopWordFilter-ru")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.sv.js b/themes/tabi-lean/static/js/lunr/lunr.sv.js new file mode 100644 index 0000000..2e1c20e --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.sv.js @@ -0,0 +1,252 @@ +/*! + * Lunr languages, `Swedish` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.sv = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.sv.trimmer, + lunr.sv.stopWordFilter, + lunr.sv.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.sv.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.sv.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.sv.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.sv.trimmer, 'trimmer-sv'); + + /* lunr stemmer function */ + lunr.sv.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function SwedishStemmer() { + var a_0 = [new Among("a", -1, 1), new Among("arna", 0, 1), + new Among("erna", 0, 1), new Among("heterna", 2, 1), + new Among("orna", 0, 1), new Among("ad", -1, 1), + new Among("e", -1, 1), new Among("ade", 6, 1), + new Among("ande", 6, 1), new Among("arne", 6, 1), + new Among("are", 6, 1), new Among("aste", 6, 1), + new Among("en", -1, 1), new Among("anden", 12, 1), + new Among("aren", 12, 1), new Among("heten", 12, 1), + new Among("ern", -1, 1), new Among("ar", -1, 1), + new Among("er", -1, 1), new Among("heter", 18, 1), + new Among("or", -1, 1), new Among("s", -1, 2), + new Among("as", 21, 1), new Among("arnas", 22, 1), + new Among("ernas", 22, 1), new Among("ornas", 22, 1), + new Among("es", 21, 1), new Among("ades", 26, 1), + new Among("andes", 26, 1), new Among("ens", 21, 1), + new Among("arens", 29, 1), new Among("hetens", 29, 1), + new Among("erns", 21, 1), new Among("at", -1, 1), + new Among("andet", -1, 1), new Among("het", -1, 1), + new Among("ast", -1, 1) + ], + a_1 = [new Among("dd", -1, -1), + new Among("gd", -1, -1), new Among("nn", -1, -1), + new Among("dt", -1, -1), new Among("gt", -1, -1), + new Among("kt", -1, -1), new Among("tt", -1, -1) + ], + a_2 = [ + new Among("ig", -1, 1), new Among("lig", 0, 1), + new Among("els", -1, 1), new Among("fullt", -1, 3), + new Among("l\u00F6st", -1, 2) + ], + g_v = [17, 65, 16, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32 + ], + g_s_ending = [119, 127, 149], + I_x, I_p1, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function r_mark_regions() { + var v_1, c = sbp.cursor + 3; + I_p1 = sbp.limit; + if (0 <= c || c <= sbp.limit) { + I_x = c; + while (true) { + v_1 = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 246)) { + sbp.cursor = v_1; + break; + } + sbp.cursor = v_1; + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 246)) { + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + } + I_p1 = sbp.cursor; + if (I_p1 < I_x) + I_p1 = I_x; + } + } + + function r_main_suffix() { + var among_var, v_2 = sbp.limit_backward; + if (sbp.cursor >= I_p1) { + sbp.limit_backward = I_p1; + sbp.cursor = sbp.limit; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_0, 37); + sbp.limit_backward = v_2; + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_del(); + break; + case 2: + if (sbp.in_grouping_b(g_s_ending, 98, 121)) + sbp.slice_del(); + break; + } + } + } + } + + function r_consonant_pair() { + var v_1 = sbp.limit_backward; + if (sbp.cursor >= I_p1) { + sbp.limit_backward = I_p1; + sbp.cursor = sbp.limit; + if (sbp.find_among_b(a_1, 7)) { + sbp.cursor = sbp.limit; + sbp.ket = sbp.cursor; + if (sbp.cursor > sbp.limit_backward) { + sbp.bra = --sbp.cursor; + sbp.slice_del(); + } + } + sbp.limit_backward = v_1; + } + } + + function r_other_suffix() { + var among_var, v_2; + if (sbp.cursor >= I_p1) { + v_2 = sbp.limit_backward; + sbp.limit_backward = I_p1; + sbp.cursor = sbp.limit; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_2, 5); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_del(); + break; + case 2: + sbp.slice_from("l\u00F6s"); + break; + case 3: + sbp.slice_from("full"); + break; + } + } + sbp.limit_backward = v_2; + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_main_suffix(); + sbp.cursor = sbp.limit; + r_consonant_pair(); + sbp.cursor = sbp.limit; + r_other_suffix(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.sv.stemmer, 'stemmer-sv'); + + /* stop word filter function */ + lunr.sv.stopWordFilter = function(token) { + if (lunr.sv.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.sv.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.sv.stopWordFilter.stopWords.length = 115; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.sv.stopWordFilter.stopWords.elements = ' alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över'.split(' '); + + lunr.Pipeline.registerFunction(lunr.sv.stopWordFilter, 'stopWordFilter-sv'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.sv.min.js b/themes/tabi-lean/static/js/lunr/lunr.sv.min.js new file mode 100644 index 0000000..1e5c7a3 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.sv.min.js @@ -0,0 +1 @@ +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,d,n;r.sv=function(){this.pipeline.reset(),this.pipeline.add(r.sv.trimmer,r.sv.stopWordFilter,r.sv.stemmer)},r.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.sv.trimmer=r.trimmerSupport.generateTrimmer(r.sv.wordCharacters),r.Pipeline.registerFunction(r.sv.trimmer,"trimmer-sv"),r.sv.stemmer=(e=r.stemmerSupport.Among,d=r.stemmerSupport.SnowballProgram,n=new function(){var n,t,i=[new e("a",-1,1),new e("arna",0,1),new e("erna",0,1),new e("heterna",2,1),new e("orna",0,1),new e("ad",-1,1),new e("e",-1,1),new e("ade",6,1),new e("ande",6,1),new e("arne",6,1),new e("are",6,1),new e("aste",6,1),new e("en",-1,1),new e("anden",12,1),new e("aren",12,1),new e("heten",12,1),new e("ern",-1,1),new e("ar",-1,1),new e("er",-1,1),new e("heter",18,1),new e("or",-1,1),new e("s",-1,2),new e("as",21,1),new e("arnas",22,1),new e("ernas",22,1),new e("ornas",22,1),new e("es",21,1),new e("ades",26,1),new e("andes",26,1),new e("ens",21,1),new e("arens",29,1),new e("hetens",29,1),new e("erns",21,1),new e("at",-1,1),new e("andet",-1,1),new e("het",-1,1),new e("ast",-1,1)],s=[new e("dd",-1,-1),new e("gd",-1,-1),new e("nn",-1,-1),new e("dt",-1,-1),new e("gt",-1,-1),new e("kt",-1,-1),new e("tt",-1,-1)],a=[new e("ig",-1,1),new e("lig",0,1),new e("els",-1,1),new e("fullt",-1,3),new e("löst",-1,2)],o=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],u=[119,127,149],l=new d;this.setCurrent=function(e){l.setCurrent(e)},this.getCurrent=function(){return l.getCurrent()},this.stem=function(){var e=l.cursor;!function(){var e,r=l.cursor+3;if(t=l.limit,0<=r||r<=l.limit){for(n=r;;){if(e=l.cursor,l.in_grouping(o,97,246)){l.cursor=e;break}if(l.cursor=e,l.cursor>=l.limit)return;l.cursor++}for(;!l.out_grouping(o,97,246);){if(l.cursor>=l.limit)return;l.cursor++}(t=l.cursor)<n&&(t=n)}}(),l.limit_backward=e,l.cursor=l.limit;var r,e=l.limit_backward;if(l.cursor>=t&&(l.limit_backward=t,l.cursor=l.limit,l.ket=l.cursor,r=l.find_among_b(i,37),l.limit_backward=e,r))switch(l.bra=l.cursor,r){case 1:l.slice_del();break;case 2:l.in_grouping_b(u,98,121)&&l.slice_del()}if(l.cursor=l.limit,e=l.limit_backward,l.cursor>=t&&(l.limit_backward=t,l.cursor=l.limit,l.find_among_b(s,7)&&(l.cursor=l.limit,l.ket=l.cursor,l.cursor>l.limit_backward)&&(l.bra=--l.cursor,l.slice_del()),l.limit_backward=e),l.cursor=l.limit,l.cursor>=t){if(r=l.limit_backward,l.limit_backward=t,l.cursor=l.limit,l.ket=l.cursor,e=l.find_among_b(a,5))switch(l.bra=l.cursor,e){case 1:l.slice_del();break;case 2:l.slice_from("lös");break;case 3:l.slice_from("full")}l.limit_backward=r}return!0}},function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}),r.Pipeline.registerFunction(r.sv.stemmer,"stemmer-sv"),r.sv.stopWordFilter=function(e){if(-1===r.sv.stopWordFilter.stopWords.indexOf(e))return e},r.sv.stopWordFilter.stopWords=new r.SortedSet,r.sv.stopWordFilter.stopWords.length=115,r.sv.stopWordFilter.stopWords.elements=" alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" "),r.Pipeline.registerFunction(r.sv.stopWordFilter,"stopWordFilter-sv")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunr.tr.js b/themes/tabi-lean/static/js/lunr/lunr.tr.js new file mode 100644 index 0000000..ccecfad --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.tr.js @@ -0,0 +1,1070 @@ +/*! + * Lunr languages, `Turkish` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.tr = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.tr.trimmer, + lunr.tr.stopWordFilter, + lunr.tr.stemmer + ); + }; + + /* lunr trimmer function */ + lunr.tr.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.tr.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.tr.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.tr.trimmer, 'trimmer-tr'); + + /* lunr stemmer function */ + lunr.tr.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function TurkishStemmer() { + var a_0 = [new Among("m", -1, -1), new Among("n", -1, -1), + new Among("miz", -1, -1), new Among("niz", -1, -1), + new Among("muz", -1, -1), new Among("nuz", -1, -1), + new Among("m\u00FCz", -1, -1), new Among("n\u00FCz", -1, -1), + new Among("m\u0131z", -1, -1), new Among("n\u0131z", -1, -1) + ], + a_1 = [ + new Among("leri", -1, -1), new Among("lar\u0131", -1, -1) + ], + a_2 = [ + new Among("ni", -1, -1), new Among("nu", -1, -1), + new Among("n\u00FC", -1, -1), new Among("n\u0131", -1, -1) + ], + a_3 = [ + new Among("in", -1, -1), new Among("un", -1, -1), + new Among("\u00FCn", -1, -1), new Among("\u0131n", -1, -1) + ], + a_4 = [ + new Among("a", -1, -1), new Among("e", -1, -1) + ], + a_5 = [ + new Among("na", -1, -1), new Among("ne", -1, -1) + ], + a_6 = [ + new Among("da", -1, -1), new Among("ta", -1, -1), + new Among("de", -1, -1), new Among("te", -1, -1) + ], + a_7 = [ + new Among("nda", -1, -1), new Among("nde", -1, -1) + ], + a_8 = [ + new Among("dan", -1, -1), new Among("tan", -1, -1), + new Among("den", -1, -1), new Among("ten", -1, -1) + ], + a_9 = [ + new Among("ndan", -1, -1), new Among("nden", -1, -1) + ], + a_10 = [ + new Among("la", -1, -1), new Among("le", -1, -1) + ], + a_11 = [ + new Among("ca", -1, -1), new Among("ce", -1, -1) + ], + a_12 = [ + new Among("im", -1, -1), new Among("um", -1, -1), + new Among("\u00FCm", -1, -1), new Among("\u0131m", -1, -1) + ], + a_13 = [ + new Among("sin", -1, -1), new Among("sun", -1, -1), + new Among("s\u00FCn", -1, -1), new Among("s\u0131n", -1, -1) + ], + a_14 = [ + new Among("iz", -1, -1), new Among("uz", -1, -1), + new Among("\u00FCz", -1, -1), new Among("\u0131z", -1, -1) + ], + a_15 = [ + new Among("siniz", -1, -1), new Among("sunuz", -1, -1), + new Among("s\u00FCn\u00FCz", -1, -1), + new Among("s\u0131n\u0131z", -1, -1) + ], + a_16 = [ + new Among("lar", -1, -1), new Among("ler", -1, -1) + ], + a_17 = [ + new Among("niz", -1, -1), new Among("nuz", -1, -1), + new Among("n\u00FCz", -1, -1), new Among("n\u0131z", -1, -1) + ], + a_18 = [ + new Among("dir", -1, -1), new Among("tir", -1, -1), + new Among("dur", -1, -1), new Among("tur", -1, -1), + new Among("d\u00FCr", -1, -1), new Among("t\u00FCr", -1, -1), + new Among("d\u0131r", -1, -1), new Among("t\u0131r", -1, -1) + ], + a_19 = [ + new Among("cas\u0131na", -1, -1), new Among("cesine", -1, -1) + ], + a_20 = [ + new Among("di", -1, -1), new Among("ti", -1, -1), + new Among("dik", -1, -1), new Among("tik", -1, -1), + new Among("duk", -1, -1), new Among("tuk", -1, -1), + new Among("d\u00FCk", -1, -1), new Among("t\u00FCk", -1, -1), + new Among("d\u0131k", -1, -1), new Among("t\u0131k", -1, -1), + new Among("dim", -1, -1), new Among("tim", -1, -1), + new Among("dum", -1, -1), new Among("tum", -1, -1), + new Among("d\u00FCm", -1, -1), new Among("t\u00FCm", -1, -1), + new Among("d\u0131m", -1, -1), new Among("t\u0131m", -1, -1), + new Among("din", -1, -1), new Among("tin", -1, -1), + new Among("dun", -1, -1), new Among("tun", -1, -1), + new Among("d\u00FCn", -1, -1), new Among("t\u00FCn", -1, -1), + new Among("d\u0131n", -1, -1), new Among("t\u0131n", -1, -1), + new Among("du", -1, -1), new Among("tu", -1, -1), + new Among("d\u00FC", -1, -1), new Among("t\u00FC", -1, -1), + new Among("d\u0131", -1, -1), new Among("t\u0131", -1, -1) + ], + a_21 = [ + new Among("sa", -1, -1), new Among("se", -1, -1), + new Among("sak", -1, -1), new Among("sek", -1, -1), + new Among("sam", -1, -1), new Among("sem", -1, -1), + new Among("san", -1, -1), new Among("sen", -1, -1) + ], + a_22 = [ + new Among("mi\u015F", -1, -1), new Among("mu\u015F", -1, -1), + new Among("m\u00FC\u015F", -1, -1), + new Among("m\u0131\u015F", -1, -1) + ], + a_23 = [new Among("b", -1, 1), + new Among("c", -1, 2), new Among("d", -1, 3), + new Among("\u011F", -1, 4) + ], + g_vowel = [17, 65, 16, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 8, 0, 0, 0, 0, 0, 0, 1 + ], + g_U = [ + 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 0, 0, 0, 1 + ], + g_vowel1 = [1, 64, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 + ], + g_vowel2 = [17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130 + ], + g_vowel3 = [1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1 + ], + g_vowel4 = [17], + g_vowel5 = [65], + g_vowel6 = [65], + B_c_s_n_s, I_strlen, g_habr = [ + ["a", g_vowel1, 97, 305], + ["e", g_vowel2, 101, 252], + ["\u0131", g_vowel3, 97, 305], + ["i", g_vowel4, 101, 105], + ["o", g_vowel5, 111, 117], + ["\u00F6", g_vowel6, 246, 252], + ["u", g_vowel5, 111, 117] + ], + sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function habr1(g_v, n1, n2) { + while (true) { + var v_1 = sbp.limit - sbp.cursor; + if (sbp.in_grouping_b(g_v, n1, n2)) { + sbp.cursor = sbp.limit - v_1; + break; + } + sbp.cursor = sbp.limit - v_1; + if (sbp.cursor <= sbp.limit_backward) + return false; + sbp.cursor--; + } + return true; + } + + function r_check_vowel_harmony() { + var v_1, v_2; + v_1 = sbp.limit - sbp.cursor; + habr1(g_vowel, 97, 305); + for (var i = 0; i < g_habr.length; i++) { + v_2 = sbp.limit - sbp.cursor; + var habr = g_habr[i]; + if (sbp.eq_s_b(1, habr[0]) && habr1(habr[1], habr[2], habr[3])) { + sbp.cursor = sbp.limit - v_1; + return true; + } + sbp.cursor = sbp.limit - v_2; + } + sbp.cursor = sbp.limit - v_2; + if (!sbp.eq_s_b(1, "\u00FC") || !habr1(g_vowel6, 246, 252)) + return false; + sbp.cursor = sbp.limit - v_1; + return true; + } + + function habr2(f1, f2) { + var v_1 = sbp.limit - sbp.cursor, + v_2; + if (f1()) { + sbp.cursor = sbp.limit - v_1; + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + v_2 = sbp.limit - sbp.cursor; + if (f2()) { + sbp.cursor = sbp.limit - v_2; + return true; + } + } + } + sbp.cursor = sbp.limit - v_1; + if (f1()) { + sbp.cursor = sbp.limit - v_1; + return false; + } + sbp.cursor = sbp.limit - v_1; + if (sbp.cursor <= sbp.limit_backward) + return false; + sbp.cursor--; + if (!f2()) + return false; + sbp.cursor = sbp.limit - v_1; + return true; + } + + function habr3(f1) { + return habr2(f1, function() { + return sbp.in_grouping_b(g_vowel, 97, 305); + }); + } + + function r_mark_suffix_with_optional_n_consonant() { + return habr3(function() { + return sbp.eq_s_b(1, "n"); + }); + } + + function r_mark_suffix_with_optional_s_consonant() { + return habr3(function() { + return sbp.eq_s_b(1, "s"); + }); + } + + function r_mark_suffix_with_optional_y_consonant() { + return habr3(function() { + return sbp.eq_s_b(1, "y"); + }); + } + + function r_mark_suffix_with_optional_U_vowel() { + return habr2(function() { + return sbp.in_grouping_b(g_U, 105, 305); + }, function() { + return sbp.out_grouping_b(g_vowel, 97, 305); + }); + } + + function r_mark_possessives() { + return sbp.find_among_b(a_0, 10) && r_mark_suffix_with_optional_U_vowel(); + } + + function r_mark_sU() { + return r_check_vowel_harmony() && sbp.in_grouping_b(g_U, 105, 305) && r_mark_suffix_with_optional_s_consonant(); + } + + function r_mark_lArI() { + return sbp.find_among_b(a_1, 2); + } + + function r_mark_yU() { + return r_check_vowel_harmony() && sbp.in_grouping_b(g_U, 105, 305) && r_mark_suffix_with_optional_y_consonant(); + } + + function r_mark_nU() { + return r_check_vowel_harmony() && sbp.find_among_b(a_2, 4); + } + + function r_mark_nUn() { + return r_check_vowel_harmony() && sbp.find_among_b(a_3, 4) && r_mark_suffix_with_optional_n_consonant(); + } + + function r_mark_yA() { + return r_check_vowel_harmony() && sbp.find_among_b(a_4, 2) && r_mark_suffix_with_optional_y_consonant(); + } + + function r_mark_nA() { + return r_check_vowel_harmony() && sbp.find_among_b(a_5, 2); + } + + function r_mark_DA() { + return r_check_vowel_harmony() && sbp.find_among_b(a_6, 4); + } + + function r_mark_ndA() { + return r_check_vowel_harmony() && sbp.find_among_b(a_7, 2); + } + + function r_mark_DAn() { + return r_check_vowel_harmony() && sbp.find_among_b(a_8, 4); + } + + function r_mark_ndAn() { + return r_check_vowel_harmony() && sbp.find_among_b(a_9, 2); + } + + function r_mark_ylA() { + return r_check_vowel_harmony() && sbp.find_among_b(a_10, 2) && r_mark_suffix_with_optional_y_consonant(); + } + + function r_mark_ki() { + return sbp.eq_s_b(2, "ki"); + } + + function r_mark_ncA() { + return r_check_vowel_harmony() && sbp.find_among_b(a_11, 2) && r_mark_suffix_with_optional_n_consonant(); + } + + function r_mark_yUm() { + return r_check_vowel_harmony() && sbp.find_among_b(a_12, 4) && r_mark_suffix_with_optional_y_consonant(); + } + + function r_mark_sUn() { + return r_check_vowel_harmony() && sbp.find_among_b(a_13, 4); + } + + function r_mark_yUz() { + return r_check_vowel_harmony() && sbp.find_among_b(a_14, 4) && r_mark_suffix_with_optional_y_consonant(); + } + + function r_mark_sUnUz() { + return sbp.find_among_b(a_15, 4); + } + + function r_mark_lAr() { + return r_check_vowel_harmony() && sbp.find_among_b(a_16, 2); + } + + function r_mark_nUz() { + return r_check_vowel_harmony() && sbp.find_among_b(a_17, 4); + } + + function r_mark_DUr() { + return r_check_vowel_harmony() && sbp.find_among_b(a_18, 8); + } + + function r_mark_cAsInA() { + return sbp.find_among_b(a_19, 2); + } + + function r_mark_yDU() { + return r_check_vowel_harmony() && sbp.find_among_b(a_20, 32) && r_mark_suffix_with_optional_y_consonant(); + } + + function r_mark_ysA() { + return sbp.find_among_b(a_21, 8) && r_mark_suffix_with_optional_y_consonant(); + } + + function r_mark_ymUs_() { + return r_check_vowel_harmony() && sbp.find_among_b(a_22, 4) && r_mark_suffix_with_optional_y_consonant(); + } + + function r_mark_yken() { + return sbp.eq_s_b(3, "ken") && r_mark_suffix_with_optional_y_consonant(); + } + + function habr4() { + var v_1 = sbp.limit - sbp.cursor; + if (!r_mark_ymUs_()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_yDU()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_ysA()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_yken()) + return true; + } + } + } + return false; + } + + function habr5() { + if (r_mark_cAsInA()) { + var v_1 = sbp.limit - sbp.cursor; + if (!r_mark_sUnUz()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_lAr()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_yUm()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_sUn()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_yUz()) + sbp.cursor = sbp.limit - v_1; + } + } + } + } + if (r_mark_ymUs_()) + return false; + } + return true; + } + + function habr6() { + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + var v_1 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (!r_mark_DUr()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_yDU()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_ysA()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_ymUs_()) + sbp.cursor = sbp.limit - v_1; + } + } + } + B_c_s_n_s = false; + return false; + } + return true; + } + + function habr7() { + if (!r_mark_nUz()) + return true; + var v_1 = sbp.limit - sbp.cursor; + if (!r_mark_yDU()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_ysA()) + return true; + } + return false; + } + + function habr8() { + var v_1 = sbp.limit - sbp.cursor, + v_2; + if (!r_mark_sUnUz()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_yUz()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_sUn()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_yUm()) + return true; + } + } + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + v_2 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (!r_mark_ymUs_()) + sbp.cursor = sbp.limit - v_2; + return false; + } + + function r_stem_nominal_verb_suffixes() { + var v_1 = sbp.limit - sbp.cursor, + v_2; + sbp.ket = sbp.cursor; + B_c_s_n_s = true; + if (habr4()) { + sbp.cursor = sbp.limit - v_1; + if (habr5()) { + sbp.cursor = sbp.limit - v_1; + if (habr6()) { + sbp.cursor = sbp.limit - v_1; + if (habr7()) { + sbp.cursor = sbp.limit - v_1; + if (habr8()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_DUr()) + return; + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + v_2 = sbp.limit - sbp.cursor; + if (!r_mark_sUnUz()) { + sbp.cursor = sbp.limit - v_2; + if (!r_mark_lAr()) { + sbp.cursor = sbp.limit - v_2; + if (!r_mark_yUm()) { + sbp.cursor = sbp.limit - v_2; + if (!r_mark_sUn()) { + sbp.cursor = sbp.limit - v_2; + if (!r_mark_yUz()) + sbp.cursor = sbp.limit - v_2; + } + } + } + } + if (!r_mark_ymUs_()) + sbp.cursor = sbp.limit - v_2; + } + } + } + } + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + } + + function r_stem_suffix_chain_before_ki() { + var v_1, v_2, v_3, v_4; + sbp.ket = sbp.cursor; + if (r_mark_ki()) { + v_1 = sbp.limit - sbp.cursor; + if (r_mark_DA()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + v_2 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } else { + sbp.cursor = sbp.limit - v_2; + if (r_mark_possessives()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } + } + } + return true; + } + sbp.cursor = sbp.limit - v_1; + if (r_mark_nUn()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + v_3 = sbp.limit - sbp.cursor; + if (r_mark_lArI()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + } else { + sbp.cursor = sbp.limit - v_3; + sbp.ket = sbp.cursor; + if (!r_mark_possessives()) { + sbp.cursor = sbp.limit - v_3; + if (!r_mark_sU()) { + sbp.cursor = sbp.limit - v_3; + if (!r_stem_suffix_chain_before_ki()) + return true; + } + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki() + } + } + return true; + } + sbp.cursor = sbp.limit - v_1; + if (r_mark_ndA()) { + v_4 = sbp.limit - sbp.cursor; + if (r_mark_lArI()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + } else { + sbp.cursor = sbp.limit - v_4; + if (r_mark_sU()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } + } else { + sbp.cursor = sbp.limit - v_4; + if (!r_stem_suffix_chain_before_ki()) + return false; + } + } + return true; + } + } + return false; + } + + function habr9(v_1) { + sbp.ket = sbp.cursor; + if (!r_mark_ndA()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_nA()) + return false; + } + var v_2 = sbp.limit - sbp.cursor; + if (r_mark_lArI()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + } else { + sbp.cursor = sbp.limit - v_2; + if (r_mark_sU()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } + } else { + sbp.cursor = sbp.limit - v_2; + if (!r_stem_suffix_chain_before_ki()) + return false; + } + } + return true; + } + + function habr10(v_1) { + sbp.ket = sbp.cursor; + if (!r_mark_ndAn()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_nU()) + return false; + } + var v_2 = sbp.limit - sbp.cursor; + if (!r_mark_sU()) { + sbp.cursor = sbp.limit - v_2; + if (!r_mark_lArI()) + return false; + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } + return true; + } + + function habr11() { + var v_1 = sbp.limit - sbp.cursor, + v_2; + sbp.ket = sbp.cursor; + if (!r_mark_nUn()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_ylA()) + return false; + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + v_2 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + if (r_stem_suffix_chain_before_ki()) + return true; + } + sbp.cursor = sbp.limit - v_2; + sbp.ket = sbp.cursor; + if (!r_mark_possessives()) { + sbp.cursor = sbp.limit - v_2; + if (!r_mark_sU()) { + sbp.cursor = sbp.limit - v_2; + if (!r_stem_suffix_chain_before_ki()) + return true; + } + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } + return true; + } + + function habr12() { + var v_1 = sbp.limit - sbp.cursor, + v_2, v_3; + sbp.ket = sbp.cursor; + if (!r_mark_DA()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_yU()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_yA()) + return false; + } + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + v_2 = sbp.limit - sbp.cursor; + if (r_mark_possessives()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + v_3 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (!r_mark_lAr()) + sbp.cursor = sbp.limit - v_3; + } else { + sbp.cursor = sbp.limit - v_2; + if (!r_mark_lAr()) + return true; + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + r_stem_suffix_chain_before_ki(); + return true; + } + + function r_stem_noun_suffixes() { + var v_1 = sbp.limit - sbp.cursor, + v_2, v_3; + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + return; + } + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + if (r_mark_ncA()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + v_2 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (r_mark_lArI()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + } else { + sbp.cursor = sbp.limit - v_2; + sbp.ket = sbp.cursor; + if (!r_mark_possessives()) { + sbp.cursor = sbp.limit - v_2; + if (!r_mark_sU()) { + sbp.cursor = sbp.limit - v_2; + sbp.ket = sbp.cursor; + if (!r_mark_lAr()) + return; + sbp.bra = sbp.cursor; + sbp.slice_del(); + if (!r_stem_suffix_chain_before_ki()) + return; + } + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } + } + return; + } + sbp.cursor = sbp.limit - v_1; + if (habr9(v_1)) + return; + sbp.cursor = sbp.limit - v_1; + if (habr10(v_1)) + return; + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + if (r_mark_DAn()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + v_3 = sbp.limit - sbp.cursor; + if (r_mark_possessives()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } + } else { + sbp.cursor = sbp.limit - v_3; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } else { + sbp.cursor = sbp.limit - v_3; + r_stem_suffix_chain_before_ki(); + } + } + return; + } + sbp.cursor = sbp.limit - v_1; + if (habr11()) + return; + sbp.cursor = sbp.limit - v_1; + if (r_mark_lArI()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + return; + } + sbp.cursor = sbp.limit - v_1; + if (r_stem_suffix_chain_before_ki()) + return; + sbp.cursor = sbp.limit - v_1; + if (habr12()) + return; + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + if (!r_mark_possessives()) { + sbp.cursor = sbp.limit - v_1; + if (!r_mark_sU()) + return; + } + sbp.bra = sbp.cursor; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (r_mark_lAr()) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + r_stem_suffix_chain_before_ki(); + } + } + + function r_post_process_last_consonants() { + var among_var; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_23, 4); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("p"); + break; + case 2: + sbp.slice_from("\u00E7"); + break; + case 3: + sbp.slice_from("t"); + break; + case 4: + sbp.slice_from("k"); + break; + } + } + } + + function habr13() { + while (true) { + var v_1 = sbp.limit - sbp.cursor; + if (sbp.in_grouping_b(g_vowel, 97, 305)) { + sbp.cursor = sbp.limit - v_1; + break; + } + sbp.cursor = sbp.limit - v_1; + if (sbp.cursor <= sbp.limit_backward) + return false; + sbp.cursor--; + } + return true; + } + + function habr14(v_1, c1, c2) { + sbp.cursor = sbp.limit - v_1; + if (habr13()) { + var v_2 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, c1)) { + sbp.cursor = sbp.limit - v_2; + if (!sbp.eq_s_b(1, c2)) + return true; + } + sbp.cursor = sbp.limit - v_1; + var c = sbp.cursor; + sbp.insert(sbp.cursor, sbp.cursor, c2); + sbp.cursor = c; + return false; + } + return true; + } + + function r_append_U_to_stems_ending_with_d_or_g() { + var v_1 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "d")) { + sbp.cursor = sbp.limit - v_1; + if (!sbp.eq_s_b(1, "g")) + return; + } + if (habr14(v_1, "a", "\u0131")) + if (habr14(v_1, "e", "i")) + if (habr14(v_1, "o", "u")) + habr14(v_1, "\u00F6", "\u00FC") + } + + function r_more_than_one_syllable_word() { + var v_1 = sbp.cursor, + v_2 = 2, + v_3; + while (true) { + v_3 = sbp.cursor; + while (!sbp.in_grouping(g_vowel, 97, 305)) { + if (sbp.cursor >= sbp.limit) { + sbp.cursor = v_3; + if (v_2 > 0) + return false; + sbp.cursor = v_1; + return true; + } + sbp.cursor++; + } + v_2--; + } + } + + function habr15(v_1, n1, c1) { + while (!sbp.eq_s(n1, c1)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + I_strlen = n1; + if (I_strlen != sbp.limit) + return true; + sbp.cursor = v_1; + return false; + } + + function r_is_reserved_word() { + var v_1 = sbp.cursor; + if (habr15(v_1, 2, "ad")) { + sbp.cursor = v_1; + if (habr15(v_1, 5, "soyad")) + return false; + } + return true; + } + + function r_postlude() { + var v_1 = sbp.cursor; + if (r_is_reserved_word()) + return false; + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + r_append_U_to_stems_ending_with_d_or_g(); + sbp.cursor = sbp.limit; + r_post_process_last_consonants(); + return true; + } + this.stem = function() { + if (r_more_than_one_syllable_word()) { + sbp.limit_backward = sbp.cursor; + sbp.cursor = sbp.limit; + r_stem_nominal_verb_suffixes(); + sbp.cursor = sbp.limit; + if (B_c_s_n_s) { + r_stem_noun_suffixes(); + sbp.cursor = sbp.limit_backward; + if (r_postlude()) + return true; + } + } + return false; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + } + })(); + + lunr.Pipeline.registerFunction(lunr.tr.stemmer, 'stemmer-tr'); + + /* stop word filter function */ + lunr.tr.stopWordFilter = function(token) { + if (lunr.tr.stopWordFilter.stopWords.indexOf(token) === -1) { + return token; + } + }; + + lunr.tr.stopWordFilter.stopWords = new lunr.SortedSet(); + lunr.tr.stopWordFilter.stopWords.length = 210; + + // The space at the beginning is crucial: It marks the empty string + // as a stop word. lunr.js crashes during search when documents + // processed by the pipeline still contain the empty string. + lunr.tr.stopWordFilter.stopWords.elements = ' acaba altmış altı ama ancak arada aslında ayrıca bana bazı belki ben benden beni benim beri beş bile bin bir biri birkaç birkez birçok birşey birşeyi biz bizden bize bizi bizim bu buna bunda bundan bunlar bunları bunların bunu bunun burada böyle böylece da daha dahi de defa değil diye diğer doksan dokuz dolayı dolayısıyla dört edecek eden ederek edilecek ediliyor edilmesi ediyor elli en etmesi etti ettiği ettiğini eğer gibi göre halen hangi hatta hem henüz hep hepsi her herhangi herkesin hiç hiçbir iki ile ilgili ise itibaren itibariyle için işte kadar karşın katrilyon kendi kendilerine kendini kendisi kendisine kendisini kez ki kim kimden kime kimi kimse kırk milyar milyon mu mü mı nasıl ne neden nedenle nerde nerede nereye niye niçin o olan olarak oldu olduklarını olduğu olduğunu olmadı olmadığı olmak olması olmayan olmaz olsa olsun olup olur olursa oluyor on ona ondan onlar onlardan onları onların onu onun otuz oysa pek rağmen sadece sanki sekiz seksen sen senden seni senin siz sizden sizi sizin tarafından trilyon tüm var vardı ve veya ya yani yapacak yapmak yaptı yaptıkları yaptığı yaptığını yapılan yapılması yapıyor yedi yerine yetmiş yine yirmi yoksa yüz zaten çok çünkü öyle üzere üç şey şeyden şeyi şeyler şu şuna şunda şundan şunları şunu şöyle'.split(' '); + + lunr.Pipeline.registerFunction(lunr.tr.stopWordFilter, 'stopWordFilter-tr'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.tr.min.js b/themes/tabi-lean/static/js/lunr/lunr.tr.min.js new file mode 100644 index 0000000..c2d8fb6 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.tr.min.js @@ -0,0 +1 @@ +!function(r,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(r.lunr)}(this,(function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var i,e,n;r.tr=function(){this.pipeline.reset(),this.pipeline.add(r.tr.trimmer,r.tr.stopWordFilter,r.tr.stemmer)},r.tr.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.tr.trimmer=r.trimmerSupport.generateTrimmer(r.tr.wordCharacters),r.Pipeline.registerFunction(r.tr.trimmer,"trimmer-tr"),r.tr.stemmer=(i=r.stemmerSupport.Among,e=r.stemmerSupport.SnowballProgram,n=new function(){var r,n=[new i("m",-1,-1),new i("n",-1,-1),new i("miz",-1,-1),new i("niz",-1,-1),new i("muz",-1,-1),new i("nuz",-1,-1),new i("müz",-1,-1),new i("nüz",-1,-1),new i("mız",-1,-1),new i("nız",-1,-1)],t=[new i("leri",-1,-1),new i("ları",-1,-1)],u=[new i("ni",-1,-1),new i("nu",-1,-1),new i("nü",-1,-1),new i("nı",-1,-1)],o=[new i("in",-1,-1),new i("un",-1,-1),new i("ün",-1,-1),new i("ın",-1,-1)],s=[new i("a",-1,-1),new i("e",-1,-1)],c=[new i("na",-1,-1),new i("ne",-1,-1)],l=[new i("da",-1,-1),new i("ta",-1,-1),new i("de",-1,-1),new i("te",-1,-1)],m=[new i("nda",-1,-1),new i("nde",-1,-1)],a=[new i("dan",-1,-1),new i("tan",-1,-1),new i("den",-1,-1),new i("ten",-1,-1)],d=[new i("ndan",-1,-1),new i("nden",-1,-1)],b=[new i("la",-1,-1),new i("le",-1,-1)],w=[new i("ca",-1,-1),new i("ce",-1,-1)],f=[new i("im",-1,-1),new i("um",-1,-1),new i("üm",-1,-1),new i("ım",-1,-1)],_=[new i("sin",-1,-1),new i("sun",-1,-1),new i("sün",-1,-1),new i("sın",-1,-1)],k=[new i("iz",-1,-1),new i("uz",-1,-1),new i("üz",-1,-1),new i("ız",-1,-1)],p=[new i("siniz",-1,-1),new i("sunuz",-1,-1),new i("sünüz",-1,-1),new i("sınız",-1,-1)],g=[new i("lar",-1,-1),new i("ler",-1,-1)],y=[new i("niz",-1,-1),new i("nuz",-1,-1),new i("nüz",-1,-1),new i("nız",-1,-1)],z=[new i("dir",-1,-1),new i("tir",-1,-1),new i("dur",-1,-1),new i("tur",-1,-1),new i("dür",-1,-1),new i("tür",-1,-1),new i("dır",-1,-1),new i("tır",-1,-1)],h=[new i("casına",-1,-1),new i("cesine",-1,-1)],v=[new i("di",-1,-1),new i("ti",-1,-1),new i("dik",-1,-1),new i("tik",-1,-1),new i("duk",-1,-1),new i("tuk",-1,-1),new i("dük",-1,-1),new i("tük",-1,-1),new i("dık",-1,-1),new i("tık",-1,-1),new i("dim",-1,-1),new i("tim",-1,-1),new i("dum",-1,-1),new i("tum",-1,-1),new i("düm",-1,-1),new i("tüm",-1,-1),new i("dım",-1,-1),new i("tım",-1,-1),new i("din",-1,-1),new i("tin",-1,-1),new i("dun",-1,-1),new i("tun",-1,-1),new i("dün",-1,-1),new i("tün",-1,-1),new i("dın",-1,-1),new i("tın",-1,-1),new i("du",-1,-1),new i("tu",-1,-1),new i("dü",-1,-1),new i("tü",-1,-1),new i("dı",-1,-1),new i("tı",-1,-1)],q=[new i("sa",-1,-1),new i("se",-1,-1),new i("sak",-1,-1),new i("sek",-1,-1),new i("sam",-1,-1),new i("sem",-1,-1),new i("san",-1,-1),new i("sen",-1,-1)],W=[new i("miş",-1,-1),new i("muş",-1,-1),new i("müş",-1,-1),new i("mış",-1,-1)],F=[new i("b",-1,1),new i("c",-1,2),new i("d",-1,3),new i("ğ",-1,4)],C=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,8,0,0,0,0,0,0,1],S=[1,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,1],P=[65],L=[65],x=[["a",[1,64,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],97,305],["e",[17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130],101,252],["ı",[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],97,305],["i",[17],101,105],["o",P,111,117],["ö",L,246,252],["u",P,111,117]],A=new e;function E(r,i,e){for(;;){var n=A.limit-A.cursor;if(A.in_grouping_b(r,i,e)){A.cursor=A.limit-n;break}if(A.cursor=A.limit-n,A.cursor<=A.limit_backward)return;A.cursor--}return 1}function j(){var r=A.limit-A.cursor;E(C,97,305);for(var i=0;i<x.length;i++){var e=A.limit-A.cursor,n=x[i];if(A.eq_s_b(1,n[0])&&E(n[1],n[2],n[3]))return A.cursor=A.limit-r,!0;A.cursor=A.limit-e}return A.cursor=A.limit-e,!(!A.eq_s_b(1,"ü")||!E(L,246,252)||(A.cursor=A.limit-r,0))}function O(r,i){var e,n=A.limit-A.cursor;if(r()&&(A.cursor=A.limit-n,A.cursor>A.limit_backward)&&(A.cursor--,e=A.limit-A.cursor,i()))A.cursor=A.limit-e;else{if(A.cursor=A.limit-n,r())return A.cursor=A.limit-n,!1;if(A.cursor=A.limit-n,A.cursor<=A.limit_backward)return!1;if(A.cursor--,!i())return!1;A.cursor=A.limit-n}return!0}function T(r){return O(r,(function(){return A.in_grouping_b(C,97,305)}))}function Z(){return T((function(){return A.eq_s_b(1,"n")}))}function B(){return T((function(){return A.eq_s_b(1,"y")}))}function D(){return A.find_among_b(n,10)&&O((function(){return A.in_grouping_b(S,105,305)}),(function(){return A.out_grouping_b(C,97,305)}))}function G(){return j()&&A.in_grouping_b(S,105,305)&&T((function(){return A.eq_s_b(1,"s")}))}function H(){return A.find_among_b(t,2)}function I(){return j()&&A.find_among_b(o,4)&&Z()}function J(){return j()&&A.find_among_b(l,4)}function K(){return j()&&A.find_among_b(m,2)}function M(){return j()&&A.find_among_b(f,4)&&B()}function N(){return j()&&A.find_among_b(_,4)}function Q(){return j()&&A.find_among_b(k,4)&&B()}function R(){return A.find_among_b(p,4)}function U(){return j()&&A.find_among_b(g,2)}function V(){return j()&&A.find_among_b(z,8)}function X(){return j()&&A.find_among_b(v,32)&&B()}function Y(){return A.find_among_b(q,8)&&B()}function $(){return j()&&A.find_among_b(W,4)&&B()}function rr(){var r,i;if(A.ket=A.cursor,A.eq_s_b(2,"ki")){if(r=A.limit-A.cursor,J())return A.bra=A.cursor,A.slice_del(),i=A.limit-A.cursor,A.ket=A.cursor,(U()||(A.cursor=A.limit-i,D()&&(A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,U())))&&(A.bra=A.cursor,A.slice_del(),rr()),1;if(A.cursor=A.limit-r,I()){if(A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,i=A.limit-A.cursor,H())A.bra=A.cursor,A.slice_del();else{if(A.cursor=A.limit-i,A.ket=A.cursor,!D()&&(A.cursor=A.limit-i,!G())&&(A.cursor=A.limit-i,!rr()))return 1;A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,U()&&(A.bra=A.cursor,A.slice_del(),rr())}return 1}if(A.cursor=A.limit-r,K()){if(i=A.limit-A.cursor,H())A.bra=A.cursor,A.slice_del();else if(A.cursor=A.limit-i,G())A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,U()&&(A.bra=A.cursor,A.slice_del(),rr());else if(A.cursor=A.limit-i,!rr())return;return 1}}}function ir(r,i,e){var n;return A.cursor=A.limit-r,!function(){for(;;){var r=A.limit-A.cursor;if(A.in_grouping_b(C,97,305)){A.cursor=A.limit-r;break}if(A.cursor=A.limit-r,A.cursor<=A.limit_backward)return;A.cursor--}return 1}()||(n=A.limit-A.cursor,!A.eq_s_b(1,i)&&(A.cursor=A.limit-n,!A.eq_s_b(1,e)))||(A.cursor=A.limit-r,i=A.cursor,A.insert(A.cursor,A.cursor,e),void(A.cursor=i))}function er(r,i,e){for(;!A.eq_s(i,e);){if(A.cursor>=A.limit)return 1;A.cursor++}if(i!=A.limit)return 1;A.cursor=r}this.setCurrent=function(r){A.setCurrent(r)},this.getCurrent=function(){return A.getCurrent()},this.stem=function(){return!!(function(){for(var r,i=A.cursor,e=2;;){for(r=A.cursor;!A.in_grouping(C,97,305);){if(A.cursor>=A.limit)return A.cursor=r,!(0<e)&&(A.cursor=i,1);A.cursor++}e--}}()&&(A.limit_backward=A.cursor,A.cursor=A.limit,function(){var i,e=A.limit-A.cursor;if(A.ket=A.cursor,r=!0,i=A.limit-A.cursor,!($()||(A.cursor=A.limit-i,X())||(A.cursor=A.limit-i,Y())||(A.cursor=A.limit-i,A.eq_s_b(3,"ken")&&B()))&&(A.cursor=A.limit-e,function(){if(A.find_among_b(h,2)){var r=A.limit-A.cursor;if(R()||(A.cursor=A.limit-r,U())||(A.cursor=A.limit-r,M())||(A.cursor=A.limit-r,N())||(A.cursor=A.limit-r,Q())||(A.cursor=A.limit-r),$())return}return 1}())&&(A.cursor=A.limit-e,!U()||(A.bra=A.cursor,A.slice_del(),i=A.limit-A.cursor,A.ket=A.cursor,V()||(A.cursor=A.limit-i,X())||(A.cursor=A.limit-i,Y())||(A.cursor=A.limit-i,$())||(A.cursor=A.limit-i),void(r=!1)))&&(A.cursor=A.limit-e,!(j()&&A.find_among_b(y,4)&&(i=A.limit-A.cursor,X()||(A.cursor=A.limit-i,Y()))))&&(A.cursor=A.limit-e,i=A.limit-A.cursor,!(R()||(A.cursor=A.limit-i,Q())||(A.cursor=A.limit-i,N())||(A.cursor=A.limit-i,M()))||(A.bra=A.cursor,A.slice_del(),i=A.limit-A.cursor,A.ket=A.cursor,void($()||(A.cursor=A.limit-i))))){if(A.cursor=A.limit-e,!V())return;A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,e=A.limit-A.cursor,R()||(A.cursor=A.limit-e,U())||(A.cursor=A.limit-e,M())||(A.cursor=A.limit-e,N())||(A.cursor=A.limit-e,Q())||(A.cursor=A.limit-e),$()||(A.cursor=A.limit-e)}A.bra=A.cursor,A.slice_del()}(),A.cursor=A.limit,r)&&(function(){var r,i,e=A.limit-A.cursor;if(A.ket=A.cursor,U())A.bra=A.cursor,A.slice_del(),rr();else if(A.cursor=A.limit-e,A.ket=A.cursor,j()&&A.find_among_b(w,2)&&Z())if(A.bra=A.cursor,A.slice_del(),r=A.limit-A.cursor,A.ket=A.cursor,H())A.bra=A.cursor,A.slice_del();else{if(A.cursor=A.limit-r,A.ket=A.cursor,!D()&&(A.cursor=A.limit-r,!G())){if(A.cursor=A.limit-r,A.ket=A.cursor,!U())return;if(A.bra=A.cursor,A.slice_del(),!rr())return}A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,U()&&(A.bra=A.cursor,A.slice_del(),rr())}else A.cursor=A.limit-e,function(r){if(A.ket=A.cursor,K()||(A.cursor=A.limit-r,j()&&A.find_among_b(c,2))){if(r=A.limit-A.cursor,H())A.bra=A.cursor,A.slice_del();else if(A.cursor=A.limit-r,G())A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,U()&&(A.bra=A.cursor,A.slice_del(),rr());else if(A.cursor=A.limit-r,!rr())return;return 1}}(e)||(A.cursor=A.limit-e,i=e,A.ket=A.cursor,(j()&&A.find_among_b(d,2)||(A.cursor=A.limit-i,j()&&A.find_among_b(u,4)))&&(i=A.limit-A.cursor,G()||(A.cursor=A.limit-i,H()))&&(A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,U()&&(A.bra=A.cursor,A.slice_del(),rr()),1))||(A.cursor=A.limit-e,A.ket=A.cursor,j()&&A.find_among_b(a,4)?(A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,r=A.limit-A.cursor,D()?(A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,U()&&(A.bra=A.cursor,A.slice_del(),rr())):(A.cursor=A.limit-r,U()?(A.bra=A.cursor,A.slice_del()):A.cursor=A.limit-r,rr())):(A.cursor=A.limit-e,i=A.limit-A.cursor,A.ket=A.cursor,I()||(A.cursor=A.limit-i,j()&&A.find_among_b(b,2)&&B())?(A.bra=A.cursor,A.slice_del(),i=A.limit-A.cursor,A.ket=A.cursor,U()&&(A.bra=A.cursor,A.slice_del(),rr())||(A.cursor=A.limit-i,A.ket=A.cursor,(D()||(A.cursor=A.limit-i,G())||(A.cursor=A.limit-i,rr()))&&(A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,U())&&(A.bra=A.cursor,A.slice_del(),rr()))):(A.cursor=A.limit-e,H()?(A.bra=A.cursor,A.slice_del()):(A.cursor=A.limit-e,rr()||(A.cursor=A.limit-e,function(){var r,i=A.limit-A.cursor;if(A.ket=A.cursor,J()||(A.cursor=A.limit-i,j()&&A.in_grouping_b(S,105,305)&&B())||(A.cursor=A.limit-i,j()&&A.find_among_b(s,2)&&B())){if(A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,i=A.limit-A.cursor,D())A.bra=A.cursor,A.slice_del(),r=A.limit-A.cursor,A.ket=A.cursor,U()||(A.cursor=A.limit-r);else if(A.cursor=A.limit-i,!U())return 1;return A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,rr(),1}}())||(A.cursor=A.limit-e,A.ket=A.cursor,(D()||(A.cursor=A.limit-e,G()))&&(A.bra=A.cursor,A.slice_del(),A.ket=A.cursor,U())&&(A.bra=A.cursor,A.slice_del(),rr()))))))}(),A.cursor=A.limit_backward,function(){var r,i=A.cursor;if(er(r=A.cursor,2,"ad")&&er(A.cursor=r,5,"soyad")){if(A.limit_backward=i,A.cursor=A.limit,r=A.limit-A.cursor,(A.eq_s_b(1,"d")||(A.cursor=A.limit-r,A.eq_s_b(1,"g")))&&ir(r,"a","ı")&&ir(r,"e","i")&&ir(r,"o","u")&&ir(r,"ö","ü"),A.cursor=A.limit,A.ket=A.cursor,i=A.find_among_b(F,4))switch(A.bra=A.cursor,i){case 1:A.slice_from("p");break;case 2:A.slice_from("ç");break;case 3:A.slice_from("t");break;case 4:A.slice_from("k")}return 1}}()))}},function(r){return n.setCurrent(r),n.stem(),n.getCurrent()}),r.Pipeline.registerFunction(r.tr.stemmer,"stemmer-tr"),r.tr.stopWordFilter=function(i){if(-1===r.tr.stopWordFilter.stopWords.indexOf(i))return i},r.tr.stopWordFilter.stopWords=new r.SortedSet,r.tr.stopWordFilter.stopWords.length=210,r.tr.stopWordFilter.stopWords.elements=" acaba altmış altı ama ancak arada aslında ayrıca bana bazı belki ben benden beni benim beri beş bile bin bir biri birkaç birkez birçok birşey birşeyi biz bizden bize bizi bizim bu buna bunda bundan bunlar bunları bunların bunu bunun burada böyle böylece da daha dahi de defa değil diye diğer doksan dokuz dolayı dolayısıyla dört edecek eden ederek edilecek ediliyor edilmesi ediyor elli en etmesi etti ettiği ettiğini eğer gibi göre halen hangi hatta hem henüz hep hepsi her herhangi herkesin hiç hiçbir iki ile ilgili ise itibaren itibariyle için işte kadar karşın katrilyon kendi kendilerine kendini kendisi kendisine kendisini kez ki kim kimden kime kimi kimse kırk milyar milyon mu mü mı nasıl ne neden nedenle nerde nerede nereye niye niçin o olan olarak oldu olduklarını olduğu olduğunu olmadı olmadığı olmak olması olmayan olmaz olsa olsun olup olur olursa oluyor on ona ondan onlar onlardan onları onların onu onun otuz oysa pek rağmen sadece sanki sekiz seksen sen senden seni senin siz sizden sizi sizin tarafından trilyon tüm var vardı ve veya ya yani yapacak yapmak yaptı yaptıkları yaptığı yaptığını yapılan yapılması yapıyor yedi yerine yetmiş yine yirmi yoksa yüz zaten çok çünkü öyle üzere üç şey şeyden şeyi şeyler şu şuna şunda şundan şunları şunu şöyle".split(" "),r.Pipeline.registerFunction(r.tr.stopWordFilter,"stopWordFilter-tr")}})); diff --git a/themes/tabi-lean/static/js/lunr/lunr.zh.js b/themes/tabi-lean/static/js/lunr/lunr.zh.js new file mode 100644 index 0000000..8d85823 --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.zh.js @@ -0,0 +1,156 @@ +/*! + * Lunr languages, `Chinese` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2019, Felix Lian (repairearth) + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball zhvaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory(require('nodejieba')) + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function(nodejieba) { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr, nodejiebaDictJson) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* + Chinese tokenization is trickier, since it does not + take into account spaces. + Since the tokenization function is represented different + internally for each of the Lunr versions, this had to be done + in order to try to try to pick the best way of doing this based + on the Lunr version + */ + var isLunr2 = lunr.version[0] == "2"; + + /* register specific locale function */ + lunr.zh = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.zh.trimmer, + lunr.zh.stopWordFilter, + lunr.zh.stemmer + ); + + // change the tokenizer for Chinese one + if (isLunr2) { // for lunr version 2.0.0 + this.tokenizer = lunr.zh.tokenizer; + } else { + if (lunr.tokenizer) { // for lunr version 0.6.0 + lunr.tokenizer = lunr.zh.tokenizer; + } + if (this.tokenizerFn) { // for lunr version 0.7.0 -> 1.0.0 + this.tokenizerFn = lunr.zh.tokenizer; + } + } + }; + + lunr.zh.tokenizer = function(obj) { + if (!arguments.length || obj == null || obj == undefined) return [] + if (Array.isArray(obj)) return obj.map(function(t) { + return isLunr2 ? new lunr.Token(t.toLowerCase()) : t.toLowerCase() + }) + + nodejiebaDictJson && nodejieba.load(nodejiebaDictJson) + + var str = obj.toString().trim().toLowerCase(); + var tokens = []; + + nodejieba.cut(str, true).forEach(function(seg) { + tokens = tokens.concat(seg.split(' ')) + }) + + tokens = tokens.filter(function(token) { + return !!token; + }); + + var fromIndex = 0 + + return tokens.map(function(token, index) { + if (isLunr2) { + var start = str.indexOf(token, fromIndex) + + var tokenMetadata = {} + tokenMetadata["position"] = [start, token.length] + tokenMetadata["index"] = index + + fromIndex = start + + return new lunr.Token(token, tokenMetadata); + } else { + return token + } + }); + } + + /* lunr trimmer function */ + lunr.zh.wordCharacters = "\\w\u4e00-\u9fa5"; + lunr.zh.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.zh.wordCharacters); + lunr.Pipeline.registerFunction(lunr.zh.trimmer, 'trimmer-zh'); + + /* lunr stemmer function */ + lunr.zh.stemmer = (function() { + + /* TODO Chinese stemmer */ + return function(word) { + return word; + } + })(); + lunr.Pipeline.registerFunction(lunr.zh.stemmer, 'stemmer-zh'); + + /* lunr stop word filter. see https://www.ranks.nl/stopwords/chinese-stopwords */ + lunr.generateStopWordFilter = function (stopWords) { + var words = stopWords.reduce(function (memo, stopWord) { + memo[stopWord] = stopWord; + return memo; + }, {}); + + return function (token) { + if (token && words[token.toString()] !== token.toString()) return token; + }; + } + + lunr.zh.stopWordFilter = lunr.generateStopWordFilter( + '的 一 不 在 人 有 是 为 以 于 上 他 而 后 之 来 及 了 因 下 可 到 由 这 与 也 此 但 并 个 其 已 无 小 我 们 起 最 再 今 去 好 只 又 或 很 亦 某 把 那 你 乃 它 吧 被 比 别 趁 当 从 到 得 打 凡 儿 尔 该 各 给 跟 和 何 还 即 几 既 看 据 距 靠 啦 了 另 么 每 们 嘛 拿 哪 那 您 凭 且 却 让 仍 啥 如 若 使 谁 虽 随 同 所 她 哇 嗡 往 哪 些 向 沿 哟 用 于 咱 则 怎 曾 至 致 着 诸 自'.split(' ')); + lunr.Pipeline.registerFunction(lunr.zh.stopWordFilter, 'stopWordFilter-zh'); + }; +})) diff --git a/themes/tabi-lean/static/js/lunr/lunr.zh.min.js b/themes/tabi-lean/static/js/lunr/lunr.zh.min.js new file mode 100644 index 0000000..387e69a --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunr.zh.min.js @@ -0,0 +1 @@ +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r(require("nodejieba")):r()(e.lunr)}(this,function(n){return function(u,t){if(void 0===u)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===u.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var s="2"==u.version[0];u.zh=function(){this.pipeline.reset(),this.pipeline.add(u.zh.trimmer,u.zh.stopWordFilter,u.zh.stemmer),s?this.tokenizer=u.zh.tokenizer:(u.tokenizer&&(u.tokenizer=u.zh.tokenizer),this.tokenizerFn&&(this.tokenizerFn=u.zh.tokenizer))},u.zh.tokenizer=function(e){if(!arguments.length||null==e)return[];if(Array.isArray(e))return e.map(function(e){return s?new u.Token(e.toLowerCase()):e.toLowerCase()});t&&n.load(t);var i=e.toString().trim().toLowerCase(),r=[],o=(n.cut(i,!0).forEach(function(e){r=r.concat(e.split(" "))}),r=r.filter(function(e){return!!e}),0);return r.map(function(e,r){var t,n;return s?(t=i.indexOf(e,o),(n={}).position=[t,e.length],n.index=r,o=t,new u.Token(e,n)):e})},u.zh.wordCharacters="\\w一-龥",u.zh.trimmer=u.trimmerSupport.generateTrimmer(u.zh.wordCharacters),u.Pipeline.registerFunction(u.zh.trimmer,"trimmer-zh"),u.zh.stemmer=function(e){return e},u.Pipeline.registerFunction(u.zh.stemmer,"stemmer-zh"),u.generateStopWordFilter=function(e){var r=e.reduce(function(e,r){return e[r]=r,e},{});return function(e){if(e&&r[e.toString()]!==e.toString())return e}},u.zh.stopWordFilter=u.generateStopWordFilter("的 一 不 在 人 有 是 为 以 于 上 他 而 后 之 来 及 了 因 下 可 到 由 这 与 也 此 但 并 个 其 已 无 小 我 们 起 最 再 今 去 好 只 又 或 很 亦 某 把 那 你 乃 它 吧 被 比 别 趁 当 从 到 得 打 凡 儿 尔 该 各 给 跟 和 何 还 即 几 既 看 据 距 靠 啦 了 另 么 每 们 嘛 拿 哪 那 您 凭 且 却 让 仍 啥 如 若 使 谁 虽 随 同 所 她 哇 嗡 往 哪 些 向 沿 哟 用 于 咱 则 怎 曾 至 致 着 诸 自".split(" ")),u.Pipeline.registerFunction(u.zh.stopWordFilter,"stopWordFilter-zh")}}); diff --git a/themes/tabi-lean/static/js/lunr/lunrStemmerSupport.js b/themes/tabi-lean/static/js/lunr/lunrStemmerSupport.js new file mode 100755 index 0000000..32959fb --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunrStemmerSupport.js @@ -0,0 +1,304 @@ +/*! + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; (function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function () { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function (lunr) { + /* provides utilities for the included stemmers */ + lunr.stemmerSupport = { + Among: function (s, substring_i, result, method) { + this.toCharArray = function (s) { + var sLength = s.length, charArr = new Array(sLength); + for (var i = 0; i < sLength; i++) + charArr[i] = s.charCodeAt(i); + return charArr; + }; + + if ((!s && s != "") || (!substring_i && (substring_i != 0)) || !result) + throw ("Bad Among initialisation: s:" + s + ", substring_i: " + + substring_i + ", result: " + result); + this.s_size = s.length; + this.s = this.toCharArray(s); + this.substring_i = substring_i; + this.result = result; + this.method = method; + }, + SnowballProgram: function () { + var current; + return { + bra: 0, + ket: 0, + limit: 0, + cursor: 0, + limit_backward: 0, + setCurrent: function (word) { + current = word; + this.cursor = 0; + this.limit = word.length; + this.limit_backward = 0; + this.bra = this.cursor; + this.ket = this.limit; + }, + getCurrent: function () { + var result = current; + current = null; + return result; + }, + in_grouping: function (s, min, max) { + if (this.cursor < this.limit) { + var ch = current.charCodeAt(this.cursor); + if (ch <= max && ch >= min) { + ch -= min; + if (s[ch >> 3] & (0X1 << (ch & 0X7))) { + this.cursor++; + return true; + } + } + } + return false; + }, + in_grouping_b: function (s, min, max) { + if (this.cursor > this.limit_backward) { + var ch = current.charCodeAt(this.cursor - 1); + if (ch <= max && ch >= min) { + ch -= min; + if (s[ch >> 3] & (0X1 << (ch & 0X7))) { + this.cursor--; + return true; + } + } + } + return false; + }, + out_grouping: function (s, min, max) { + if (this.cursor < this.limit) { + var ch = current.charCodeAt(this.cursor); + if (ch > max || ch < min) { + this.cursor++; + return true; + } + ch -= min; + if (!(s[ch >> 3] & (0X1 << (ch & 0X7)))) { + this.cursor++; + return true; + } + } + return false; + }, + out_grouping_b: function (s, min, max) { + if (this.cursor > this.limit_backward) { + var ch = current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) { + this.cursor--; + return true; + } + ch -= min; + if (!(s[ch >> 3] & (0X1 << (ch & 0X7)))) { + this.cursor--; + return true; + } + } + return false; + }, + eq_s: function (s_size, s) { + if (this.limit - this.cursor < s_size) + return false; + for (var i = 0; i < s_size; i++) + if (current.charCodeAt(this.cursor + i) != s.charCodeAt(i)) + return false; + this.cursor += s_size; + return true; + }, + eq_s_b: function (s_size, s) { + if (this.cursor - this.limit_backward < s_size) + return false; + for (var i = 0; i < s_size; i++) + if (current.charCodeAt(this.cursor - s_size + i) != s + .charCodeAt(i)) + return false; + this.cursor -= s_size; + return true; + }, + find_among: function (v, v_size) { + var i = 0, j = v_size, c = this.cursor, l = this.limit, common_i = 0, common_j = 0, first_key_inspected = false; + while (true) { + var k = i + ((j - i) >> 1), diff = 0, common = common_i < common_j + ? common_i + : common_j, w = v[k]; + for (var i2 = common; i2 < w.s_size; i2++) { + if (c + common == l) { + diff = -1; + break; + } + diff = current.charCodeAt(c + common) - w.s[i2]; + if (diff) + break; + common++; + } + if (diff < 0) { + j = k; + common_j = common; + } else { + i = k; + common_i = common; + } + if (j - i <= 1) { + if (i > 0 || j == i || first_key_inspected) + break; + first_key_inspected = true; + } + } + while (true) { + var w = v[i]; + if (common_i >= w.s_size) { + this.cursor = c + w.s_size; + if (!w.method) + return w.result; + var res = w.method(); + this.cursor = c + w.s_size; + if (res) + return w.result; + } + i = w.substring_i; + if (i < 0) + return 0; + } + }, + find_among_b: function (v, v_size) { + var i = 0, j = v_size, c = this.cursor, lb = this.limit_backward, common_i = 0, common_j = 0, first_key_inspected = false; + while (true) { + var k = i + ((j - i) >> 1), diff = 0, common = common_i < common_j + ? common_i + : common_j, w = v[k]; + for (var i2 = w.s_size - 1 - common; i2 >= 0; i2--) { + if (c - common == lb) { + diff = -1; + break; + } + diff = current.charCodeAt(c - 1 - common) - w.s[i2]; + if (diff) + break; + common++; + } + if (diff < 0) { + j = k; + common_j = common; + } else { + i = k; + common_i = common; + } + if (j - i <= 1) { + if (i > 0 || j == i || first_key_inspected) + break; + first_key_inspected = true; + } + } + while (true) { + var w = v[i]; + if (common_i >= w.s_size) { + this.cursor = c - w.s_size; + if (!w.method) + return w.result; + var res = w.method(); + this.cursor = c - w.s_size; + if (res) + return w.result; + } + i = w.substring_i; + if (i < 0) + return 0; + } + }, + replace_s: function (c_bra, c_ket, s) { + var adjustment = s.length - (c_ket - c_bra), left = current + .substring(0, c_bra), right = current.substring(c_ket); + current = left + s + right; + this.limit += adjustment; + if (this.cursor >= c_ket) + this.cursor += adjustment; + else if (this.cursor > c_bra) + this.cursor = c_bra; + return adjustment; + }, + slice_check: function () { + if (this.bra < 0 || this.bra > this.ket || this.ket > this.limit + || this.limit > current.length) + throw ("faulty slice operation"); + }, + slice_from: function (s) { + this.slice_check(); + this.replace_s(this.bra, this.ket, s); + }, + slice_del: function () { + this.slice_from(""); + }, + insert: function (c_bra, c_ket, s) { + var adjustment = this.replace_s(c_bra, c_ket, s); + if (c_bra <= this.bra) + this.bra += adjustment; + if (c_bra <= this.ket) + this.ket += adjustment; + }, + slice_to: function () { + this.slice_check(); + return current.substring(this.bra, this.ket); + }, + eq_v_b: function (s) { + return this.eq_s_b(s.length, s); + } + }; + } + }; + + lunr.trimmerSupport = { + generateTrimmer: function (wordCharacters) { + var startRegex = new RegExp("^[^" + wordCharacters + "]+") + var endRegex = new RegExp("[^" + wordCharacters + "]+$") + + return function (token) { + // for lunr version 2 + if (typeof token.update === "function") { + return token.update(function (s) { + return s + .replace(startRegex, '') + .replace(endRegex, ''); + }) + } else { // for lunr version 1 + return token + .replace(startRegex, '') + .replace(endRegex, ''); + } + }; + } + } + } +})); diff --git a/themes/tabi-lean/static/js/lunr/lunrStemmerSupport.min.js b/themes/tabi-lean/static/js/lunr/lunrStemmerSupport.min.js new file mode 100755 index 0000000..3567a8c --- /dev/null +++ b/themes/tabi-lean/static/js/lunr/lunrStemmerSupport.min.js @@ -0,0 +1 @@ +!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var b;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(r){b=r,this.cursor=0,this.limit=r.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var r=b;return b=null,r},in_grouping:function(r,t,i){if(this.cursor<this.limit){var s=b.charCodeAt(this.cursor);if(s<=i&&t<=s&&r[(s-=t)>>3]&1<<(7&s))return this.cursor++,!0}return!1},in_grouping_b:function(r,t,i){if(this.cursor>this.limit_backward){var s=b.charCodeAt(this.cursor-1);if(s<=i&&t<=s&&r[(s-=t)>>3]&1<<(7&s))return this.cursor--,!0}return!1},out_grouping:function(r,t,i){if(this.cursor<this.limit){var s=b.charCodeAt(this.cursor);if(i<s||s<t)return this.cursor++,!0;if(!(r[(s-=t)>>3]&1<<(7&s)))return this.cursor++,!0}return!1},out_grouping_b:function(r,t,i){if(this.cursor>this.limit_backward){var s=b.charCodeAt(this.cursor-1);if(i<s||s<t)return this.cursor--,!0;if(!(r[(s-=t)>>3]&1<<(7&s)))return this.cursor--,!0}return!1},eq_s:function(r,t){if(this.limit-this.cursor<r)return!1;for(var i=0;i<r;i++)if(b.charCodeAt(this.cursor+i)!=t.charCodeAt(i))return!1;return this.cursor+=r,!0},eq_s_b:function(r,t){if(this.cursor-this.limit_backward<r)return!1;for(var i=0;i<r;i++)if(b.charCodeAt(this.cursor-r+i)!=t.charCodeAt(i))return!1;return this.cursor-=r,!0},find_among:function(r,t){for(var i=0,s=t,e=this.cursor,n=this.limit,u=0,o=0,h=!1;;){for(var c=i+(s-i>>1),f=0,a=u<o?u:o,l=r[c],_=a;_<l.s_size;_++){if(e+a==n){f=-1;break}if(f=b.charCodeAt(e+a)-l.s[_])break;a++}if(f<0?(s=c,o=a):(i=c,u=a),s-i<=1){if(0<i||s==i||h)break;h=!0}}for(;;){if(u>=(l=r[i]).s_size){if(this.cursor=e+l.s_size,!l.method)return l.result;var m=l.method();if(this.cursor=e+l.s_size,m)return l.result}if((i=l.substring_i)<0)return 0}},find_among_b:function(r,t){for(var i=0,s=t,e=this.cursor,n=this.limit_backward,u=0,o=0,h=!1;;){for(var c,f=i+(s-i>>1),a=0,l=u<o?u:o,_=(c=r[f]).s_size-1-l;0<=_;_--){if(e-l==n){a=-1;break}if(a=b.charCodeAt(e-1-l)-c.s[_])break;l++}if(a<0?(s=f,o=l):(i=f,u=l),s-i<=1){if(0<i||s==i||h)break;h=!0}}for(;;){if(u>=(c=r[i]).s_size){if(this.cursor=e-c.s_size,!c.method)return c.result;var m=c.method();if(this.cursor=e-c.s_size,m)return c.result}if((i=c.substring_i)<0)return 0}},replace_s:function(r,t,i){var s=i.length-(t-r);return b=b.substring(0,r)+i+b.substring(t),this.limit+=s,this.cursor>=t?this.cursor+=s:this.cursor>r&&(this.cursor=r),s},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>b.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){t=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=t),r<=this.ket&&(this.ket+=t)},slice_to:function(){return this.slice_check(),b.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}}); diff --git a/themes/tabi-lean/static/js/mermaid.min.js b/themes/tabi-lean/static/js/mermaid.min.js new file mode 100644 index 0000000..51902c2 --- /dev/null +++ b/themes/tabi-lean/static/js/mermaid.min.js @@ -0,0 +1,2651 @@ +var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var w,k,T,C,S,_,A,N,I=Object.create,R=Object.defineProperty,M=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyNames,F=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,me=(t,e)=>R(t,"name",{value:e,configurable:!0}),G=(e,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let t of $(r))z.call(e,t)||t===n||R(e,t,{get:()=>r[t],enumerable:!(i=M(r,t))||i.enumerable});return e},U=(t,e,r)=>(G(t,e,"default"),r&&G(r,e,"default")),q=(t,e,r)=>(r=null!=t?I(F(t)):{},G(!e&&t&&t.__esModule?r:R(r,"default",{value:t,enumerable:!0}),t)),j=(b=(t,e)=>()=>e=t?t(t=0):e)(()=>{w=Object.freeze({left:0,top:0,width:16,height:16}),k=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),T=Object.freeze({...w,...k}),C=Object.freeze({...T,body:"",hidden:!1})}),W=b(()=>{j(),S=Object.freeze({width:null,height:null}),_=Object.freeze({...S,...k})}),Y=b(()=>{A=me((t,e,r,n="")=>{var i,a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||3<a.length)return null;n=a.shift().slice(1)}return 3<a.length||!a.length?null:1<a.length?(t=a.pop(),i=a.pop(),i={provider:0<a.length?a[0]:n,prefix:i,name:t},e&&!N(i)?null:i):1<(i=(t=a[0]).split("-")).length?(a={provider:n,prefix:i.shift(),name:i.join("-")},e&&!N(a)?null:a):r&&""===n&&(i={provider:n,prefix:"",name:t},!e||N(i,r))?i:null},"stringToIcon"),N=me((t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),"validateIconName")});function tt(t,e){var r={};return!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0),(t=((t.rotate||0)+(e.rotate||0))%4)&&(r.rotate=t),r}var et=b(()=>{me(tt,"mergeIconTransformations")});function rt(t,e){var r,n=tt(t,e);for(r in C)r in k?r in t&&!(r in n)&&(n[r]=k[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}var nt=b(()=>{j(),et(),me(rt,"mergeIconData")});function it(t,e){let n=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);function s(t){var e,r;return n[t]?a[t]=[]:(t in a||(a[t]=null,(r=(e=i[t]&&i[t].parent)&&s(e))&&(a[t]=[e].concat(r))),a[t])}return me(s,"resolve"),(e||Object.keys(n).concat(Object.keys(i))).forEach(s),a}var st=b(()=>{me(it,"getIconsTree")});function ot(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(t){a=rt(n[t]||i[t],a)}return me(s,"parse"),s(e),r.forEach(s),rt(t,a)}function lt(t,e){var r;return t.icons[e]?ot(t,e,[]):(r=it(t,[e])[e])?ot(t,e,r):null}var ct=b(()=>{nt(),st(),me(ot,"internalGetIconData"),me(lt,"getIconData")});function ht(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;var n,i=t.split(ut);if(null===i||!i.length)return t;let a=[],s=i.shift(),o=dt.test(s);for(;;){if(!o||(n=parseFloat(s),isNaN(n))?a.push(s):a.push(Math.ceil(n*e*r)/r),void 0===(s=i.shift()))return a.join("");o=!o}}var ut,dt,pt=b(()=>{ut=/(-?[0-9.]*[0-9]+[0-9.]*)/g,dt=/^-?[0-9.]*[0-9]+[0-9.]*$/g,me(ht,"calculateSize")});function gt(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;0<=n;){var i=t.indexOf(">",n),a=t.indexOf("</"+e);if(-1===i||-1===a)break;var s=t.indexOf(">",a);if(-1===s)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function ft(t,e){return t?"<defs>"+t+"</defs>"+e:e}function mt(t,e,r){return ft((t=gt(t)).defs,e+t.content+r)}var yt=b(()=>{me(gt,"splitSVGDefs"),me(ft,"mergeDefsAndContent"),me(mt,"wrapSVGContent")});function vt(t,e){let r={...T,...t},n={..._,...e},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,i=([r,n].forEach(t=>{let e=[],r=t.hFlip,n=t.vFlip,i=t.rotate;r?n?i+=2:(e.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),e.push("scale(-1 1)"),s.top=s.left=0):n&&(e.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),e.push("scale(1 -1)"),s.top=s.left=0);let a;switch(i<0&&(i-=4*Math.floor(i/4)),i%=4){case 1:a=s.height/2+s.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}i%2==1&&(s.left!==s.top&&(a=s.left,s.left=s.top,s.top=a),s.width!==s.height)&&(a=s.width,s.width=s.height,s.height=a),e.length&&(o=mt(o,'<g transform="'+e.join(" ")+'">',"</g>"))}),n.width),a=n.height,l=s.width,c=s.height,h,u,d=(null===i?(u=null===a?"1em":"auto"===a?c:a,h=ht(u,l/c)):(h="auto"===i?l:i,u=null===a?ht(h,c/l):"auto"===a?c:a),{}),p=me((t,e)=>{xt(e)||(d[t]=e.toString())},"setAttr");return p("width",h),p("height",u),t=[s.left,s.top,l,c],d.viewBox=t.join(" "),{attributes:d,viewBox:t,body:o}}var xt,bt=b(()=>{j(),W(),pt(),yt(),xt=me(t=>"unset"===t||"undefined"===t||"none"===t,"isUnsetKeyword"),me(vt,"iconToSVG")});function wt(n,i=Tt){for(var t,e=[];t=kt.exec(n);)e.push(t[1]);if(e.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);e.forEach(t=>{var e="function"==typeof i?i(t):i+(Et++).toString(),t=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+t+')([")]|\\.[a-z])',"g"),"$1"+e+r+"$3")}),n=n.replace(new RegExp(r,"g"),"")}return n}var kt,Tt,Et,Ct=b(()=>{kt=/\sid="(\S+)"/g,Tt="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Et=0,me(wt,"replaceIDs")});function St(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}var _t,At,Lt,Nt,D,It,Rt,Mt,Dt,Ot,Pt,Bt,$t,Ft,zt,Gt,Ut,qt,jt,Wt,Yt,Ht,Vt,Xt,Kt,Zt,Qt,Jt,te,ee,re,ne,ie,ae,se,oe,le,ce,he,ue,de,pe,ge,fe,ve,xe,be,a,we,ke,Te,r,Ee,Ce,Se,n,_e,Ae,Le,Ne,Ie,Re,Me,De,Oe,Pe,Be,$e,Fe,ze,Ge,Ue,qe,je,We,Ye,He,Ve,Xe,Ke,Ze,Qe,Je,tr,er,rr,nr,ir,ar,sr,or,lr,cr,hr,ur,dr,pr,gr=b(()=>{me(St,"iconToHTML")}),fr=b(()=>{Y(),ct(),bt(),Ct(),gr()}),mr=b(()=>{_t=me((e,r,{depth:n=2,clobber:i=!1}={})=>{let a={depth:n,clobber:i};return Array.isArray(r)&&!Array.isArray(e)?(r.forEach(t=>_t(e,t,a)),e):Array.isArray(r)&&Array.isArray(e)?(r.forEach(t=>{e.includes(t)||e.push(t)}),e):void 0===e||n<=0?null!=e&&"object"==typeof e&&"object"==typeof r?Object.assign(e,r):r:(void 0!==r&&"object"==typeof e&&"object"==typeof r&&Object.keys(r).forEach(t=>{"object"!=typeof r[t]||void 0!==e[t]&&"object"!=typeof e[t]?(i||"object"!=typeof e[t]&&"object"!=typeof r[t])&&(e[t]=r[t]):(void 0===e[t]&&(e[t]=Array.isArray(r[t])?[]:{}),e[t]=_t(e[t],r[t],{depth:n-1,clobber:i}))}),e)},"assignWithDepth"),At=_t}),yr=(WBt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports))((t,e)=>{function r(){var i="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",e="Invalid Date",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,t={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:me(function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"},"ordinal")},n=me(function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},"m"),r={s:n,z:me(function(t){var t=-t.utcOffset(),e=Math.abs(t),r=Math.floor(e/60),e=e%60;return(t<=0?"+":"-")+n(r,2,"0")+":"+n(e,2,"0")},"z"),m:me(function t(e,r){var n,i,a;return e.date()<r.date()?-t(r,e):(n=12*(r.year()-e.year())+(r.month()-e.month()),a=r-(i=e.clone().add(n,m))<0,e=e.clone().add(n+(a?-1:1),m),+(-(n+(r-i)/(a?i-e:e-i))||0))},"t"),a:me(function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},"a"),p:me(function(t){return{M:m,y:y,w:f,d:g,D:v,h:p,m:d,s:u,ms:i,Q:"quarter"}[t]||String(t||"").toLowerCase().replace(/s$/,"")},"p"),u:me(function(t){return void 0===t},"u")},o="en",l={},a=(l[o]=t,"$isDayjsObject"),c=me(function(t){return t instanceof k||!(!t||!t[a])},"S"),h=me(function t(e,r,n){var i;if(!e)return o;if("string"==typeof e){var a=e.toLowerCase(),r=(l[a]&&(i=a),r&&(l[a]=r,i=a),e.split("-"));if(!i&&1<r.length)return t(r[0])}else a=e.name,l[a]=e,i=a;return!n&&i&&(o=i),i||!n&&o},"t"),b=me(function(t,e){return c(t)?t.clone():((e="object"==typeof e?e:{}).date=t,e.args=arguments,new k(e))},"O"),w=r,k=(w.l=h,w.i=c,w.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})},me(E,"M"),(t=E.prototype).parse=function(a){this.$d=(()=>{var t=a.date,e=a.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(!(t instanceof Date||"string"!=typeof t||/Z$/i.test(t))){var r,n,i=t.match(s);if(i)return r=i[2]-1||0,n=(i[7]||"0").substring(0,3),e?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}return new Date(t)})(),this.init()},t.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},t.$utils=function(){return w},t.isValid=function(){return this.$d.toString()!==e},t.isSame=function(t,e){return t=b(t),this.startOf(e)<=t&&t<=this.endOf(e)},t.isAfter=function(t,e){return b(t)<this.startOf(e)},t.isBefore=function(t,e){return this.endOf(e)<b(t)},t.$g=function(t,e,r){return w.u(t)?this[e]:this.set(r,t)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(t,e){var r=this,n=!!w.u(e)||e,e=w.p(t),i=me(function(t,e){return e=w.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r),n?e:e.endOf(g)},"l"),a=me(function(t,e){return w.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},"$"),s=this.$W,o=this.$M,l=this.$D,c="set"+(this.$u?"UTC":"");switch(e){case y:return n?i(1,0):i(31,11);case m:return n?i(1,o):i(0,o+1);case f:var h=(s<(h=this.$locale().weekStart||0)?s+7:s)-h;return i(n?l-h:l+(6-h),o);case g:case v:return a(c+"Hours",0);case p:return a(c+"Minutes",1);case d:return a(c+"Seconds",2);case u:return a(c+"Milliseconds",3);default:return this.clone()}},t.endOf=function(t){return this.startOf(t,!1)},t.$set=function(t,e){var t=w.p(t),r="set"+(this.$u?"UTC":""),r=((n={}).day=r+"Date",n.date=r+"Date",n[m]=r+"Month",n.year=r+"FullYear",n.hour=r+"Hours",n[d]=r+"Minutes",n[u]=r+"Seconds",n[i]=r+"Milliseconds",n[t]),n=t===g?this.$D+(e-this.$W):e;return t===m||t===y?((e=this.clone().set(v,1)).$d[r](n),e.init(),this.$d=e.set(v,Math.min(this.$D,e.daysInMonth())).$d):r&&this.$d[r](n),this.init(),this},t.set=function(t,e){return this.clone().$set(t,e)},t.get=function(t){return this[w.p(t)]()},t.add=function(r,t){var n=this,t=(r=Number(r),w.p(t)),e=me(function(t){var e=b(n);return w.w(e.date(e.date()+Math.round(t*r)),n)},"y");return t===m?this.set(m,this.$M+r):t===y?this.set(y,this.$y+r):t===g?e(1):t===f?e(7):(e={minute:6e4,hour:36e5,second:1e3}[t]||1,t=this.$d.getTime()+r*e,w.w(t,this))},t.subtract=function(t,e){return this.add(-1*t,e)},t.format=function(t){var i,r,n,a,s,o,l,c,h,u,d=this,p=this.$locale();return this.isValid()?(i=t||"YYYY-MM-DDTHH:mm:ssZ",r=w.z(this),n=this.$H,a=this.$m,s=this.$M,o=p.weekdays,l=p.months,t=p.meridiem,c=me(function(t,e,r,n){return t&&(t[e]||t(d,i))||r[e].slice(0,n)},"h"),h=me(function(t){return w.s(n%12||12,t,"0")},"d"),u=t||function(t,e,r){return t=t<12?"AM":"PM",r?t.toLowerCase():t},i.replace(x,function(t,e){return e||(()=>{switch(t){case"YY":return String(d.$y).slice(-2);case"YYYY":return w.s(d.$y,4,"0");case"M":return s+1;case"MM":return w.s(s+1,2,"0");case"MMM":return c(p.monthsShort,s,l,3);case"MMMM":return c(l,s);case"D":return d.$D;case"DD":return w.s(d.$D,2,"0");case"d":return String(d.$W);case"dd":return c(p.weekdaysMin,d.$W,o,2);case"ddd":return c(p.weekdaysShort,d.$W,o,3);case"dddd":return o[d.$W];case"H":return String(n);case"HH":return w.s(n,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return u(n,a,!0);case"A":return u(n,a,!1);case"m":return String(a);case"mm":return w.s(a,2,"0");case"s":return String(d.$s);case"ss":return w.s(d.$s,2,"0");case"SSS":return w.s(d.$ms,3,"0");case"Z":return r}return null})()||r.replace(":","")})):p.invalidDate||e},t.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},t.diff=function(t,e,r){var n,i=this,e=w.p(e),a=b(t),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=me(function(){return w.m(i,a)},"D");switch(e){case y:n=l()/12;break;case m:n=l();break;case"quarter":n=l()/3;break;case f:n=(o-s)/6048e5;break;case g:n=(o-s)/864e5;break;case p:n=o/36e5;break;case d:n=o/6e4;break;case u:n=o/1e3;break;default:n=o}return r?n:w.a(n)},t.daysInMonth=function(){return this.endOf(m).$D},t.$locale=function(){return l[this.$L]},t.locale=function(t,e){var r;return t?(r=this.clone(),(t=h(t,e,!0))&&(r.$L=t),r):this.$L},t.clone=function(){return w.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},E),T=k.prototype;function E(t){this.$L=h(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[a]=!0}return b.prototype=T,[["$ms",i],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(e){T[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(t,e){return t.$i||(t(e,k,b),t.$i=!0),b},b.locale=h,b.isDayjs=c,b.unix=function(t){return b(1e3*t)},b.en=l[o],b.Ls=l,b.p={},b}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=r()}),t=b(()=>{Lt=q(yr(),1),Nt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},D={trace:me(()=>{},"trace"),debug:me(()=>{},"debug"),info:me(()=>{},"info"),warn:me(()=>{},"warn"),error:me(()=>{},"error"),fatal:me(()=>{},"fatal")},It=me(function(t="fatal"){let e=Nt.fatal;"string"==typeof t?t.toLowerCase()in Nt&&(e=Nt[t]):"number"==typeof t&&(e=t),D.trace=()=>{},D.debug=()=>{},D.info=()=>{},D.warn=()=>{},D.error=()=>{},D.fatal=()=>{},e<=Nt.fatal&&(D.fatal=console.error?console.error.bind(console,Rt("FATAL"),"color: orange"):console.log.bind(console,"[35m",Rt("FATAL"))),e<=Nt.error&&(D.error=console.error?console.error.bind(console,Rt("ERROR"),"color: orange"):console.log.bind(console,"[31m",Rt("ERROR"))),e<=Nt.warn&&(D.warn=console.warn?console.warn.bind(console,Rt("WARN"),"color: orange"):console.log.bind(console,"[33m",Rt("WARN"))),e<=Nt.info&&(D.info=console.info?console.info.bind(console,Rt("INFO"),"color: lightblue"):console.log.bind(console,"[34m",Rt("INFO"))),e<=Nt.debug&&(D.debug=console.debug?console.debug.bind(console,Rt("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",Rt("DEBUG"))),e<=Nt.trace&&(D.trace=console.debug?console.debug.bind(console,Rt("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",Rt("TRACE")))},"setLogLevel"),Rt=me(t=>`%c${(0,Lt.default)().format("ss.SSS")} : ${t} : `,"format")}),vr=b(()=>{Mt={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:me(t=>255<=t?255:t<0?0:t,"r"),g:me(t=>255<=t?255:t<0?0:t,"g"),b:me(t=>255<=t?255:t<0?0:t,"b"),h:me(t=>t%360,"h"),s:me(t=>100<=t?100:t<0?0:t,"s"),l:me(t=>100<=t?100:t<0?0:t,"l"),a:me(t=>1<=t?1:t<0?0:t,"a")},toLinear:me(t=>{var e=t/255;return.03928<t?Math.pow((.055+e)/1.055,2.4):e/12.92},"toLinear"),hue2rgb:me((t,e,r)=>(r<0&&(r+=1),1<r&&--r,r<.16666666666666666?t+6*(e-t)*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),"hue2rgb"),hsl2rgb:me(({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;var i=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return 255*Mt.hue2rgb(a,i,t+.3333333333333333);case"g":return 255*Mt.hue2rgb(a,i,t);case"b":return 255*Mt.hue2rgb(a,i,t-.3333333333333333)}},"hsl2rgb"),rgb2hsl:me(({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;var i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if("l"===n)return 100*s;if(i===a)return 0;var o=i-a;if("s"===n)return 100*(.5<s?o/(2-i-a):o/(i+a));switch(i){case t:return 60*((e-r)/o+(e<r?6:0));case e:return 60*((r-t)/o+2);case r:return 60*((t-e)/o+4);default:return-1}},"rgb2hsl")},Dt=Mt}),xr=b(()=>{Ot={clamp:me((t,e,r)=>r<e?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:me(t=>Math.round(1e10*t)/1e10,"round")},Pt=Ot}),br=b(()=>{Bt={dec2hex:me(t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t,"dec2hex")},$t=Bt}),wr=b(()=>{vr(),xr(),br(),Ft={channel:Dt,lang:Pt,unit:$t}}),kr=b(()=>{wr(),zt={};for(let t=0;t<=255;t++)zt[t]=Ft.unit.dec2hex(t);Gt={ALL:0,RGB:1,HSL:2}}),Tr=b(()=>{kr(),Ut=class{static{me(this,"Type")}constructor(){this.type=Gt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Gt.ALL}is(t){return this.type===t}},qt=Ut}),Er=b(()=>{wr(),Tr(),kr(),jt=class{static{me(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new qt}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=Gt.ALL,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=Ft.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=Ft.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=Ft.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=Ft.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=Ft.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=Ft.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(Gt.HSL)||void 0===e?(this._ensureHSL(),Ft.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(Gt.HSL)||void 0===e?(this._ensureHSL(),Ft.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(Gt.HSL)||void 0===e?(this._ensureHSL(),Ft.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(Gt.RGB)||void 0===e?(this._ensureRGB(),Ft.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(Gt.RGB)||void 0===e?(this._ensureRGB(),Ft.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(Gt.RGB)||void 0===e?(this._ensureRGB(),Ft.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(Gt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Gt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Gt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Gt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Gt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Gt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},Wt=jt}),Cr=b(()=>{Er(),Yt=new Wt({r:0,g:0,b:0,a:0},"transparent"),Ht=Yt}),Sr=b(()=>{Cr(),kr(),Vt={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:me(t=>{if(35===t.charCodeAt(0)){var e,r,n,i,a,s=t.match(Vt.re);if(s)return s=s[1],e=parseInt(s,16),s=s.length,Ht.set({r:(e>>(n=(r=4<s)?8:4)*(3+(i=(s=s%4==0)?0:-1))&(a=r?255:15))*(r=r?1:17),g:(e>>n*(2+i)&a)*r,b:(e>>n*(1+i)&a)*r,a:s?(e&a)*r/255:1},t)}},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?"#"+zt[Math.round(t)]+zt[Math.round(e)]+zt[Math.round(r)]+zt[Math.round(255*n)]:"#"+zt[Math.round(t)]+zt[Math.round(e)]+zt[Math.round(r)]},"stringify")},Xt=Vt}),_r=b(()=>{wr(),Cr(),Kt={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:me(t=>{if(r=t.match(Kt.hueRe)){var[,e,r]=r;switch(r){case"grad":return Ft.channel.clamp.h(.9*parseFloat(e));case"rad":return Ft.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return Ft.channel.clamp.h(360*parseFloat(e))}}return Ft.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:me(t=>{var e,r,n,i,a=t.charCodeAt(0);if((104===a||72===a)&&(a=t.match(Kt.re)))return[,a,e,r,n,i]=a,Ht.set({h:Kt._hue2deg(a),s:Ft.channel.clamp.s(parseFloat(e)),l:Ft.channel.clamp.l(parseFloat(r)),a:n?Ft.channel.clamp.a(i?parseFloat(n)/100:parseFloat(n)):1},t)},"parse"),stringify:me(t=>{var{h:t,s:e,l:r,a:n}=t;return n<1?`hsla(${Ft.lang.round(t)}, ${Ft.lang.round(e)}%, ${Ft.lang.round(r)}%, ${n})`:`hsl(${Ft.lang.round(t)}, ${Ft.lang.round(e)}%, ${Ft.lang.round(r)}%)`},"stringify")},Zt=Kt}),Ar=b(()=>{Sr(),Qt={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",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",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:me(t=>{if(t=t.toLowerCase(),t=Qt.colors[t])return Xt.parse(t)},"parse"),stringify:me(t=>{var e,r=Xt.stringify(t);for(e in Qt.colors)if(Qt.colors[e]===r)return e},"stringify")},Jt=Qt}),Lr=b(()=>{wr(),Cr(),te={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:me(t=>{var e,r,n,i,a,s,o,l=t.charCodeAt(0);if((114===l||82===l)&&(l=t.match(te.re)))return[,l,e,r,n,i,a,s,o]=l,Ht.set({r:Ft.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:Ft.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:Ft.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:s?Ft.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?`rgba(${Ft.lang.round(t)}, ${Ft.lang.round(e)}, ${Ft.lang.round(r)}, ${Ft.lang.round(n)})`:`rgb(${Ft.lang.round(t)}, ${Ft.lang.round(e)}, ${Ft.lang.round(r)})`},"stringify")},ee=te}),Nr=b(()=>{Sr(),_r(),Ar(),Lr(),kr(),re={format:{keyword:Jt,hex:Xt,rgb:ee,rgba:ee,hsl:Zt,hsla:Zt},parse:me(t=>{if("string"!=typeof t)return t;var e=Xt.parse(t)||ee.parse(t)||Zt.parse(t)||Jt.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:me(t=>!t.changed&&t.color?t.color:(t.type.is(Gt.HSL)||void 0===t.data.r?Zt:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?ee:Xt).stringify(t),"stringify")},ne=re}),Ir=b(()=>{wr(),Nr(),ie=me((t,e)=>{var r,n=ne.parse(t);for(r in e)n[r]=Ft.channel.clamp[r](e[r]);return ne.stringify(n)},"change"),ae=ie}),Rr=b(()=>{wr(),Cr(),Nr(),Ir(),se=me((t,e,r=0,n=1)=>"number"!=typeof t?ae(t,{a:e}):(t=Ht.set({r:Ft.channel.clamp.r(t),g:Ft.channel.clamp.g(e),b:Ft.channel.clamp.b(r),a:Ft.channel.clamp.a(n)}),ne.stringify(t)),"rgba"),oe=se}),Mr=b(()=>{wr(),Nr(),le=me((t,e)=>Ft.lang.round(ne.parse(t)[e]),"channel"),ce=le}),Dr=b(()=>{wr(),Nr(),he=me(t=>{var{r:t,g:e,b:r}=ne.parse(t),t=.2126*Ft.channel.toLinear(t)+.7152*Ft.channel.toLinear(e)+.0722*Ft.channel.toLinear(r);return Ft.lang.round(t)},"luminance"),ue=he}),Or=b(()=>{Dr(),de=me(t=>.5<=ue(t),"isLight"),pe=de}),Pr=b(()=>{Or(),ge=me(t=>!pe(t),"isDark"),fe=ge}),Br=b(()=>{wr(),Nr(),ve=me((t,e,r)=>{var n=(t=ne.parse(t))[e];return n!==(r=Ft.channel.clamp[e](n+r))&&(t[e]=r),ne.stringify(t)},"adjustChannel"),xe=ve}),$r=b(()=>{Br(),be=me((t,e)=>xe(t,"l",e),"lighten"),a=be}),Fr=b(()=>{Br(),we=me((t,e)=>xe(t,"l",-e),"darken"),ke=we}),zr=b(()=>{Nr(),Ir(),Te=me((t,e)=>{var r,n=ne.parse(t),i={};for(r in e)e[r]&&(i[r]=n[r]+e[r]);return ae(t,i)},"adjust"),r=Te}),Gr=b(()=>{Nr(),Rr(),Ee=me((t,e,r=50)=>{var{r:t,g:n,b:i,a}=ne.parse(t),{r:e,g:s,b:o,a:l}=ne.parse(e),c=2*(r/=100)-1,h=a-l;return oe(t*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+e*(h=1-c),n*c+s*h,i*c+o*h,a*r+l*(1-r))},"mix"),Ce=Ee}),Ur=b(()=>{Nr(),Gr(),Se=me((t,e=100)=>{var r=ne.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ce(r,t,e)},"invert"),n=Se}),qr=b(()=>{Rr(),Mr(),Pr(),$r(),Fr(),zr(),Ur()}),jr=b(()=>{qr()}),Wr=b(()=>{_e="#ffffff",Ae="#f2f2f2"}),Yr=b(()=>{jr(),Le=me((t,e)=>r(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),Hr=b(()=>{jr(),Wr(),Yr(),Ne=class{static{me(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Le(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Le(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Le(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||n(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||n(this.tertiaryColor),this.lineColor=this.lineColor||n(this.background),this.arrowheadColor=this.arrowheadColor||n(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ke(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ke(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||n(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||a(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ke(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ke(this.mainBkg,10)):(this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=ke(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=ke(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||n(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||a(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||ke(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;var e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{h:180,s:-15,l:e*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{h:180,s:-15,l:e*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||r(this.primaryColor,{h:64}),this.fillType3=this.fillType3||r(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||r(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||r(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||r(this.primaryColor,{h:128}),this.fillType7=this.fillType7||r(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||r(this.primaryColor,{l:-10}),this.pie5=this.pie5||r(this.secondaryColor,{l:-10}),this.pie6=this.pie6||r(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||r(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||r(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||fe(this.quadrant1Fill)?a:ke)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ke(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=ke(this.git0,25),this.git1=ke(this.git1,25),this.git2=ke(this.git2,25),this.git3=ke(this.git3,25),this.git4=ke(this.git4,25),this.git5=ke(this.git5,25),this.git6=ke(this.git6,25),this.git7=ke(this.git7,25)),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ae}calculate(e){var t;"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},Ie=me(t=>{var e=new Ne;return e.calculate(t),e},"getThemeVariables")}),Vr=b(()=>{jr(),Yr(),Re=class{static{me(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=a(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=n(this.background),this.secondaryBorderColor=Le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Le(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=a(n("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=oe(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=ke("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ke(this.sectionBkgColor,10),this.taskBorderColor=oe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=oe(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||a(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ke(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=a(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=a(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=a(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||n(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||a(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||fe(this.quadrant1Fill)?a:ke)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ke(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=a(this.secondaryColor,20),this.git1=a(this.pie2||this.secondaryColor,20),this.git2=a(this.pie3||this.tertiaryColor,20),this.git3=a(this.pie4||r(this.primaryColor,{h:-30}),20),this.git4=a(this.pie5||r(this.primaryColor,{h:-60}),20),this.git5=a(this.pie6||r(this.primaryColor,{h:-90}),10),this.git6=a(this.pie7||r(this.primaryColor,{h:60}),10),this.git7=a(this.pie8||r(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||a(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||a(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){var t;"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},Me=me(t=>{var e=new Re;return e.calculate(t),e},"getThemeVariables")}),Xr=b(()=>{jr(),Yr(),Wr(),De=class{static{me(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=r(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=Le(this.primaryColor,this.darkMode),this.secondaryBorderColor=Le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Le(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=oe(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ke(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ke(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=ke(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||ke(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||r(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||n(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||n(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=a(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||a(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||a(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||r(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||r(this.primaryColor,{l:-10}),this.pie5=this.pie5||r(this.secondaryColor,{l:-30}),this.pie6=this.pie6||r(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||r(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||r(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||fe(this.quadrant1Fill)?a:ke)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=ke(this.git0,25),this.git1=ke(this.git1,25),this.git2=ke(this.git2,25),this.git3=ke(this.git3,25),this.git4=ke(this.git4,25),this.git5=ke(this.git5,25),this.git6=ke(this.git6,25),this.git7=ke(this.git7,25)),this.gitInv0=this.gitInv0||ke(n(this.git0),25),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ae}calculate(e){var t;Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},Oe=me(t=>{var e=new De;return e.calculate(t),e},"getThemeVariables")}),Kr=b(()=>{jr(),Wr(),Yr(),Pe=class{static{me(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=a("#cde498",10),this.primaryBorderColor=Le(this.primaryColor,this.darkMode),this.secondaryBorderColor=Le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Le(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.primaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=ke(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ke(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ke(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=ke(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||ke(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||r(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||r(this.primaryColor,{l:-30}),this.pie5=this.pie5||r(this.secondaryColor,{l:-30}),this.pie6=this.pie6||r(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||r(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||r(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||fe(this.quadrant1Fill)?a:ke)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=ke(this.git0,25),this.git1=ke(this.git1,25),this.git2=ke(this.git2,25),this.git3=ke(this.git3,25),this.git4=ke(this.git4,25),this.git5=ke(this.git5,25),this.git6=ke(this.git6,25),this.git7=ke(this.git7,25)),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ae}calculate(e){var t;"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},Be=me(t=>{var e=new Pe;return e.calculate(t),e},"getThemeVariables")}),Zr=b(()=>{jr(),Yr(),Wr(),$e=class{static{me(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=a(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=Le(this.primaryColor,this.darkMode),this.secondaryBorderColor=Le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Le(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=a(this.contrast,55),this.border2=this.contrast,this.actorBorder=a(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||n(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||a(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||ke(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=a(this.contrast,30),this.sectionBkgColor2=a(this.contrast,30),this.taskBorderColor=ke(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=a(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ke(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||fe(this.quadrant1Fill)?a:ke)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ke(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||r(this.primaryColor,{h:-30}),this.git4=this.pie5||r(this.primaryColor,{h:-60}),this.git5=this.pie6||r(this.primaryColor,{h:-90}),this.git6=this.pie7||r(this.primaryColor,{h:60}),this.git7=this.pie8||r(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ae}calculate(e){var t;"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},Fe=me(t=>{var e=new $e;return e.calculate(t),e},"getThemeVariables")}),Qr=b(()=>{Hr(),Vr(),Xr(),Kr(),Zr(),ze={base:{getThemeVariables:Ie},dark:{getThemeVariables:Me},default:{getThemeVariables:Oe},forest:{getThemeVariables:Be},neutral:{getThemeVariables:Fe}}}),Jr=b(()=>{Ge={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}}),tn=b(()=>{Qr(),Jr(),Ue={...Ge,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ze.default.getThemeVariables(),sequence:{...Ge.sequence,messageFont:me(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:me(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:me(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Ge.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ge.c4,useWidth:void 0,personFont:me(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ge.flowchart,inheritDir:!1},external_personFont:me(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:me(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:me(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:me(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:me(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:me(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:me(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:me(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:me(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:me(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:me(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:me(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:me(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:me(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:me(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:me(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:me(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:me(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:me(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:me(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:me(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ge.pie,useWidth:984},xyChart:{...Ge.xyChart,useWidth:void 0},requirement:{...Ge.requirement,useWidth:void 0},packet:{...Ge.packet},radar:{...Ge.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},qe=me((r,n="")=>Object.keys(r).reduce((t,e)=>Array.isArray(r[e])?t:"object"==typeof r[e]&&null!==r[e]?[...t,n+e,...qe(r[e],"")]:[...t,n+e],[]),"keyify"),je=new Set(qe(Ue,"")),We=Ue}),en=b(()=>{tn(),t(),Ye=me(t=>{if(D.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>Ye(t));else{for(var e of Object.keys(t)){var r;if(D.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!je.has(e)||null==t[e])D.debug("sanitize deleting key: ",e),delete t[e];else if("object"==typeof t[e])D.debug("sanitizing object",e),Ye(t[e]);else for(r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(D.debug("sanitizing css option",e),t[e]=He(t[e]))}if(t.themeVariables)for(var n of Object.keys(t.themeVariables)){var i=t.themeVariables[n];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[n]="")}D.debug("After sanitization",t)}},"sanitizeDirective"),He=me(t=>{let e=0,r=0;for(var n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===n?e++:"}"===n&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss")}),rn=b(()=>{mr(),t(),Qr(),tn(),en(),Ve=Object.freeze(We),Xe=At({},Ve),Ze=[],Qe=At({},Ve),Je=me((t,e)=>{let r=At({},t),n={};for(var i of e)sr(i),n=At(n,i);return r=At(r,n),n.theme&&n.theme in ze&&(t=At({},Ke),e=At(t.themeVariables||{},n.themeVariables),r.theme)&&r.theme in ze&&(r.themeVariables=ze[r.theme].getThemeVariables(e)),dr(Qe=r),Qe},"updateCurrentConfig"),tr=me(t=>(Xe=At({},Ve),Xe=At(Xe,t),t.theme&&ze[t.theme]&&(Xe.themeVariables=ze[t.theme].getThemeVariables(t.themeVariables)),Je(Xe,Ze),Xe),"setSiteConfig"),er=me(t=>{Ke=At({},t)},"saveConfigFromInitialize"),rr=me(t=>(Xe=At(Xe,t),Je(Xe,Ze),Xe),"updateSiteConfig"),nr=me(()=>At({},Xe),"getSiteConfig"),ir=me(t=>(dr(t),At(Qe,t),ar()),"setConfig"),ar=me(()=>At({},Qe),"getConfig"),sr=me(e=>{e&&(["secure",...Xe.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(D.debug("Denied attempt to modify a secure key "+t,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],"object"==typeof e[t]&&sr(e[t])}))},"sanitize"),or=me(t=>{Ye(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Ze.push(t),Je(Xe,Ze)},"addDirective"),lr=me((t=Xe)=>{Je(t,Ze=[])},"reset"),cr={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},hr={},ur=me(t=>{hr[t]||(D.warn(cr[t]),hr[t]=!0)},"issueWarning"),dr=me(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ur("LAZY_LOAD_DEPRECATED")},"checkConfig"),pr=me(()=>{let t={};Ke&&(t=At(t,Ke));for(var e of Ze)t=At(t,e);return t},"getUserDefinedConfig")});function nn(i){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return vn(i,t,r)}}function an(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return xn(n,e)}}function sn(e,r){var n,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Cn;dn&&dn(e,null);let a=r.length;for(;a--;){let t=r[a];"string"==typeof t&&(n=i(t))!==t&&(pn(r)||(r[a]=n),t=n),e[t]=!0}return e}function on(e){for(let t=0;t<e.length;t++)In(e,t)||(e[t]=null);return e}function ln(t){var e,r,n=yn(null);for([e,r]of un(t))In(t,e)&&(Array.isArray(r)?n[e]=on(r):r&&"object"==typeof r&&r.constructor===Object?n[e]=ln(r):n[e]=r);return n}function cn(t,e){for(;null!==t;){var r=fn(t,e);if(r){if(r.get)return nn(r.get);if("function"==typeof r.value)return nn(r.value)}t=gn(t)}function n(){return null}return me(n,"fallbackValue"),n}function hn(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ni(),u=me(t=>hn(t),"DOMPurify");if(u.version="3.2.5",u.removed=[],!t||!t.document||t.document.nodeType!==ri.document||!t.Element)return u.isSupported=!1,u;let i=t.document,c=i,O=c.currentScript,{DocumentFragment:P,HTMLTemplateElement:B,Node:$,Element:F,NodeFilter:e,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:G,DOMParser:U,trustedTypes:d}=t,r=F.prototype,q=cn(r,"cloneNode"),j=cn(r,"remove"),W=cn(r,"nextSibling"),Y=cn(r,"childNodes"),s=cn(r,"parentNode");var H;"function"==typeof B&&(H=i.createElement("template")).content&&H.content.ownerDocument&&(i=H.content.ownerDocument);let p,h="",{implementation:V,createNodeIterator:X,createDocumentFragment:K,getElementsByTagName:Z}=i,Q=c.importNode,g=ai(),{MUSTACHE_EXPR:J,ERB_EXPR:tt,TMPLIT_EXPR:et,DATA_ATTR:rt,ARIA_ATTR:nt,IS_SCRIPT_OR_DATA:it,ATTR_WHITESPACE:at,CUSTOM_ELEMENT:st}=(u.isSupported="function"==typeof un&&"function"==typeof s&&V&&void 0!==V.createHTMLDocument,ei),ot=ei.IS_ALLOWED_URI,f=null,lt=sn({},[...Dn,...On,...Pn,...$n,...zn]),m=null,ct=sn({},[...Gn,...Un,...qn,...jn]),o=Object.seal(yn(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}})),y=null,ht=null,ut=!0,dt=!0,pt=!1,gt=!0,v=!1,ft=!0,x=!1,mt=!1,yt=!1,b=!1,w=!1,k=!1,vt=!0,xt=!1,bt=!0,T=!1,n,l=null,wt=sn({},["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"]),kt=null,Tt=sn({},["audio","video","img","source","image","track"]),Et=null,Ct=sn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",E="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml",S=C,St=!1,_t=null,At=sn({},[a,E,C],Sn),_=sn({},["mi","mo","mn","ms","mtext"]),A=sn({},["annotation-xml"]),Lt=sn({},["title","style","font","a","script"]),L=null,Nt=["application/xhtml+xml","text/html"],N=null,I=null,It=i.createElement("form"),Rt=me(function(t){return t instanceof RegExp||t instanceof Function},"isRegexOrFunction"),Mt=me(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!I||I!==t){if(t=ln(t&&"object"==typeof t?t:{}),L=-1===Nt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,N="application/xhtml+xml"===L?Sn:Cn,f=In(t,"ALLOWED_TAGS")?sn({},t.ALLOWED_TAGS,N):lt,m=In(t,"ALLOWED_ATTR")?sn({},t.ALLOWED_ATTR,N):ct,_t=In(t,"ALLOWED_NAMESPACES")?sn({},t.ALLOWED_NAMESPACES,Sn):At,Et=In(t,"ADD_URI_SAFE_ATTR")?sn(ln(Ct),t.ADD_URI_SAFE_ATTR,N):Ct,kt=In(t,"ADD_DATA_URI_TAGS")?sn(ln(Tt),t.ADD_DATA_URI_TAGS,N):Tt,l=In(t,"FORBID_CONTENTS")?sn({},t.FORBID_CONTENTS,N):wt,y=In(t,"FORBID_TAGS")?sn({},t.FORBID_TAGS,N):{},ht=In(t,"FORBID_ATTR")?sn({},t.FORBID_ATTR,N):{},n=!!In(t,"USE_PROFILES")&&t.USE_PROFILES,ut=!1!==t.ALLOW_ARIA_ATTR,dt=!1!==t.ALLOW_DATA_ATTR,pt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,gt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,v=t.SAFE_FOR_TEMPLATES||!1,ft=!1!==t.SAFE_FOR_XML,x=t.WHOLE_DOCUMENT||!1,b=t.RETURN_DOM||!1,w=t.RETURN_DOM_FRAGMENT||!1,k=t.RETURN_TRUSTED_TYPE||!1,yt=t.FORCE_BODY||!1,vt=!1!==t.SANITIZE_DOM,xt=t.SANITIZE_NAMED_PROPS||!1,bt=!1!==t.KEEP_CONTENT,T=t.IN_PLACE||!1,ot=t.ALLOWED_URI_REGEXP||Kn,S=t.NAMESPACE||C,_=t.MATHML_TEXT_INTEGRATION_POINTS||_,A=t.HTML_INTEGRATION_POINTS||A,o=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Rt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(o.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Rt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(o.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(o.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),v&&(dt=!1),w&&(b=!0),n&&(f=sn({},zn),m=[],!0===n.html&&(sn(f,Dn),sn(m,Gn)),!0===n.svg&&(sn(f,On),sn(m,Un),sn(m,jn)),!0===n.svgFilters&&(sn(f,Pn),sn(m,Un),sn(m,jn)),!0===n.mathMl)&&(sn(f,$n),sn(m,qn),sn(m,jn)),t.ADD_TAGS&&sn(f=f===lt?ln(f):f,t.ADD_TAGS,N),t.ADD_ATTR&&sn(m=m===ct?ln(m):m,t.ADD_ATTR,N),t.ADD_URI_SAFE_ATTR&&sn(Et,t.ADD_URI_SAFE_ATTR,N),t.FORBID_CONTENTS&&sn(l=l===wt?ln(l):l,t.FORBID_CONTENTS,N),bt&&(f["#text"]=!0),x&&sn(f,["html","head","body"]),f.table&&(sn(f,["tbody"]),delete y.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw Mn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw Mn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');p=t.TRUSTED_TYPES_POLICY,h=p.createHTML("")}else null!==(p=void 0===p?ii(d,O):p)&&"string"==typeof h&&(h=p.createHTML(""));mn&&mn(t),I=t}},"_parseConfig"),Dt=sn({},[...On,...Pn,...Bn]),Ot=sn({},[...$n,...Fn]),Pt=me(function(t){let e=s(t);e&&e.tagName||(e={namespaceURI:S,tagName:"template"});var r=Cn(t.tagName),n=Cn(e.tagName);return!!_t[t.namespaceURI]&&(t.namespaceURI===E?e.namespaceURI===C?"svg"===r:e.namespaceURI===a?"svg"===r&&("annotation-xml"===n||_[n]):!!Dt[r]:t.namespaceURI===a?e.namespaceURI===C?"math"===r:e.namespaceURI===E?"math"===r&&A[n]:!!Ot[r]:t.namespaceURI===C?!(e.namespaceURI===E&&!A[n]||e.namespaceURI===a&&!_[n]||Ot[r])&&(Lt[r]||!Dt[r]):!("application/xhtml+xml"!==L||!_t[t.namespaceURI]))},"_checkValidNamespace"),R=me(function(t){Tn(u.removed,{element:t});try{s(t).removeChild(t)}catch{j(t)}},"_forceRemove"),M=me(function(t,e){try{Tn(u.removed,{attribute:e.getAttributeNode(t),from:e})}catch{Tn(u.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(b||w)try{R(e)}catch{}else try{e.setAttribute(t,"")}catch{}},"_removeAttribute"),Bt=me(function(t){let e=null,r=null;yt?t="<remove></remove>"+t:(n=_n(t,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&S===C&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var n=p?p.createHTML(t):t;if(S===C)try{e=(new U).parseFromString(n,L)}catch{}if(!e||!e.documentElement){e=V.createDocument(S,"template",null);try{e.documentElement.innerHTML=St?h:n}catch{}}return n=e.body||e.documentElement,t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),S===C?Z.call(e,x?"html":"body")[0]:x?e.documentElement:n},"_initDocument"),$t=me(function(t){return X.call(t.ownerDocument||t,t,e.SHOW_ELEMENT|e.SHOW_COMMENT|e.SHOW_TEXT|e.SHOW_PROCESSING_INSTRUCTION|e.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),Ft=me(function(t){return t instanceof G&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof z)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},"_isClobbered"),zt=me(function(t){return"function"==typeof $&&t instanceof $},"_isNode");function D(t,e,r){bn(t,t=>{t.call(u,e,r,I)})}me(D,"_executeHooks");let Gt=me(function(e){let r=null;if(D(g.beforeSanitizeElements,e,null),!Ft(e)){var t=N(e.nodeName);if(D(g.uponSanitizeElement,e,{tagName:t,allowedTags:f}),!(e.hasChildNodes()&&!zt(e.firstElementChild)&&Rn(/<[/\w!]/g,e.innerHTML)&&Rn(/<[/\w!]/g,e.textContent)||e.nodeType===ri.progressingInstruction||ft&&e.nodeType===ri.comment&&Rn(/<[/\w]/g,e.data))){if(f[t]&&!y[t])return e instanceof F&&!Pt(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&Rn(/<\/no(script|embed|frames)/i,e.innerHTML)?(R(e),!0):(v&&e.nodeType===ri.text&&(r=e.textContent,bn([J,tt,et],t=>{r=An(r,t," ")}),e.textContent!==r)&&(Tn(u.removed,{element:e.cloneNode()}),e.textContent=r),D(g.afterSanitizeElements,e,null),!1);if(!y[t]&&qt(t)&&(o.tagNameCheck instanceof RegExp&&Rn(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t)))return!1;if(bt&&!l[t]){var n=s(e)||e.parentNode,i=Y(e)||e.childNodes;if(i&&n)for(let t=i.length-1;0<=t;--t){var a=q(i[t],!0);a.__removalCount=(e.__removalCount||0)+1,n.insertBefore(a,W(e))}}}}return R(e),!0},"_sanitizeElements"),Ut=me(function(t,e,r){if(vt&&("id"===e||"name"===e)&&(r in i||r in It))return!1;if((!dt||ht[e]||!Rn(rt,e))&&(!ut||!Rn(nt,e)))if(!m[e]||ht[e]){if(!(qt(t)&&(o.tagNameCheck instanceof RegExp&&Rn(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t))&&(o.attributeNameCheck instanceof RegExp&&Rn(o.attributeNameCheck,e)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(e))||"is"===e&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&Rn(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Et[e]&&!Rn(ot,An(r,at,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==Ln(r,"data:")||!kt[t])&&(!pt||Rn(it,An(r,at,"")))&&r)return!1;return!0},"_isValidAttribute"),qt=me(function(t){return"annotation-xml"!==t&&_n(t,st)},"_isBasicCustomElement"),jt=me(function(l){D(g.beforeSanitizeAttributes,l,null);var c=l.attributes;if(c&&!Ft(l)){let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},o=c.length;for(;o--;){let t=c[o],{name:e,namespaceURI:r,value:n}=t,i=N(e),a="value"===e?n:Nn(n);if(s.attrName=i,s.attrValue=a,s.keepAttr=!0,s.forceKeepAttr=void 0,D(g.uponSanitizeAttribute,l,s),a=s.attrValue,!xt||"id"!==i&&"name"!==i||(M(e,l),a="user-content-"+a),ft&&Rn(/((--!?|])>)|<\/(style|title)/i,a))M(e,l);else if(!s.forceKeepAttr&&(M(e,l),s.keepAttr))if(!gt&&Rn(/\/>/i,a))M(e,l);else{v&&bn([J,tt,et],t=>{a=An(a,t," ")});var h=N(l.nodeName);if(Ut(h,i,a)){if(p&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(h,i)){case"TrustedHTML":a=p.createHTML(a);break;case"TrustedScriptURL":a=p.createScriptURL(a)}try{r?l.setAttributeNS(r,e,a):l.setAttribute(e,a),Ft(l)?R(l):kn(u.removed)}catch{}}}}D(g.afterSanitizeAttributes,l,null)}},"_sanitizeAttributes"),Wt=me(function t(e){var r,n=$t(e);for(D(g.beforeSanitizeShadowDOM,e,null);r=n.nextNode();)D(g.uponSanitizeShadowNode,r,null),Gt(r),jt(r),r.content instanceof P&&t(r.content);D(g.afterSanitizeShadowDOM,e,null)},"_sanitizeShadowDOM");return u.sanitize=function(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null,n,i,a=null;if("string"!=typeof(t=(St=!t)?"\x3c!--\x3e":t)&&!zt(t)){if("function"!=typeof t.toString)throw Mn("toString is not a function");if("string"!=typeof(t=t.toString()))throw Mn("dirty is not a string, aborting")}if(!u.isSupported)return t;if(mt||Mt(e),u.removed=[],T="string"!=typeof t&&T){if(t.nodeName){var s=N(t.nodeName);if(!f[s]||y[s])throw Mn("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof $)(n=(r=Bt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType===ri.element&&"BODY"===n.nodeName||"HTML"===n.nodeName?r=n:r.appendChild(n);else{if(!b&&!v&&!x&&-1===t.indexOf("<"))return p&&k?p.createHTML(t):t;if(!(r=Bt(t)))return b?null:k?h:""}r&&yt&&R(r.firstChild);for(var o=$t(T?t:r);i=o.nextNode();)Gt(i),jt(i),i.content instanceof P&&Wt(i.content);if(T)return t;if(b){if(w)for(a=K.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return a=m.shadowroot||m.shadowrootmode?Q.call(c,a,!0):a}let l=x?r.outerHTML:r.innerHTML;return x&&f["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Rn(Jn,r.ownerDocument.doctype.name)&&(l="<!DOCTYPE "+r.ownerDocument.doctype.name+`> +`+l),v&&bn([J,tt,et],t=>{l=An(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Mt(t),mt=!0},u.clearConfig=function(){I=null,mt=!1},u.isValidAttribute=function(t,e,r){return I||Mt({}),t=N(t),e=N(e),Ut(t,e,r)},u.addHook=function(t,e){"function"==typeof e&&Tn(g[t],e)},u.removeHook=function(t,e){return void 0!==e?-1===(e=wn(g[t],e))?void 0:En(g[t],e,1)[0]:kn(g[t])},u.removeHooks=function(t){g[t]=[]},u.removeAllHooks=function(){g=ai()},u}var un,dn,pn,gn,fn,mn,yn,vn,xn,bn,wn,kn,Tn,En,Cn,Sn,_n,An,Ln,Nn,In,Rn,Mn,Dn,On,Pn,Bn,$n,Fn,zn,Gn,Un,qn,jn,Wn,Yn,Hn,Vn,Xn,Kn,Zn,Qn,Jn,ti,ei,ri,ni,ii,ai,si,oi=b(()=>{({entries:un,setPrototypeOf:dn,isFrozen:pn,getPrototypeOf:gn,getOwnPropertyDescriptor:fn}=Object),{freeze:mn,seal:ti,create:yn}=Object,{apply:vn,construct:xn}=typeof Reflect<"u"&&Reflect,mn=mn||me(function(t){return t},"freeze"),ti=ti||me(function(t){return t},"seal"),vn=vn||me(function(t,e,r){return t.apply(e,r)},"apply"),xn=xn||me(function(t,e){return new t(...e)},"construct"),bn=nn(Array.prototype.forEach),wn=nn(Array.prototype.lastIndexOf),kn=nn(Array.prototype.pop),Tn=nn(Array.prototype.push),En=nn(Array.prototype.splice),Cn=nn(String.prototype.toLowerCase),Sn=nn(String.prototype.toString),_n=nn(String.prototype.match),An=nn(String.prototype.replace),Ln=nn(String.prototype.indexOf),Nn=nn(String.prototype.trim),In=nn(Object.prototype.hasOwnProperty),Rn=nn(RegExp.prototype.test),Mn=an(TypeError),me(nn,"unapply"),me(an,"unconstruct"),me(sn,"addToSet"),me(on,"cleanArray"),me(ln,"clone"),me(cn,"lookupGetter"),Dn=mn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),On=mn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Pn=mn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Bn=mn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),$n=mn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Fn=mn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zn=mn(["#text"]),Gn=mn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Un=mn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),qn=mn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jn=mn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wn=ti(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Yn=ti(/<%[\w\W]*|[\w\W]*%>/gm),Hn=ti(/\$\{[\w\W]*/gm),Vn=ti(/^data-[\-\w.\u00B7-\uFFFF]+$/),Xn=ti(/^aria-[\-\w]+$/),Kn=ti(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zn=ti(/^(?:\w+script|data):/i),Qn=ti(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jn=ti(/^html$/i),ti=ti(/^[a-z][.\w]*(-[.\w]+)+$/i),ei=Object.freeze({__proto__:null,ARIA_ATTR:Xn,ATTR_WHITESPACE:Qn,CUSTOM_ELEMENT:ti,DATA_ATTR:Vn,DOCTYPE_NAME:Jn,ERB_EXPR:Yn,IS_ALLOWED_URI:Kn,IS_SCRIPT_OR_DATA:Zn,MUSTACHE_EXPR:Wn,TMPLIT_EXPR:Hn}),ri={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ni=me(function(){return"u"<typeof window?null:window},"getGlobal"),ii=me(function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;var r="data-tt-policy-suffix";e="dompurify"+((r=e&&e.hasAttribute(r)?e.getAttribute(r):null)?"#"+r:"");try{return t.createPolicy(e,{createHTML(t){return t},createScriptURL(t){return t}})}catch{return console.warn("TrustedTypes policy "+e+" could not be created."),null}},"_createTrustedTypesPolicy"),ai=me(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),me(hn,"createDOMPurify"),si=hn()}),li={};function ci(t){return String(t).replace(qi,t=>Ui[t])}function hi(t){if(t.default)return t.default;if(t=t.type,"string"!=typeof(t=Array.isArray(t)?t[0]:t))return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function ui(t){for(var e=0;e<na.length;e++)for(var r=na[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name}return null}function di(t){for(var e=0;e<ia.length;e+=2)if(ia[e]<=t&&t<=ia[e+1])return!0;return!1}function pi(t,e){ya[t]=e}function gi(t,e,r){if(!ya[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=ya[e][n];if(!i&&t[0]in xa&&(n=xa[t[0]].charCodeAt(0),i=ya[e][n]),i=!i&&"text"===r&&di(n)?ya[e][77]:i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function fi(t){var e=5<=t?0:3<=t?1:2;if(!ba[e]){var r,n=ba[e]={cssEmPerMu:va.quad[e]/18};for(r in va)va.hasOwnProperty(r)&&(n[r]=va[r][e])}return ba[e]}function mi(t){if(t instanceof $a)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function yi(t){if(t instanceof Da)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}function e(t,e,r,n,i,a){ja[t][i]={font:e,group:r,replace:n},a&&n&&(ja[t][n]=ja[t][i])}function o(t){for(var{type:t,names:e,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=t,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},o=0;o<e.length;++o)_s[e[o]]=s;t&&(i&&(As[t]=i),a)&&(Ls[t]=a)}function vi(t){var{type:t,htmlBuilder:e,mathmlBuilder:r}=t;o({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:e,mathmlBuilder:r})}function xi(t,e){return t=Rs(["base"],t,e),(e=Rs(["strut"])).style.height=K(t.height+t.depth),t.depth&&(e.style.verticalAlign=K(-t.depth)),t.children.unshift(e),t}function bi(t,e){var r,n=null,i=(1===t.length&&"tag"===t[0].type&&(n=t[0].tag,t=t[0].body),Bs(t,e,"root"));2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var a,s=[],o=[],l=0;l<i.length;l++)if(o.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,o.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(s.push(xi(o,e)),o=[])}else i[l].hasClass("newline")&&(o.pop(),0<o.length&&(s.push(xi(o,e)),o=[]),s.push(i[l]));return 0<o.length&&s.push(xi(o,e)),n?((a=xi(Bs(n,e,!0))).classes=["tag"],s.push(a)):r&&s.push(r),(t=Rs(["katex-html"],s)).setAttribute("aria-hidden","true"),a&&((n=a.children[0]).style.height=K(t.height+t.depth),t.depth)&&(n.style.verticalAlign=K(-t.depth)),t}function wi(t){return new ma(t)}function ki(t){var e;return!!t&&("mi"===t.type&&1===t.children.length?(e=t.children[0])instanceof Ws&&"."===e.text:"mo"===t.type&&1===t.children.length&&"true"===t.getAttribute("separator")&&"0em"===t.getAttribute("lspace")&&"0em"===t.getAttribute("rspace")&&(e=t.children[0])instanceof Ws&&","===e.text)}function Ti(t,e,r,n,i){return r=1===(t=Xs(t,r)).length&&t[0]instanceof js&&Yi.contains(["mrow","mtable"],t[0].type)?t[0]:new E.MathNode("mrow",t),(t=new E.MathNode("annotation",[new E.TextNode(e)])).setAttribute("encoding","application/x-tex"),e=new E.MathNode("semantics",[r,t]),(r=new E.MathNode("math",[e])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&r.setAttribute("display","block"),Z.makeSpan([i?"katex":"katex-mathml"],[r])}function Ei(t,e){if(t&&t.type===e)return t;throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)))}function Ci(t){var e=Si(t);if(e)return e;throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)))}function Si(t){return t&&("atom"===t.type||qa.hasOwnProperty(t.type))?t:null}function _i(t,e){var r=Bs(t.body,e,!0);return co([t.mclass],r,e)}function Ai(t,e){var r,e=Xs(t.body,e);return"minner"===t.mclass?r=new E.MathNode("mpadded",e):"mord"===t.mclass?t.isCharacterBox?(r=e[0]).type="mi":r=new E.MathNode("mi",e):(t.isCharacterBox?(r=e[0]).type="mo":r=new E.MathNode("mo",e),"mbin"===t.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===t.mclass||"mclose"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===t.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function Li(t,e,r){var n=uo[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":var i=r.callFunction("\\\\cdleft",[e[0]],[]),a=r.callFunction("\\Big",[{type:"atom",text:n,mode:"math",family:"rel"}],[]),s=r.callFunction("\\\\cdright",[e[1]],[]);return r.callFunction("\\\\cdparent",[{type:"ordgroup",mode:"math",body:[i,a,s]}],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}function Ni(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"!==r)throw new X("Expected \\\\ or \\cr or \\end",t.nextToken);0===e[e.length-1].length&&e.pop();break}t.consume()}for(var n=[],i=[n],a=0;a<e.length;a++){for(var s=e[a],o=po(),l=0;l<s.length;l++)if(go(s[l])){n.push(o);var c=Ci(s[l+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(c))){if(!(-1<"<>AV".indexOf(c)))throw new X('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var d=!0,p=l+1;p<s.length;p++){if(fo(s[p],c)){d=!1,l=p;break}if(go(s[p]))throw new X("Missing a "+c+" character to complete a CD arrow.",s[p]);h[u].body.push(s[p])}if(d)throw new X("Missing a "+c+" character to complete a CD arrow.",s[l])}}var g=Li(c,h,t);n.push({type:"styling",body:[g],mode:"math",style:"display"}),o=po()}else o.body.push(s[l]);a%2==0?n.push(o):n.shift(),i.push(n=[])}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function Ii(t,e){var r=Si(t);if(r&&Yi.contains(Wo,r.text))return r;throw new X(r?"Invalid delimiter '"+r.text+"' after '"+e.funcName+"'":"Invalid delimiter type '"+t.type+"'",t)}function Ri(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function Mi(t){for(var{type:t,names:e,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=t,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},o=0;o<e.length;++o)Yo[e[o]]=s;i&&(As[t]=i),a&&(Ls[t]=a)}function l(t,e){Ho[t]=e}function Di(t){var e=[],r=(t.consumeSpaces(),t.fetch().text);for("\\relax"===r&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);"\\hline"===r||"\\hdashline"===r;)t.consume(),e.push("\\hdashline"===r),t.consumeSpaces(),r=t.fetch().text;return e}function Oi(t){if(-1===t.indexOf("ed"))return-1===t.indexOf("*")}function Pi(t,e,r){var{hskipBeforeAndAfter:e,addJot:n,cols:i,arraystretch:a,colSeparationType:s,autoTag:o,singleRow:l,emptySingleRow:c,maxNumCols:h,leqno:u}=e;if(t.gullet.beginGroup(),l||t.gullet.macros.set("\\cr","\\\\\\relax"),!a){var d=t.gullet.expandMacroAsText("\\arraystretch");if(null==d)a=1;else if(!(a=parseFloat(d))||a<0)throw new X("Invalid \\arraystretch: "+d)}t.gullet.beginGroup();var p=[],g=[p],f=[],m=[],y=null!=o?[]:void 0;function v(){o&&t.gullet.macros.set("\\@eqnsw","1",!0)}function x(){y&&(t.gullet.macros.get("\\df@tag")?(y.push(t.subparse([new zi("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!o&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(me(v,"beginRow"),me(x,"endRow"),v(),m.push(Di(t));;){var b=t.parseExpression(!1,l?"\\end":"\\\\"),w=(t.gullet.endGroup(),t.gullet.beginGroup(),b={type:"ordgroup",mode:t.mode,body:b},r&&(b={type:"styling",mode:t.mode,style:r,body:[b]}),p.push(b),t.fetch().text);if("&"===w){if(h&&p.length===h){if(l||s)throw new X("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===w){x(),1===p.length&&"styling"===b.type&&0===b.body[0].body.length&&(1<g.length||!c)&&g.pop(),m.length<g.length+1&&m.push([]);break}if("\\\\"!==w)throw new X("Expected & or \\\\ or \\cr or \\end",t.nextToken);t.consume(),b=void 0," "!==t.gullet.future().text&&(b=t.parseSizeGroup(!0)),f.push(b?b.value:null),x(),m.push(Di(t)),g.push(p=[]),v()}}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:n,arraystretch:a,body:g,cols:i,rowGaps:f,hskipBeforeAndAfter:e,hLinesBeforeRow:m,colSeparationType:s,tags:y,leqno:u}}function Bi(t){return"d"===t.slice(0,1)?"display":"text"}function $i(t,e,r){for(var n=Bs(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var s=n[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[a].classes,e.sizingClasses(r)):n[a].classes[s+1]==="reset-size"+e.size&&(n[a].classes[s+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return Z.makeFragment(n)}(KBt=(t,e)=>{for(var r in e)R(t,r,{get:e[r],enumerable:!0})})(li,{ParseError:()=>X,SETTINGS_SCHEMA:()=>Hi,__defineFunction:()=>o,__defineMacro:()=>l,__defineSymbol:()=>e,__domTree:()=>Jl,__parse:()=>Vl,__renderToDomTree:()=>Kl,__renderToHTMLTree:()=>Zl,__setFontMetrics:()=>pi,default:()=>tc,render:()=>Yl,renderToString:()=>Hl,version:()=>Ql});var Fi,zi,X,Gi,Ui,qi,ji,Wi,Yi,Hi,Vi,Xi,Ki,Zi,Qi,Ji,ta,ea,ra,na,ia,aa,sa,oa,la,ca,ha,ua,da,pa,ga,fa,ma,ya,va,xa,ba,wa,ka,Ta,Ea,Ca,Sa,_a,Aa,K,La,Na,Ia,Ra,Ma,Da,Oa,Pa,Ba,$a,Fa,za,Ga,Ua,qa,ja,h,u,d,Wa,p,Ya,Ha,Va,Xa,Ka,Za,Qa,Ja,ts,es,rs,ns,is,as,ss,os,ls,cs,hs,us,ds,ps,gs,fs,ms,ys,vs,xs,bs,ws,ks,Ts,Es,Z,Cs,Ss,_s,As,Ls,Ns,Is,Rs,Ms,Ds,Os,Ps,Bs,$s,Fs,zs,Gs,Us,qs,js,Ws,E,Ys,Hs,Vs,Xs,Ks,Zs,Qs,Js,to,eo,ro,no,io,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,vo,xo,bo,wo,ko,To,Eo,Co,So,_o,Ao,Lo,No,Io,Ro,Mo,Do,Oo,Po,Bo,$o,Fo,zo,Go,Uo,qo,jo,Wo,Yo,Ho,Vo,Xo,Ko,g,Zo,Qo,Jo,tl,el,rl,nl,f,il,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,xl,bl,wl,kl,Tl,El,Cl,Sl,_l,m,Al,Ll,Nl,Il,Rl,Ml,Dl,Ol,Pl,Bl,$l,Fl,zl,Gl,Ul,ql,jl,Wl,Yl,Hl,Vl,Xl,Kl,Zl,Ql,Jl,tc,ec=b(()=>{for(Fi=class r{static{me(this,"SourceLocation")}constructor(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new r(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}},zi=class n{static{me(this,"Token")}constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(t,e){return new n(e,Fi.range(this,t))}},(X=class s{static{me(this,"ParseError")}constructor(t,e){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,i,a="KaTeX parse error: "+t;return(e=e&&e.loc)&&e.start<=e.end&&(r=e.lexer.input,n=e.start,i=e.end,n===r.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ",e=r.slice(n,i).replace(/[^]/g,"$&̲"),a+=(15<n?"…"+r.slice(n-15,n):r.slice(0,n))+e+(i+15<r.length?r.slice(i,i+15)+"…":r.slice(i))),(e=new Error(a)).name="ParseError",e.__proto__=s.prototype,null!=(e.position=n)&&null!=i&&(e.length=i-n),e.rawMessage=t,e}}).prototype.__proto__=Error.prototype,fl=me(function(t,e){return-1!==t.indexOf(e)},"contains"),f=me(function(t,e){return void 0===t?e:t},"deflt"),Gi=/([A-Z])/g,Bl=me(function(t){return t.replace(Gi,"-$1").toLowerCase()},"hyphenate"),Ui={"&":"&",">":">","<":"<",'"':""","'":"'"},qi=/[&><"']/g,me(ci,"escape"),ji=me(function t(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e},"getBaseElem"),g=me(function(t){return"mathord"===(t=ji(t)).type||"textord"===t.type||"atom"===t.type},"isCharacterBox"),Wi=me(function(t){if(t)return t;throw new Error("Expected non-null, but got "+String(t))},"assert"),cl=me(function(t){return(t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t))?":"===t[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},"protocolFromUrl"),Yi={contains:fl,deflt:f,escape:ci,hyphenate:Bl,getBaseElem:ji,isCharacterBox:g,protocolFromUrl:cl},Hi={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:me(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:me((t,e)=>(e.push(t),e),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:me(t=>Math.max(0,t),"processor"),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:me(t=>Math.max(0,t),"processor"),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:me(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand <n>",cliProcessor:me(t=>"Infinity"===t?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},me(hi,"getDefaultValue"),Vi=class{static{me(this,"Settings")}constructor(t){for(var e in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{},Hi){var r;Hi.hasOwnProperty(e)&&(r=Hi[e],this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:hi(r))}}reportNonstrict(t,e,r){var n=this.strict;if((n="function"==typeof n?n(t,e,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var n=this.strict;if("function"==typeof n)try{n=n(t,e,r)}catch{n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]"),1))}isTrusted(t){if(t.url&&!t.protocol){var e=Yi.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}return!!("function"==typeof this.trust?this.trust(t):this.trust)}},fl=class{static{me(this,"Style")}constructor(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}sup(){return Xi[Ki[this.id]]}sub(){return Xi[Zi[this.id]]}fracNum(){return Xi[Qi[this.id]]}fracDen(){return Xi[Ji[this.id]]}cramp(){return Xi[ta[this.id]]}text(){return Xi[ea[this.id]]}isTight(){return 2<=this.size}},Xi=[new fl(0,0,!1),new fl(1,0,!0),new fl(2,1,!1),new fl(3,1,!0),new fl(4,2,!1),new fl(5,2,!0),new fl(6,3,!1),new fl(7,3,!0)],Ki=[4,5,4,5,6,7,6,7],Zi=[5,5,5,5,7,7,7,7],Qi=[2,3,4,5,6,7,6,7],Ji=[3,3,5,5,7,7,7,7],ta=[1,1,3,3,5,5,7,7],ea=[0,1,2,3,2,3,2,3],ra={DISPLAY:Xi[0],TEXT:Xi[2],SCRIPT:Xi[4],SCRIPTSCRIPT:Xi[6]},na=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],me(ui,"scriptFromCodepoint"),ia=[],na.forEach(t=>t.blocks.forEach(t=>ia.push(...t))),me(di,"supportedCodepoint"),aa=me(function(t,e){return"M95,"+(622+t+e)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+t/2.075+" -"+t+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+t)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtMain"),sa=me(function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+t/2.084+" -"+t+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+t)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize1"),oa=me(function(t,e){return"M983 "+(10+t+e)+` +l`+t/3.13+" -"+t+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize2"),la=me(function(t,e){return"M424,"+(2398+t+e)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+t)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+e+` +h400000v`+(40+t)+"h-400000z"},"sqrtSize3"),ca=me(function(t,e){return"M473,"+(2713+t+e)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},"sqrtSize4"),ha=me(function(t){return"M400000 "+t+" H0 L"+t/2+" 0 l65 45 L145 "+(t-80)+" H400000z"},"phasePath"),ua=me(function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+` +H742v`+(r-54-e-t)+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+e+"H400000v"+(40+t)+"H742z"},"sqrtTall"),da=me(function(t,e,r){e*=1e3;var n="";switch(t){case"sqrtMain":n=aa(e,80);break;case"sqrtSize1":n=sa(e,80);break;case"sqrtSize2":n=oa(e,80);break;case"sqrtSize3":n=la(e,80);break;case"sqrtSize4":n=ca(e,80);break;case"sqrtTall":n=ua(e,80,r)}return n},"sqrtPath"),pa=me(function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}},"innerPath"),ga={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},fa=me(function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+` v585 h43z +M367 15 v585 v`+e+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v602 h84z +M403 1759 V0 H319 V1759 v`+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v602 h84z +M347 1759 V0 h-84 V1759 v`+e+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(e+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(e+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(e+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),ma=class{static{me(this,"DocumentFragment")}constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return Yi.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){for(var t="",e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){var t=me(t=>t.toText(),"toText");return this.children.map(t).join("")}},ya={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},va={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},xa={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"},me(pi,"setFontMetrics"),me(gi,"getCharacterMetrics"),ba={},me(fi,"getGlobalMetrics"),wa=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],ka=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ta=me(function(t,e){return e.size<2?t:wa[t-1][e.size-1]},"sizeAtStyle"),(Ea=class i{static{me(this,"Options")}constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||i.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=ka[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var e,r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return new i(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Ta(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:ka[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Ta(i.BASESIZE,t);return this.size===e&&this.textSize===i.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=fi(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Ca={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Sa={ex:!0,em:!0,mu:!0},_a=me(function(t){return(t="string"!=typeof t?t.unit:t)in Ca||t in Sa||"ex"===t},"validUnit"),Aa=me(function(t,e){var r;if(t.unit in Ca)r=Ca[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var n=e.style.isTight()?e.havingStyle(e.style.text()):e;if("ex"===t.unit)r=n.fontMetrics().xHeight;else{if("em"!==t.unit)throw new X("Invalid unit: '"+t.unit+"'");r=n.fontMetrics().quad}n!==e&&(r*=n.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},"calculateSize"),K=me(function(t){return+t.toFixed(4)+"em"},"makeEm"),La=me(function(t){return t.filter(t=>t).join(" ")},"createClass"),Na=me(function(t,e,r){this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},e&&(e.style.isTight()&&this.classes.push("mtight"),t=e.getColor())&&(this.style.color=t)},"initNode"),Ia=me(function(t){var e,r,n=document.createElement(t);for(e in n.className=La(this.classes),this.style)this.style.hasOwnProperty(e)&&(n.style[e]=this.style[e]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)n.appendChild(this.children[i].toNode());return n},"toNode"),Ra=/[\s"'>/=\x00-\x1f]/,Ma=me(function(t){var e,r,n="<"+t,i=(this.classes.length&&(n+=' class="'+Yi.escape(La(this.classes))+'"'),"");for(e in this.style)this.style.hasOwnProperty(e)&&(i+=Yi.hyphenate(e)+":"+this.style[e]+";");for(r in i&&(n+=' style="'+Yi.escape(i)+'"'),this.attributes)if(this.attributes.hasOwnProperty(r)){if(Ra.test(r))throw new X("Invalid attribute name '"+r+"'");n+=" "+r+'="'+Yi.escape(this.attributes[r])+'"'}n+=">";for(var a=0;a<this.children.length;a++)n+=this.children[a].toMarkup();return n+"</"+t+">"},"toMarkup"),Da=class{static{me(this,"Span")}constructor(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Na.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return Yi.contains(this.classes,t)}toNode(){return Ia.call(this,"span")}toMarkup(){return Ma.call(this,"span")}},Oa=class{static{me(this,"Anchor")}constructor(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Na.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return Yi.contains(this.classes,t)}toNode(){return Ia.call(this,"a")}toMarkup(){return Ma.call(this,"a")}},Pa=class{static{me(this,"Img")}constructor(t,e,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=e,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return Yi.contains(this.classes,t)}toNode(){var t,e=document.createElement("img");for(t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var t,e='<img src="'+Yi.escape(this.src)+'" alt="'+Yi.escape(this.alt)+'"',r="";for(t in this.style)this.style.hasOwnProperty(t)&&(r+=Yi.hyphenate(t)+":"+this.style[t]+";");return r&&(e+=' style="'+Yi.escape(r)+'"'),e+"'/>"}},Ba={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},$a=class{static{me(this,"SymbolNode")}constructor(t,e,r,n,i,a,s,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=e||0,this.depth=r||0,this.italic=n||0,this.skew=i||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(t=ui(this.text.charCodeAt(0)))&&this.classes.push(t+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ba[this.text])}hasClass(t){return Yi.contains(this.classes,t)}toNode(){var t,e=document.createTextNode(this.text),r=null;for(t in 0<this.italic&&((r=document.createElement("span")).style.marginRight=K(this.italic)),0<this.classes.length&&((r=r||document.createElement("span")).className=La(this.classes)),this.style)this.style.hasOwnProperty(t)&&(r=r||document.createElement("span"),r.style[t]=this.style[t]);return r?(r.appendChild(e),r):e}toMarkup(){var t,e=!1,r="<span",n=(this.classes.length&&(e=!0,r=(r+=' class="')+Yi.escape(La(this.classes))+'"'),"");for(t in 0<this.italic&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(t)&&(n+=Yi.hyphenate(t)+":"+this.style[t]+";");n&&(e=!0,r+=' style="'+Yi.escape(n)+'"');var i=Yi.escape(this.text);return e?(r+=">")+i+"</span>":i}},Fa=class{static{me(this,"SvgNode")}constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var t,e='<svg xmlns="http://www.w3.org/2000/svg"';for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Yi.escape(this.attributes[t])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+"</svg>"}},za=class{static{me(this,"PathNode")}constructor(t,e){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=e}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",ga[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+Yi.escape(this.alternate)+'"/>':'<path d="'+Yi.escape(ga[this.pathName])+'"/>'}},Ga=class{static{me(this,"LineNode")}constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","line");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var t,e="<line";for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Yi.escape(this.attributes[t])+'"');return e+"/>"}},me(mi,"assertSymbolDomNode"),me(yi,"assertSpan"),Ua={bin:1,close:1,inner:1,open:1,punct:1,rel:1},qa={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ja={math:{},text:{}},me(e,"defineSymbol"),u="text",f="ams",Bl="accent-token",g="bin",cl="close",fl="inner",Wa="mathord",Pl="op-token",tl="open",pl="punct",Jo="spacing",p="textord",e(h="math",d="main",m="rel","≡","\\equiv",!0),e(h,d,m,"≺","\\prec",!0),e(h,d,m,"≻","\\succ",!0),e(h,d,m,"∼","\\sim",!0),e(h,d,m,"⊥","\\perp"),e(h,d,m,"⪯","\\preceq",!0),e(h,d,m,"⪰","\\succeq",!0),e(h,d,m,"≃","\\simeq",!0),e(h,d,m,"∣","\\mid",!0),e(h,d,m,"≪","\\ll",!0),e(h,d,m,"≫","\\gg",!0),e(h,d,m,"≍","\\asymp",!0),e(h,d,m,"∥","\\parallel"),e(h,d,m,"⋈","\\bowtie",!0),e(h,d,m,"⌣","\\smile",!0),e(h,d,m,"⊑","\\sqsubseteq",!0),e(h,d,m,"⊒","\\sqsupseteq",!0),e(h,d,m,"≐","\\doteq",!0),e(h,d,m,"⌢","\\frown",!0),e(h,d,m,"∋","\\ni",!0),e(h,d,m,"∝","\\propto",!0),e(h,d,m,"⊢","\\vdash",!0),e(h,d,m,"⊣","\\dashv",!0),e(h,d,m,"∋","\\owns"),e(h,d,pl,".","\\ldotp"),e(h,d,pl,"⋅","\\cdotp"),e(h,d,p,"#","\\#"),e(u,d,p,"#","\\#"),e(h,d,p,"&","\\&"),e(u,d,p,"&","\\&"),e(h,d,p,"ℵ","\\aleph",!0),e(h,d,p,"∀","\\forall",!0),e(h,d,p,"ℏ","\\hbar",!0),e(h,d,p,"∃","\\exists",!0),e(h,d,p,"∇","\\nabla",!0),e(h,d,p,"♭","\\flat",!0),e(h,d,p,"ℓ","\\ell",!0),e(h,d,p,"♮","\\natural",!0),e(h,d,p,"♣","\\clubsuit",!0),e(h,d,p,"℘","\\wp",!0),e(h,d,p,"♯","\\sharp",!0),e(h,d,p,"♢","\\diamondsuit",!0),e(h,d,p,"ℜ","\\Re",!0),e(h,d,p,"♡","\\heartsuit",!0),e(h,d,p,"ℑ","\\Im",!0),e(h,d,p,"♠","\\spadesuit",!0),e(h,d,p,"§","\\S",!0),e(u,d,p,"§","\\S"),e(h,d,p,"¶","\\P",!0),e(u,d,p,"¶","\\P"),e(h,d,p,"†","\\dag"),e(u,d,p,"†","\\dag"),e(u,d,p,"†","\\textdagger"),e(h,d,p,"‡","\\ddag"),e(u,d,p,"‡","\\ddag"),e(u,d,p,"‡","\\textdaggerdbl"),e(h,d,cl,"⎱","\\rmoustache",!0),e(h,d,tl,"⎰","\\lmoustache",!0),e(h,d,cl,"⟯","\\rgroup",!0),e(h,d,tl,"⟮","\\lgroup",!0),e(h,d,g,"∓","\\mp",!0),e(h,d,g,"⊖","\\ominus",!0),e(h,d,g,"⊎","\\uplus",!0),e(h,d,g,"⊓","\\sqcap",!0),e(h,d,g,"∗","\\ast"),e(h,d,g,"⊔","\\sqcup",!0),e(h,d,g,"◯","\\bigcirc",!0),e(h,d,g,"∙","\\bullet",!0),e(h,d,g,"‡","\\ddagger"),e(h,d,g,"≀","\\wr",!0),e(h,d,g,"⨿","\\amalg"),e(h,d,g,"&","\\And"),e(h,d,m,"⟵","\\longleftarrow",!0),e(h,d,m,"⇐","\\Leftarrow",!0),e(h,d,m,"⟸","\\Longleftarrow",!0),e(h,d,m,"⟶","\\longrightarrow",!0),e(h,d,m,"⇒","\\Rightarrow",!0),e(h,d,m,"⟹","\\Longrightarrow",!0),e(h,d,m,"↔","\\leftrightarrow",!0),e(h,d,m,"⟷","\\longleftrightarrow",!0),e(h,d,m,"⇔","\\Leftrightarrow",!0),e(h,d,m,"⟺","\\Longleftrightarrow",!0),e(h,d,m,"↦","\\mapsto",!0),e(h,d,m,"⟼","\\longmapsto",!0),e(h,d,m,"↗","\\nearrow",!0),e(h,d,m,"↩","\\hookleftarrow",!0),e(h,d,m,"↪","\\hookrightarrow",!0),e(h,d,m,"↘","\\searrow",!0),e(h,d,m,"↼","\\leftharpoonup",!0),e(h,d,m,"⇀","\\rightharpoonup",!0),e(h,d,m,"↙","\\swarrow",!0),e(h,d,m,"↽","\\leftharpoondown",!0),e(h,d,m,"⇁","\\rightharpoondown",!0),e(h,d,m,"↖","\\nwarrow",!0),e(h,d,m,"⇌","\\rightleftharpoons",!0),e(h,f,m,"≮","\\nless",!0),e(h,f,m,"","\\@nleqslant"),e(h,f,m,"","\\@nleqq"),e(h,f,m,"⪇","\\lneq",!0),e(h,f,m,"≨","\\lneqq",!0),e(h,f,m,"","\\@lvertneqq"),e(h,f,m,"⋦","\\lnsim",!0),e(h,f,m,"⪉","\\lnapprox",!0),e(h,f,m,"⊀","\\nprec",!0),e(h,f,m,"⋠","\\npreceq",!0),e(h,f,m,"⋨","\\precnsim",!0),e(h,f,m,"⪹","\\precnapprox",!0),e(h,f,m,"≁","\\nsim",!0),e(h,f,m,"","\\@nshortmid"),e(h,f,m,"∤","\\nmid",!0),e(h,f,m,"⊬","\\nvdash",!0),e(h,f,m,"⊭","\\nvDash",!0),e(h,f,m,"⋪","\\ntriangleleft"),e(h,f,m,"⋬","\\ntrianglelefteq",!0),e(h,f,m,"⊊","\\subsetneq",!0),e(h,f,m,"","\\@varsubsetneq"),e(h,f,m,"⫋","\\subsetneqq",!0),e(h,f,m,"","\\@varsubsetneqq"),e(h,f,m,"≯","\\ngtr",!0),e(h,f,m,"","\\@ngeqslant"),e(h,f,m,"","\\@ngeqq"),e(h,f,m,"⪈","\\gneq",!0),e(h,f,m,"≩","\\gneqq",!0),e(h,f,m,"","\\@gvertneqq"),e(h,f,m,"⋧","\\gnsim",!0),e(h,f,m,"⪊","\\gnapprox",!0),e(h,f,m,"⊁","\\nsucc",!0),e(h,f,m,"⋡","\\nsucceq",!0),e(h,f,m,"⋩","\\succnsim",!0),e(h,f,m,"⪺","\\succnapprox",!0),e(h,f,m,"≆","\\ncong",!0),e(h,f,m,"","\\@nshortparallel"),e(h,f,m,"∦","\\nparallel",!0),e(h,f,m,"⊯","\\nVDash",!0),e(h,f,m,"⋫","\\ntriangleright"),e(h,f,m,"⋭","\\ntrianglerighteq",!0),e(h,f,m,"","\\@nsupseteqq"),e(h,f,m,"⊋","\\supsetneq",!0),e(h,f,m,"","\\@varsupsetneq"),e(h,f,m,"⫌","\\supsetneqq",!0),e(h,f,m,"","\\@varsupsetneqq"),e(h,f,m,"⊮","\\nVdash",!0),e(h,f,m,"⪵","\\precneqq",!0),e(h,f,m,"⪶","\\succneqq",!0),e(h,f,m,"","\\@nsubseteqq"),e(h,f,g,"⊴","\\unlhd"),e(h,f,g,"⊵","\\unrhd"),e(h,f,m,"↚","\\nleftarrow",!0),e(h,f,m,"↛","\\nrightarrow",!0),e(h,f,m,"⇍","\\nLeftarrow",!0),e(h,f,m,"⇏","\\nRightarrow",!0),e(h,f,m,"↮","\\nleftrightarrow",!0),e(h,f,m,"⇎","\\nLeftrightarrow",!0),e(h,f,m,"△","\\vartriangle"),e(h,f,p,"ℏ","\\hslash"),e(h,f,p,"▽","\\triangledown"),e(h,f,p,"◊","\\lozenge"),e(h,f,p,"Ⓢ","\\circledS"),e(h,f,p,"®","\\circledR"),e(u,f,p,"®","\\circledR"),e(h,f,p,"∡","\\measuredangle",!0),e(h,f,p,"∄","\\nexists"),e(h,f,p,"℧","\\mho"),e(h,f,p,"Ⅎ","\\Finv",!0),e(h,f,p,"⅁","\\Game",!0),e(h,f,p,"‵","\\backprime"),e(h,f,p,"▲","\\blacktriangle"),e(h,f,p,"▼","\\blacktriangledown"),e(h,f,p,"■","\\blacksquare"),e(h,f,p,"⧫","\\blacklozenge"),e(h,f,p,"★","\\bigstar"),e(h,f,p,"∢","\\sphericalangle",!0),e(h,f,p,"∁","\\complement",!0),e(h,f,p,"ð","\\eth",!0),e(u,d,p,"ð","ð"),e(h,f,p,"╱","\\diagup"),e(h,f,p,"╲","\\diagdown"),e(h,f,p,"□","\\square"),e(h,f,p,"□","\\Box"),e(h,f,p,"◊","\\Diamond"),e(h,f,p,"¥","\\yen",!0),e(u,f,p,"¥","\\yen",!0),e(h,f,p,"✓","\\checkmark",!0),e(u,f,p,"✓","\\checkmark"),e(h,f,p,"ℶ","\\beth",!0),e(h,f,p,"ℸ","\\daleth",!0),e(h,f,p,"ℷ","\\gimel",!0),e(h,f,p,"ϝ","\\digamma",!0),e(h,f,p,"ϰ","\\varkappa"),e(h,f,tl,"┌","\\@ulcorner",!0),e(h,f,cl,"┐","\\@urcorner",!0),e(h,f,tl,"└","\\@llcorner",!0),e(h,f,cl,"┘","\\@lrcorner",!0),e(h,f,m,"≦","\\leqq",!0),e(h,f,m,"⩽","\\leqslant",!0),e(h,f,m,"⪕","\\eqslantless",!0),e(h,f,m,"≲","\\lesssim",!0),e(h,f,m,"⪅","\\lessapprox",!0),e(h,f,m,"≊","\\approxeq",!0),e(h,f,g,"⋖","\\lessdot"),e(h,f,m,"⋘","\\lll",!0),e(h,f,m,"≶","\\lessgtr",!0),e(h,f,m,"⋚","\\lesseqgtr",!0),e(h,f,m,"⪋","\\lesseqqgtr",!0),e(h,f,m,"≑","\\doteqdot"),e(h,f,m,"≓","\\risingdotseq",!0),e(h,f,m,"≒","\\fallingdotseq",!0),e(h,f,m,"∽","\\backsim",!0),e(h,f,m,"⋍","\\backsimeq",!0),e(h,f,m,"⫅","\\subseteqq",!0),e(h,f,m,"⋐","\\Subset",!0),e(h,f,m,"⊏","\\sqsubset",!0),e(h,f,m,"≼","\\preccurlyeq",!0),e(h,f,m,"⋞","\\curlyeqprec",!0),e(h,f,m,"≾","\\precsim",!0),e(h,f,m,"⪷","\\precapprox",!0),e(h,f,m,"⊲","\\vartriangleleft"),e(h,f,m,"⊴","\\trianglelefteq"),e(h,f,m,"⊨","\\vDash",!0),e(h,f,m,"⊪","\\Vvdash",!0),e(h,f,m,"⌣","\\smallsmile"),e(h,f,m,"⌢","\\smallfrown"),e(h,f,m,"≏","\\bumpeq",!0),e(h,f,m,"≎","\\Bumpeq",!0),e(h,f,m,"≧","\\geqq",!0),e(h,f,m,"⩾","\\geqslant",!0),e(h,f,m,"⪖","\\eqslantgtr",!0),e(h,f,m,"≳","\\gtrsim",!0),e(h,f,m,"⪆","\\gtrapprox",!0),e(h,f,g,"⋗","\\gtrdot"),e(h,f,m,"⋙","\\ggg",!0),e(h,f,m,"≷","\\gtrless",!0),e(h,f,m,"⋛","\\gtreqless",!0),e(h,f,m,"⪌","\\gtreqqless",!0),e(h,f,m,"≖","\\eqcirc",!0),e(h,f,m,"≗","\\circeq",!0),e(h,f,m,"≜","\\triangleq",!0),e(h,f,m,"∼","\\thicksim"),e(h,f,m,"≈","\\thickapprox"),e(h,f,m,"⫆","\\supseteqq",!0),e(h,f,m,"⋑","\\Supset",!0),e(h,f,m,"⊐","\\sqsupset",!0),e(h,f,m,"≽","\\succcurlyeq",!0),e(h,f,m,"⋟","\\curlyeqsucc",!0),e(h,f,m,"≿","\\succsim",!0),e(h,f,m,"⪸","\\succapprox",!0),e(h,f,m,"⊳","\\vartriangleright"),e(h,f,m,"⊵","\\trianglerighteq"),e(h,f,m,"⊩","\\Vdash",!0),e(h,f,m,"∣","\\shortmid"),e(h,f,m,"∥","\\shortparallel"),e(h,f,m,"≬","\\between",!0),e(h,f,m,"⋔","\\pitchfork",!0),e(h,f,m,"∝","\\varpropto"),e(h,f,m,"◀","\\blacktriangleleft"),e(h,f,m,"∴","\\therefore",!0),e(h,f,m,"∍","\\backepsilon"),e(h,f,m,"▶","\\blacktriangleright"),e(h,f,m,"∵","\\because",!0),e(h,f,m,"⋘","\\llless"),e(h,f,m,"⋙","\\gggtr"),e(h,f,g,"⊲","\\lhd"),e(h,f,g,"⊳","\\rhd"),e(h,f,m,"≂","\\eqsim",!0),e(h,d,m,"⋈","\\Join"),e(h,f,m,"≑","\\Doteq",!0),e(h,f,g,"∔","\\dotplus",!0),e(h,f,g,"∖","\\smallsetminus"),e(h,f,g,"⋒","\\Cap",!0),e(h,f,g,"⋓","\\Cup",!0),e(h,f,g,"⩞","\\doublebarwedge",!0),e(h,f,g,"⊟","\\boxminus",!0),e(h,f,g,"⊞","\\boxplus",!0),e(h,f,g,"⋇","\\divideontimes",!0),e(h,f,g,"⋉","\\ltimes",!0),e(h,f,g,"⋊","\\rtimes",!0),e(h,f,g,"⋋","\\leftthreetimes",!0),e(h,f,g,"⋌","\\rightthreetimes",!0),e(h,f,g,"⋏","\\curlywedge",!0),e(h,f,g,"⋎","\\curlyvee",!0),e(h,f,g,"⊝","\\circleddash",!0),e(h,f,g,"⊛","\\circledast",!0),e(h,f,g,"⋅","\\centerdot"),e(h,f,g,"⊺","\\intercal",!0),e(h,f,g,"⋒","\\doublecap"),e(h,f,g,"⋓","\\doublecup"),e(h,f,g,"⊠","\\boxtimes",!0),e(h,f,m,"⇢","\\dashrightarrow",!0),e(h,f,m,"⇠","\\dashleftarrow",!0),e(h,f,m,"⇇","\\leftleftarrows",!0),e(h,f,m,"⇆","\\leftrightarrows",!0),e(h,f,m,"⇚","\\Lleftarrow",!0),e(h,f,m,"↞","\\twoheadleftarrow",!0),e(h,f,m,"↢","\\leftarrowtail",!0),e(h,f,m,"↫","\\looparrowleft",!0),e(h,f,m,"⇋","\\leftrightharpoons",!0),e(h,f,m,"↶","\\curvearrowleft",!0),e(h,f,m,"↺","\\circlearrowleft",!0),e(h,f,m,"↰","\\Lsh",!0),e(h,f,m,"⇈","\\upuparrows",!0),e(h,f,m,"↿","\\upharpoonleft",!0),e(h,f,m,"⇃","\\downharpoonleft",!0),e(h,d,m,"⊶","\\origof",!0),e(h,d,m,"⊷","\\imageof",!0),e(h,f,m,"⊸","\\multimap",!0),e(h,f,m,"↭","\\leftrightsquigarrow",!0),e(h,f,m,"⇉","\\rightrightarrows",!0),e(h,f,m,"⇄","\\rightleftarrows",!0),e(h,f,m,"↠","\\twoheadrightarrow",!0),e(h,f,m,"↣","\\rightarrowtail",!0),e(h,f,m,"↬","\\looparrowright",!0),e(h,f,m,"↷","\\curvearrowright",!0),e(h,f,m,"↻","\\circlearrowright",!0),e(h,f,m,"↱","\\Rsh",!0),e(h,f,m,"⇊","\\downdownarrows",!0),e(h,f,m,"↾","\\upharpoonright",!0),e(h,f,m,"⇂","\\downharpoonright",!0),e(h,f,m,"⇝","\\rightsquigarrow",!0),e(h,f,m,"⇝","\\leadsto"),e(h,f,m,"⇛","\\Rrightarrow",!0),e(h,f,m,"↾","\\restriction"),e(h,d,p,"‘","`"),e(h,d,p,"$","\\$"),e(u,d,p,"$","\\$"),e(u,d,p,"$","\\textdollar"),e(h,d,p,"%","\\%"),e(u,d,p,"%","\\%"),e(h,d,p,"_","\\_"),e(u,d,p,"_","\\_"),e(u,d,p,"_","\\textunderscore"),e(h,d,p,"∠","\\angle",!0),e(h,d,p,"∞","\\infty",!0),e(h,d,p,"′","\\prime"),e(h,d,p,"△","\\triangle"),e(h,d,p,"Γ","\\Gamma",!0),e(h,d,p,"Δ","\\Delta",!0),e(h,d,p,"Θ","\\Theta",!0),e(h,d,p,"Λ","\\Lambda",!0),e(h,d,p,"Ξ","\\Xi",!0),e(h,d,p,"Π","\\Pi",!0),e(h,d,p,"Σ","\\Sigma",!0),e(h,d,p,"Υ","\\Upsilon",!0),e(h,d,p,"Φ","\\Phi",!0),e(h,d,p,"Ψ","\\Psi",!0),e(h,d,p,"Ω","\\Omega",!0),e(h,d,p,"A","Α"),e(h,d,p,"B","Β"),e(h,d,p,"E","Ε"),e(h,d,p,"Z","Ζ"),e(h,d,p,"H","Η"),e(h,d,p,"I","Ι"),e(h,d,p,"K","Κ"),e(h,d,p,"M","Μ"),e(h,d,p,"N","Ν"),e(h,d,p,"O","Ο"),e(h,d,p,"P","Ρ"),e(h,d,p,"T","Τ"),e(h,d,p,"X","Χ"),e(h,d,p,"¬","\\neg",!0),e(h,d,p,"¬","\\lnot"),e(h,d,p,"⊤","\\top"),e(h,d,p,"⊥","\\bot"),e(h,d,p,"∅","\\emptyset"),e(h,f,p,"∅","\\varnothing"),e(h,d,Wa,"α","\\alpha",!0),e(h,d,Wa,"β","\\beta",!0),e(h,d,Wa,"γ","\\gamma",!0),e(h,d,Wa,"δ","\\delta",!0),e(h,d,Wa,"ϵ","\\epsilon",!0),e(h,d,Wa,"ζ","\\zeta",!0),e(h,d,Wa,"η","\\eta",!0),e(h,d,Wa,"θ","\\theta",!0),e(h,d,Wa,"ι","\\iota",!0),e(h,d,Wa,"κ","\\kappa",!0),e(h,d,Wa,"λ","\\lambda",!0),e(h,d,Wa,"μ","\\mu",!0),e(h,d,Wa,"ν","\\nu",!0),e(h,d,Wa,"ξ","\\xi",!0),e(h,d,Wa,"ο","\\omicron",!0),e(h,d,Wa,"π","\\pi",!0),e(h,d,Wa,"ρ","\\rho",!0),e(h,d,Wa,"σ","\\sigma",!0),e(h,d,Wa,"τ","\\tau",!0),e(h,d,Wa,"υ","\\upsilon",!0),e(h,d,Wa,"ϕ","\\phi",!0),e(h,d,Wa,"χ","\\chi",!0),e(h,d,Wa,"ψ","\\psi",!0),e(h,d,Wa,"ω","\\omega",!0),e(h,d,Wa,"ε","\\varepsilon",!0),e(h,d,Wa,"ϑ","\\vartheta",!0),e(h,d,Wa,"ϖ","\\varpi",!0),e(h,d,Wa,"ϱ","\\varrho",!0),e(h,d,Wa,"ς","\\varsigma",!0),e(h,d,Wa,"φ","\\varphi",!0),e(h,d,g,"∗","*",!0),e(h,d,g,"+","+"),e(h,d,g,"−","-",!0),e(h,d,g,"⋅","\\cdot",!0),e(h,d,g,"∘","\\circ",!0),e(h,d,g,"÷","\\div",!0),e(h,d,g,"±","\\pm",!0),e(h,d,g,"×","\\times",!0),e(h,d,g,"∩","\\cap",!0),e(h,d,g,"∪","\\cup",!0),e(h,d,g,"∖","\\setminus",!0),e(h,d,g,"∧","\\land"),e(h,d,g,"∨","\\lor"),e(h,d,g,"∧","\\wedge",!0),e(h,d,g,"∨","\\vee",!0),e(h,d,p,"√","\\surd"),e(h,d,tl,"⟨","\\langle",!0),e(h,d,tl,"∣","\\lvert"),e(h,d,tl,"∥","\\lVert"),e(h,d,cl,"?","?"),e(h,d,cl,"!","!"),e(h,d,cl,"⟩","\\rangle",!0),e(h,d,cl,"∣","\\rvert"),e(h,d,cl,"∥","\\rVert"),e(h,d,m,"=","="),e(h,d,m,":",":"),e(h,d,m,"≈","\\approx",!0),e(h,d,m,"≅","\\cong",!0),e(h,d,m,"≥","\\ge"),e(h,d,m,"≥","\\geq",!0),e(h,d,m,"←","\\gets"),e(h,d,m,">","\\gt",!0),e(h,d,m,"∈","\\in",!0),e(h,d,m,"","\\@not"),e(h,d,m,"⊂","\\subset",!0),e(h,d,m,"⊃","\\supset",!0),e(h,d,m,"⊆","\\subseteq",!0),e(h,d,m,"⊇","\\supseteq",!0),e(h,f,m,"⊈","\\nsubseteq",!0),e(h,f,m,"⊉","\\nsupseteq",!0),e(h,d,m,"⊨","\\models"),e(h,d,m,"←","\\leftarrow",!0),e(h,d,m,"≤","\\le"),e(h,d,m,"≤","\\leq",!0),e(h,d,m,"<","\\lt",!0),e(h,d,m,"→","\\rightarrow",!0),e(h,d,m,"→","\\to"),e(h,f,m,"≱","\\ngeq",!0),e(h,f,m,"≰","\\nleq",!0),e(h,d,Jo," ","\\ "),e(h,d,Jo," ","\\space"),e(h,d,Jo," ","\\nobreakspace"),e(u,d,Jo," ","\\ "),e(u,d,Jo," "," "),e(u,d,Jo," ","\\space"),e(u,d,Jo," ","\\nobreakspace"),e(h,d,Jo,null,"\\nobreak"),e(h,d,Jo,null,"\\allowbreak"),e(h,d,pl,",",","),e(h,d,pl,";",";"),e(h,f,g,"⊼","\\barwedge",!0),e(h,f,g,"⊻","\\veebar",!0),e(h,d,g,"⊙","\\odot",!0),e(h,d,g,"⊕","\\oplus",!0),e(h,d,g,"⊗","\\otimes",!0),e(h,d,p,"∂","\\partial",!0),e(h,d,g,"⊘","\\oslash",!0),e(h,f,g,"⊚","\\circledcirc",!0),e(h,f,g,"⊡","\\boxdot",!0),e(h,d,g,"△","\\bigtriangleup"),e(h,d,g,"▽","\\bigtriangledown"),e(h,d,g,"†","\\dagger"),e(h,d,g,"⋄","\\diamond"),e(h,d,g,"⋆","\\star"),e(h,d,g,"◃","\\triangleleft"),e(h,d,g,"▹","\\triangleright"),e(h,d,tl,"{","\\{"),e(u,d,p,"{","\\{"),e(u,d,p,"{","\\textbraceleft"),e(h,d,cl,"}","\\}"),e(u,d,p,"}","\\}"),e(u,d,p,"}","\\textbraceright"),e(h,d,tl,"{","\\lbrace"),e(h,d,cl,"}","\\rbrace"),e(h,d,tl,"[","\\lbrack",!0),e(u,d,p,"[","\\lbrack",!0),e(h,d,cl,"]","\\rbrack",!0),e(u,d,p,"]","\\rbrack",!0),e(h,d,tl,"(","\\lparen",!0),e(h,d,cl,")","\\rparen",!0),e(u,d,p,"<","\\textless",!0),e(u,d,p,">","\\textgreater",!0),e(h,d,tl,"⌊","\\lfloor",!0),e(h,d,cl,"⌋","\\rfloor",!0),e(h,d,tl,"⌈","\\lceil",!0),e(h,d,cl,"⌉","\\rceil",!0),e(h,d,p,"\\","\\backslash"),e(h,d,p,"∣","|"),e(h,d,p,"∣","\\vert"),e(u,d,p,"|","\\textbar",!0),e(h,d,p,"∥","\\|"),e(h,d,p,"∥","\\Vert"),e(u,d,p,"∥","\\textbardbl"),e(u,d,p,"~","\\textasciitilde"),e(u,d,p,"\\","\\textbackslash"),e(u,d,p,"^","\\textasciicircum"),e(h,d,m,"↑","\\uparrow",!0),e(h,d,m,"⇑","\\Uparrow",!0),e(h,d,m,"↓","\\downarrow",!0),e(h,d,m,"⇓","\\Downarrow",!0),e(h,d,m,"↕","\\updownarrow",!0),e(h,d,m,"⇕","\\Updownarrow",!0),e(h,d,Pl,"∐","\\coprod"),e(h,d,Pl,"⋁","\\bigvee"),e(h,d,Pl,"⋀","\\bigwedge"),e(h,d,Pl,"⨄","\\biguplus"),e(h,d,Pl,"⋂","\\bigcap"),e(h,d,Pl,"⋃","\\bigcup"),e(h,d,Pl,"∫","\\int"),e(h,d,Pl,"∫","\\intop"),e(h,d,Pl,"∬","\\iint"),e(h,d,Pl,"∭","\\iiint"),e(h,d,Pl,"∏","\\prod"),e(h,d,Pl,"∑","\\sum"),e(h,d,Pl,"⨂","\\bigotimes"),e(h,d,Pl,"⨁","\\bigoplus"),e(h,d,Pl,"⨀","\\bigodot"),e(h,d,Pl,"∮","\\oint"),e(h,d,Pl,"∯","\\oiint"),e(h,d,Pl,"∰","\\oiiint"),e(h,d,Pl,"⨆","\\bigsqcup"),e(h,d,Pl,"∫","\\smallint"),e(u,d,fl,"…","\\textellipsis"),e(h,d,fl,"…","\\mathellipsis"),e(u,d,fl,"…","\\ldots",!0),e(h,d,fl,"…","\\ldots",!0),e(h,d,fl,"⋯","\\@cdots",!0),e(h,d,fl,"⋱","\\ddots",!0),e(h,d,p,"⋮","\\varvdots"),e(u,d,p,"⋮","\\varvdots"),e(h,d,Bl,"ˊ","\\acute"),e(h,d,Bl,"ˋ","\\grave"),e(h,d,Bl,"¨","\\ddot"),e(h,d,Bl,"~","\\tilde"),e(h,d,Bl,"ˉ","\\bar"),e(h,d,Bl,"˘","\\breve"),e(h,d,Bl,"ˇ","\\check"),e(h,d,Bl,"^","\\hat"),e(h,d,Bl,"⃗","\\vec"),e(h,d,Bl,"˙","\\dot"),e(h,d,Bl,"˚","\\mathring"),e(h,d,Wa,"","\\@imath"),e(h,d,Wa,"","\\@jmath"),e(h,d,p,"ı","ı"),e(h,d,p,"ȷ","ȷ"),e(u,d,p,"ı","\\i",!0),e(u,d,p,"ȷ","\\j",!0),e(u,d,p,"ß","\\ss",!0),e(u,d,p,"æ","\\ae",!0),e(u,d,p,"œ","\\oe",!0),e(u,d,p,"ø","\\o",!0),e(u,d,p,"Æ","\\AE",!0),e(u,d,p,"Œ","\\OE",!0),e(u,d,p,"Ø","\\O",!0),e(u,d,Bl,"ˊ","\\'"),e(u,d,Bl,"ˋ","\\`"),e(u,d,Bl,"ˆ","\\^"),e(u,d,Bl,"˜","\\~"),e(u,d,Bl,"ˉ","\\="),e(u,d,Bl,"˘","\\u"),e(u,d,Bl,"˙","\\."),e(u,d,Bl,"¸","\\c"),e(u,d,Bl,"˚","\\r"),e(u,d,Bl,"ˇ","\\v"),e(u,d,Bl,"¨",'\\"'),e(u,d,Bl,"˝","\\H"),e(u,d,Bl,"◯","\\textcircled"),Ya={"--":!0,"---":!0,"``":!0,"''":!0},e(u,d,p,"–","--",!0),e(u,d,p,"–","\\textendash"),e(u,d,p,"—","---",!0),e(u,d,p,"—","\\textemdash"),e(u,d,p,"‘","`",!0),e(u,d,p,"‘","\\textquoteleft"),e(u,d,p,"’","'",!0),e(u,d,p,"’","\\textquoteright"),e(u,d,p,"“","``",!0),e(u,d,p,"“","\\textquotedblleft"),e(u,d,p,"”","''",!0),e(u,d,p,"”","\\textquotedblright"),e(h,d,p,"°","\\degree",!0),e(u,d,p,"°","\\degree"),e(u,d,p,"°","\\textdegree",!0),e(h,d,p,"£","\\pounds"),e(h,d,p,"£","\\mathsterling",!0),e(u,d,p,"£","\\pounds"),e(u,d,p,"£","\\textsterling",!0),e(h,f,p,"✠","\\maltese"),e(u,f,p,"✠","\\maltese"),Ha='0123456789/@."',Xa=0;Xa<Ha.length;Xa++)Va=Ha.charAt(Xa),e(h,d,p,Va,Va);for(Ka='0123456789!@*()-=+";:?/.,',Qa=0;Qa<Ka.length;Qa++)Za=Ka.charAt(Qa),e(u,d,p,Za,Za);for(Ja="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",es=0;es<Ja.length;es++)ts=Ja.charAt(es),e(h,d,Wa,ts,ts),e(u,d,p,ts,ts);for(e(h,f,p,"C","ℂ"),e(u,f,p,"C","ℂ"),e(h,f,p,"H","ℍ"),e(u,f,p,"H","ℍ"),e(h,f,p,"N","ℕ"),e(u,f,p,"N","ℕ"),e(h,f,p,"P","ℙ"),e(u,f,p,"P","ℙ"),e(h,f,p,"Q","ℚ"),e(u,f,p,"Q","ℚ"),e(h,f,p,"R","ℝ"),e(u,f,p,"R","ℝ"),e(h,f,p,"Z","ℤ"),e(u,f,p,"Z","ℤ"),e(h,d,Wa,"h","ℎ"),e(u,d,Wa,"h","ℎ"),rs="",is=0;is<Ja.length;is++)ns=Ja.charAt(is),rs=String.fromCharCode(55349,56320+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),rs=String.fromCharCode(55349,56372+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),rs=String.fromCharCode(55349,56424+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),rs=String.fromCharCode(55349,56580+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),rs=String.fromCharCode(55349,56684+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),rs=String.fromCharCode(55349,56736+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),rs=String.fromCharCode(55349,56788+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),rs=String.fromCharCode(55349,56840+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),rs=String.fromCharCode(55349,56944+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),is<26&&(rs=String.fromCharCode(55349,56632+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs),rs=String.fromCharCode(55349,56476+is),e(h,d,Wa,ns,rs),e(u,d,p,ns,rs));for(e(h,d,Wa,"k",rs="𝕜"),e(u,d,p,"k",rs),ss=0;ss<10;ss++)as=ss.toString(),rs=String.fromCharCode(55349,57294+ss),e(h,d,Wa,as,rs),e(u,d,p,as,rs),rs=String.fromCharCode(55349,57314+ss),e(h,d,Wa,as,rs),e(u,d,p,as,rs),rs=String.fromCharCode(55349,57324+ss),e(h,d,Wa,as,rs),e(u,d,p,as,rs),rs=String.fromCharCode(55349,57334+ss),e(h,d,Wa,as,rs),e(u,d,p,as,rs);for(os="ÐÞþ",cs=0;cs<os.length;cs++)ls=os.charAt(cs),e(h,d,Wa,ls,ls),e(u,d,p,ls,ls);hs=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],us=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ds=me(function(t,e){var r,n=1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536,e="math"===e?0:1;if(119808<=n&&n<120484)return r=Math.floor((n-119808)/26),[hs[r][2],hs[r][e]];if(120782<=n&&n<=120831)return r=Math.floor((n-120782)/10),[us[r][2],us[r][e]];if(120485==n||120486==n)return[hs[0][2],hs[0][e]];if(120486<n&&n<120782)return["",""];throw new X("Unsupported character: "+t)},"wideCharacterFont"),ps=me(function(t,e,r){return{value:t=ja[r][t]&&ja[r][t].replace?ja[r][t].replace:t,metrics:gi(t,e,r)}},"lookupSymbol"),gs=me(function(t,e,r,n,i){var a=ps(t,e,r),s=a.metrics;return t=a.value,a=s?(a=s.italic,("text"===r||n&&"mathit"===n.font)&&(a=0),new $a(t,s.height,s.depth,a,s.skew,s.width,i)):(typeof console<"u"&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+r+"'"),new $a(t,0,0,0,0,0,i)),n&&(a.maxFontSize=n.sizeMultiplier,n.style.isTight()&&a.classes.push("mtight"),s=n.getColor())&&(a.style.color=s),a},"makeSymbol"),Jo=me(function(t,e,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&ps(t,"Main-Bold",e).metrics?gs(t,"Main-Bold",e,r,n.concat(["mathbf"])):"\\"===t||"main"===ja[e][t].font?gs(t,"Main-Regular",e,r,n):gs(t,"AMS-Regular",e,r,n.concat(["amsrm"]))},"mathsym"),fs=me(function(t,e,r,n,i){return"textord"!==i&&ps(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldsymbol"),pl=me(function(t,e,r){var n,i,a=t.mode,s=t.text,o=["mord"],l=(t="math"===a||"text"===a&&e.font)?e.font:e.fontFamily,c="",h="";if(55349===s.charCodeAt(0)&&([c,h]=ds(s,a)),0<c.length)return gs(s,c,a,e,o.concat(h));if(l){if(i="boldsymbol"===l?(n=(c=fs(s,a,e,o,r)).fontName,[c.fontClass]):t?(n=Ts[l].fontName,[l]):(n=ks(l,e.fontWeight,e.fontShape),[l,e.fontWeight,e.fontShape]),ps(s,n,a).metrics)return gs(s,n,a,e,o.concat(i));if(Ya.hasOwnProperty(s)&&"Typewriter"===n.slice(0,10)){for(var u=[],d=0;d<s.length;d++)u.push(gs(s[d],n,a,e,o.concat(i)));return bs(u)}}if("mathord"===r)return gs(s,"Math-Italic",a,e,o.concat(["mathnormal"]));if("textord"===r)return"ams"===(h=ja[a][s]&&ja[a][s].font)?(c=ks("amsrm",e.fontWeight,e.fontShape),gs(s,c,a,e,o.concat("amsrm",e.fontWeight,e.fontShape))):"main"!==h&&h?(t=ks(h,e.fontWeight,e.fontShape),gs(s,t,a,e,o.concat(t,e.fontWeight,e.fontShape))):(l=ks("textrm",e.fontWeight,e.fontShape),gs(s,l,a,e,o.concat(e.fontWeight,e.fontShape)));throw new Error("unexpected type: "+r+" in makeOrd")},"makeOrd"),ms=me((t,e)=>{if(La(t.classes)!==La(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(1===t.classes.length){var r=t.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},"canCombine"),g=me(t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof $a&&n instanceof $a&&ms(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t},"tryCombineChars"),ys=me(function(t){for(var e=0,r=0,n=0,i=0;i<t.children.length;i++){var a=t.children[i];a.height>e&&(e=a.height),r<a.depth&&(r=a.depth),n<a.maxFontSize&&(n=a.maxFontSize)}t.height=e,t.depth=r,t.maxFontSize=n},"sizeElementFromChildren"),vs=me(function(t,e,r,n){return t=new Da(t,e,r,n),ys(t),t},"makeSpan"),xs=me((t,e,r,n)=>new Da(t,e,r,n),"makeSvgSpan"),tl=me(function(t,e,r){return(t=vs([t],[],e)).height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),t.style.borderBottomWidth=K(t.height),t.maxFontSize=1,t},"makeLineSpan"),cl=me(function(t,e,r,n){return t=new Oa(t,e,r,n),ys(t),t},"makeAnchor"),bs=me(function(t){return t=new ma(t),ys(t),t},"makeFragment"),m=me(function(t,e){return t instanceof ma?vs([],[t],e):t},"wrapFragment"),ws=me(function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],n=-e[0].shift-e[0].elem.depth,i=n,a=1;a<e.length;a++){var s=-e[a].shift-i-e[a].elem.depth,o=s-(e[a-1].elem.height+e[a-1].elem.depth);i+=s,r.push({type:"kern",size:o}),r.push(e[a])}return{children:r,depth:n}}var l;if("top"===t.positionType){for(var c=t.positionData,h=0;h<t.children.length;h++){var u=t.children[h];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===t.positionType)l=-t.positionData;else{if("elem"!==(n=t.children[0]).type)throw new Error('First child must have type "elem".');if("shift"===t.positionType)l=-n.elem.depth-t.positionData;else{if("firstBaseline"!==t.positionType)throw new Error("Invalid positionType "+t.positionType+".");l=-n.elem.depth}}return{children:t.children,depth:l}},"getVListChildrenAndDepth"),Pl=me(function(t,e){for(var{children:r,depth:t}=ws(t),n=0,i=0;i<r.length;i++){var a=r[i];"elem"===a.type&&(a=a.elem,n=Math.max(n,a.maxFontSize,a.height))}n+=2;var s=vs(["pstrut"],[]);s.style.height=K(n);for(var o=[],l=t,c=t,h=t,u=0;u<r.length;u++){var d,p,g,f=r[u];"kern"===f.type?h+=f.size:(d=f.elem,g=f.wrapperClasses||[],p=f.wrapperStyle||{},(g=vs(g,[s,d],void 0,p)).style.top=K(-n-h-d.depth),f.marginLeft&&(g.style.marginLeft=f.marginLeft),f.marginRight&&(g.style.marginRight=f.marginRight),o.push(g),h+=d.height+d.depth),l=Math.min(l,h),c=Math.max(c,h)}(t=vs(["vlist"],o)).style.height=K(c);var m=l<0?(y=vs([],[]),(y=vs(["vlist"],[y])).style.height=K(-l),m=vs(["vlist-s"],[new $a("")]),[vs(["vlist-r"],[t,m]),vs(["vlist-r"],[y])]):[vs(["vlist-r"],[t])],y=vs(["vlist-t"],m);return 2===m.length&&y.classes.push("vlist-t2"),y.height=c,y.depth=-l,y},"makeVList"),fl=me((t,e)=>{var r=vs(["mspace"],[],e),t=Aa(t,e);return r.style.marginRight=K(t),r},"makeGlue"),ks=me(function(t,e,r){var n="";switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return n+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},"retrieveTextFontName"),Ts={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Es={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Bl=me(function(t,e){var[t,r,n]=Es[t],t=new za(t),t=new Fa([t],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(t=xs(["overlay"],[t],e)).height=n,t.style.height=K(n),t.style.width=K(r),t},"staticSvg"),Z={fontMap:Ts,makeSymbol:gs,mathsym:Jo,makeSpan:vs,makeSvgSpan:xs,makeLineSpan:tl,makeAnchor:cl,makeFragment:bs,wrapFragment:m,makeVList:Pl,makeOrd:pl,makeGlue:fl,staticSvg:Bl,svgData:Es,tryCombineChars:g},Cs={mord:{mop:f={number:3,unit:"mu"},mbin:Jo={number:4,unit:"mu"},mrel:tl={number:5,unit:"mu"},minner:f},mop:{mord:f,mop:f,mrel:tl,minner:f},mbin:{mord:Jo,mop:Jo,mopen:Jo,minner:Jo},mrel:{mord:tl,mop:tl,mopen:tl,minner:tl},mopen:{},mclose:{mop:f,mbin:Jo,mrel:tl,minner:f},mpunct:{mord:f,mop:f,mrel:tl,mopen:f,mclose:f,mpunct:f,minner:f},minner:{mord:f,mop:f,mbin:Jo,mrel:tl,mopen:f,mpunct:f,minner:f}},Ss={mord:{mop:f},mop:{mord:f,mop:f},mbin:{},mrel:{},mopen:{},mclose:{mop:f},mpunct:{},minner:{mop:f}},_s={},As={},Ls={},me(o,"defineFunction"),me(vi,"defineFunctionBuilders"),Ns=me(function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},"normalizeArgument"),Is=me(function(t){return"ordgroup"===t.type?t.body:[t]},"ordargument"),Rs=Z.makeSpan,Ms=["leftmost","mbin","mopen","mrel","mop","mpunct"],Ds=["rightmost","mrel","mclose","mpunct"],Os={display:ra.DISPLAY,text:ra.TEXT,script:ra.SCRIPT,scriptscript:ra.SCRIPTSCRIPT},Ps={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Bs=me(function(t,e,r,n){void 0===n&&(n=[null,null]);for(var i,a,s=[],o=0;o<t.length;o++){var l,c=qs(t[o],e);c instanceof ma?(l=c.children,s.push(...l)):s.push(c)}return Z.tryCombineChars(s),r&&(i=e,1===t.length&&("sizing"===(a=t[0]).type?i=e.havingSize(a.size):"styling"===a.type&&(i=e.havingStyle(Os[a.style]))),a=Rs([n[0]||"leftmost"],[],e),n=Rs([n[1]||"rightmost"],[],e),$s(s,(t,e)=>{var r=e.classes[0],n=t.classes[0];"mbin"===r&&Yi.contains(Ds,n)?e.classes[0]="mord":"mbin"===n&&Yi.contains(Ms,r)&&(t.classes[0]="mord")},{node:a},n,r="root"===r),$s(s,(t,e)=>{var e=Gs(e),r=Gs(t);if(t=e&&r?(t.hasClass("mtight")?Ss:Cs)[e][r]:null)return Z.makeGlue(t,i)},{node:a},n,r)),s},"buildExpression"),$s=me(function t(r,e,n,i,a){i&&r.push(i);for(var s=0;s<r.length;s++){var o,l=r[s],c=Fs(l);c?t(c.children,e,n,null,a):((c=!l.hasClass("mspace"))&&(o=e(l,n.node))&&(n.insertAfter?n.insertAfter(o):(r.unshift(o),s++)),c?n.node=l:a&&l.hasClass("newline")&&(n.node=Rs(["leftmost"])),n.insertAfter=(e=>t=>{r.splice(e+1,0,t),s++})(s))}i&&r.pop()},"traverseNonSpaceNodes"),Fs=me(function(t){return t instanceof ma||t instanceof Oa||t instanceof Da&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),zs=me(function t(e,r){var n=Fs(e);if(n&&(n=n.children).length){if("right"===r)return t(n[n.length-1],"right");if("left"===r)return t(n[0],"left")}return e},"getOutermostNode"),Gs=me(function(t,e){return t&&(e&&(t=zs(t,e)),Ps[t.classes[0]])||null},"getTypeOfDomTree"),Us=me(function(t,e){return t=["nulldelimiter"].concat(t.baseSizingClasses()),Rs(e.concat(t))},"makeNullDelimiter"),qs=me(function(t,e,r){if(!t)return Rs();var n;if(As[t.type])return n=As[t.type](t,e),r&&e.size!==r.size&&(n=Rs(e.sizingClasses(r),[n],e),e=e.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e),n;throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),me(xi,"buildHTMLUnbreakable"),me(bi,"buildHTML"),me(wi,"newDocumentFragment"),js=class{static{me(this,"MathNode")}constructor(t,e,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=r||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t,e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);0<this.classes.length&&(e.className=La(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Ws&&this.children[r+1]instanceof Ws){for(var n=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Ws;)n+=this.children[++r].toText();e.appendChild(new Ws(n).toNode())}else e.appendChild(this.children[r].toNode());return e}toMarkup(){var t,e="<"+this.type;for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Yi.escape(this.attributes[t]),e+='"');0<this.classes.length&&(e+=' class ="'+Yi.escape(La(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+("</"+this.type)+">"}toText(){return this.children.map(t=>t.toText()).join("")}},Ws=class{static{me(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Yi.escape(this.toText())}toText(){return this.text}},cl=class{static{me(this,"SpaceNode")}constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=.05555<=t&&t<=.05556?" ":.1666<=t&&t<=.1667?" ":.2222<=t&&t<=.2223?" ":.2777<=t&&t<=.2778?" ":-.05556<=t&&t<=-.05555?" ":-.1667<=t&&t<=-.1666?" ":-.2223<=t&&t<=-.2222?" ":-.2778<=t&&t<=-.2777?" ":null}toNode(){var t;return this.character?document.createTextNode(this.character):((t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),t)}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+K(this.width)+'"/>'}toText(){return this.character||" "}},E={MathNode:js,TextNode:Ws,SpaceNode:cl,newDocumentFragment:wi},Ys=me(function(t,e,r){return!ja[e][t]||!ja[e][t].replace||55349===t.charCodeAt(0)||Ya.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=ja[e][t].replace),new E.TextNode(t)},"makeText"),Hs=me(function(t){return 1===t.length?t[0]:new E.MathNode("mrow",t)},"makeRow"),Vs=me(function(t,e){var r;return"texttt"===e.fontFamily?"monospace":"textsf"===e.fontFamily?"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif":"textit"===e.fontShape&&"textbf"===e.fontWeight?"bold-italic":"textit"===e.fontShape?"italic":"textbf"===e.fontWeight?"bold":(e=e.font)&&"mathnormal"!==e?(r=t.mode,"mathit"===e?"italic":"boldsymbol"===e?"textord"===t.type?"bold":"bold-italic":"mathbf"===e?"bold":"mathbb"===e?"double-struck":"mathsfit"===e?"sans-serif-italic":"mathfrak"===e?"fraktur":"mathscr"===e||"mathcal"===e?"script":"mathsf"===e?"sans-serif":"mathtt"===e?"monospace":!Yi.contains(["\\imath","\\jmath"],t=t.text)&&gi(t=ja[r][t]&&ja[r][t].replace?ja[r][t].replace:t,Z.fontMap[e].fontName,r)?Z.fontMap[e].variant:null):null},"getVariant"),me(ki,"isNumberPunctuation"),Xs=me(function(t,e,r){var n;if(1===t.length)return n=Zs(t[0],e),r&&n instanceof js&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],s=0;s<t.length;s++){var o,l,c=Zs(t[s],e);if(c instanceof js&&i instanceof js){if("mtext"===c.type&&"mtext"===i.type&&c.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...c.children);continue}if("mn"===c.type&&"mn"===i.type){i.children.push(...c.children);continue}if(ki(c)&&"mn"===i.type){i.children.push(...c.children);continue}"mn"===c.type&&ki(i)?(c.children=[...i.children,...c.children],a.pop()):("msup"===c.type||"msub"===c.type)&&1<=c.children.length&&("mn"===i.type||ki(i))?(o=c.children[0])instanceof js&&"mn"===o.type&&(o.children=[...i.children,...o.children],a.pop()):"mi"===i.type&&1===i.children.length&&(o=i.children[0])instanceof Ws&&"̸"===o.text&&("mo"===c.type||"mi"===c.type||"mn"===c.type)&&(l=c.children[0])instanceof Ws&&0<l.text.length&&(l.text=l.text.slice(0,1)+"̸"+l.text.slice(1),a.pop())}a.push(c),i=c}return a},"buildExpression"),Ks=me(function(t,e,r){return Hs(Xs(t,e,r))},"buildExpressionRow"),Zs=me(function(t,e){if(!t)return new E.MathNode("mrow");if(Ls[t.type])return Ls[t.type](t,e);throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),me(Ti,"buildMathML"),Qs=me(function(t){return new Ea({style:t.displayMode?ra.DISPLAY:ra.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},"optionsFromSettings"),Js=me(function(t,e){var r;return e.displayMode&&(r=["katex-display"],e.leqno&&r.push("leqno"),e.fleqn&&r.push("fleqn"),t=Z.makeSpan(r,[t])),t},"displayWrap"),to=me(function(t,e,r){var n,i=Qs(r);return"mathml"===r.output?Ti(t,e,i,r.displayMode,!0):(t="html"===r.output?(n=bi(t,i),Z.makeSpan(["katex"],[n])):(n=Ti(t,e,i,r.displayMode,!1),e=bi(t,i),Z.makeSpan(["katex"],[n,e])),Js(t,r))},"buildTree"),eo=me(function(t,e,r){return t=bi(t,Qs(r)),t=Z.makeSpan(["katex"],[t]),Js(t,r)},"buildHTMLTree"),ro={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},m=me(function(t){return(t=new E.MathNode("mo",[new E.TextNode(ro[t.replace(/^\\/,"")])])).setAttribute("stretchy","true"),t},"mathMLnode"),no={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},io=me(function(t){return"ordgroup"===t.type?t.body.length:1},"groupLength"),Pl=me(function(f,m){function t(){var t,e,r=4e5,n=f.label.slice(1);if(Yi.contains(["widehat","widecheck","widetilde","utilde"],n))return e=5<(e=io(f.base))?"widehat"===n||"widecheck"===n?(a=420,r=2364,t=.42,n+"4"):(a=312,r=2340,t=.34,"tilde4"):(e=[1,1,2,2,3,3][e],"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][e],a=[0,239,300,360,420][e],t=[0,.24,.3,.3,.36,.42][e],n+e):(r=[0,600,1033,2339,2340][e],a=[0,260,286,306,312][e],t=[0,.26,.286,.3,.306,.34][e],"tilde"+e)),e=new za(e),e=new Fa([e],{width:"100%",height:K(t),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"}),{span:Z.makeSvgSpan([],[e],m),minWidth:0,height:t};var i=[],a=no[n],[s,o,l]=a,c=l/1e3,h=s.length;if(1===h)var u=["hide-tail"],d=[a[3]];else if(2===h)u=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==h)throw new Error(`Correct katexImagesData or update code here to support + `+h+" children.");u=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var p=0;p<h;p++){var g=new za(s[p]),g=new Fa([g],{width:"400em",height:K(c),viewBox:"0 0 "+r+" "+l,preserveAspectRatio:d[p]+" slice"}),g=Z.makeSvgSpan([u[p]],[g],m);if(1===h)return{span:g,minWidth:o,height:c};g.style.height=K(c),i.push(g)}return{span:Z.makeSpan(["stretchy"],i,m),minWidth:o,height:c}}me(t,"buildSvgSpan_");var{span:e,minWidth:r,height:n}=t();return e.height=n,e.style.height=K(n),0<r&&(e.style.minWidth=K(r)),e},"svgSpan"),pl=me(function(t,e,r,n,i){var a,t=t.height+t.depth+r+n;return/fbox|color|angl/.test(e)?(a=Z.makeSpan(["stretchy",e],[],i),"fbox"===e&&(r=i.color&&i.getColor())&&(a.style.borderColor=r)):(n=[],/^[bx]cancel$/.test(e)&&n.push(new Ga({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&n.push(new Ga({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),r=new Fa(n,{width:"100%",height:K(t)}),a=Z.makeSvgSpan([],[r],i)),a.height=t,a.style.height=K(t),a},"encloseSpan"),ao={encloseSpan:pl,mathMLnode:m,svgSpan:Pl},me(Ei,"assertNodeType"),me(Ci,"assertSymbolNodeType"),me(Si,"checkSymbolNodeType"),so=me((t,e)=>{t&&"supsub"===t.type?(o=(r=Ei(t.base,"accent")).base,t.base=o,n=yi(qs(t,e)),t.base=r):o=(r=Ei(t,"accent")).base;var r,n,i,a,t=qs(o,e.havingCrampedStyle()),s=0,o=(r.isShifty&&Yi.isCharacterBox(o)&&(o=Yi.getBaseElem(o),s=mi(qs(o,e.havingCrampedStyle())).skew),"\\c"===r.label),l=o?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=ao.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0<s?{width:"calc(100% - "+K(2*s)+")",marginLeft:K(2*s)}:void 0}]},e)):("\\vec"===r.label?(a=Z.staticSvg("vec",e),i=Z.svgData.vec[1]):((a=mi(a=Z.makeOrd({mode:r.mode,text:r.label},e,"textord"))).italic=0,i=a.width,o&&(l+=a.depth)),c=Z.makeSpan(["accent-body"],[a]),(o="\\textcircled"===r.label)&&(c.classes.push("accent-full"),l=t.height),a=s,o||(a-=i/2),c.style.left=K(a),"\\textcircled"===r.label&&(c.style.top=".2em"),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:-l},{type:"elem",elem:c}]},e)),s=Z.makeSpan(["mord","accent"],[c],e);return n?(n.children[0]=s,n.height=Math.max(s.height,n.height),n.classes[0]="mord",n):s},"htmlBuilder$a"),fl=me((t,e)=>{var r=t.isStretchy?ao.mathMLnode(t.label):new E.MathNode("mo",[Ys(t.label,t.mode)]);return(t=new E.MathNode("mover",[Zs(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),oo=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|")),o({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:me((t,e)=>{var e=Ns(e[0]),r=!oo.test(t.funcName),n=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:n,base:e}},"handler"),htmlBuilder:so,mathmlBuilder:fl}),o({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:me((t,e)=>{var e=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},"handler"),htmlBuilder:so,mathmlBuilder:fl}),o({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"accentUnder",mode:t.mode,label:r,base:e}},"handler"),htmlBuilder:me((t,e)=>{var r=qs(t.base,e),n=ao.svgSpan(t,e),t="\\utilde"===t.label?.12:0,n=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:t},{type:"elem",elem:r}]},e);return Z.makeSpan(["mord","accentunder"],[n],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>{var r=ao.mathMLnode(t.label);return(t=new E.MathNode("munder",[Zs(t.base,e),r])).setAttribute("accentunder","true"),t},"mathmlBuilder")}),lo=me(t=>((t=new E.MathNode("mpadded",t?[t]:[])).setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t),"paddedNode"),o({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:t,funcName:n}=t;return{type:"xArrow",mode:t.mode,label:n,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,n=e.style,i=e.havingStyle(n.sup()),a=Z.wrapFragment(qs(t.body,i,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd",n=(a.classes.push(s+"-arrow-pad"),t.below&&(i=e.havingStyle(n.sub()),(r=Z.wrapFragment(qs(t.below,i,e),e)).classes.push(s+"-arrow-pad")),ao.svgSpan(t,e)),i=-e.fontMetrics().axisHeight+.5*n.height,s=-e.fontMetrics().axisHeight-.5*n.height-.111;return(.25<a.depth||"\\xleftequilibrium"===t.label)&&(s-=a.depth),(r=r?(t=-e.fontMetrics().axisHeight+r.height+.5*n.height+.111,Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:n,shift:i},{type:"elem",elem:r,shift:t}]},e)):Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:n,shift:i}]},e)).children[0].children[0].children[1].classes.push("svg-align"),Z.makeSpan(["mrel","x-arrow"],[r],e)},mathmlBuilder(t,e){var r,n,i=ao.mathMLnode(t.label);return i.setAttribute("minsize","x"===t.label.charAt(0)?"1.75em":"3.0em"),t.body?(r=lo(Zs(t.body,e)),t.below?(n=lo(Zs(t.below,e)),new E.MathNode("munderover",[i,n,r])):new E.MathNode("mover",[i,r])):t.below?(n=lo(Zs(t.below,e)),new E.MathNode("munder",[i,n])):(r=lo(),new E.MathNode("mover",[i,r]))}}),co=Z.makeSpan,me(_i,"htmlBuilder$9"),me(Ai,"mathmlBuilder$8"),o({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:Is(e),isCharacterBox:Yi.isCharacterBox(e)}},htmlBuilder:_i,mathmlBuilder:Ai}),ho=me(t=>"atom"!==(t="ordgroup"===t.type&&t.body.length?t.body[0]:t).type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family,"binrelClass"),o({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){return{type:"mclass",mode:(t=t.parser).mode,mclass:ho(e[0]),body:Is(e[1]),isCharacterBox:Yi.isCharacterBox(e[1])}}}),o({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:t,funcName:r}=t,n=e[1],e=e[0],i="\\stackrel"!==r?ho(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:Is(n)},n={type:"supsub",mode:e.mode,base:n,sup:"\\underset"===r?null:e,sub:"\\underset"===r?e:null};return{type:"mclass",mode:t.mode,mclass:i,body:[n],isCharacterBox:Yi.isCharacterBox(n)}},htmlBuilder:_i,mathmlBuilder:Ai}),o({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"pmb",mode:(t=t.parser).mode,mclass:ho(e[0]),body:Is(e[0])}},htmlBuilder(t,e){var r=Bs(t.body,e,!0);return(t=Z.makeSpan([t.mclass],r,e)).style.textShadow="0.02em 0.01em 0.04px",t},mathmlBuilder(t,e){return t=Xs(t.body,e),(e=new E.MathNode("mstyle",t)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),e}}),uo={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},po=me(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),go=me(t=>"textord"===t.type&&"@"===t.text,"isStartOfArrow"),fo=me((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e,"isLabelEnd"),me(Li,"cdArrow"),me(Ni,"parseCD"),o({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup());return(r=Z.wrapFragment(qs(t.label,r,e),e)).classes.push("cd-label-"+t.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){return e=new E.MathNode("mrow",[Zs(t.label,e)]),(e=new E.MathNode("mpadded",[e])).setAttribute("width","0"),"left"===t.side&&e.setAttribute("lspace","-1width"),e.setAttribute("voffset","0.7em"),(e=new E.MathNode("mstyle",[e])).setAttribute("displaystyle","false"),e.setAttribute("scriptlevel","1"),e}}),o({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){return{type:"cdlabelparent",mode:(t=t.parser).mode,fragment:e[0]}},htmlBuilder(t,e){return(t=Z.wrapFragment(qs(t.fragment,e),e)).classes.push("cd-vert-arrow"),t},mathmlBuilder(t,e){return new E.MathNode("mrow",[Zs(t.fragment,e)])}}),o({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var t=t.parser,r=Ei(e[0],"ordgroup").body,n="",i=0;i<r.length;i++)n+=Ei(r[i],"textord").text;if(e=parseInt(n),isNaN(e))throw new X("\\@char has non-numeric argument "+n);if(e<0||1114111<=e)throw new X("\\@char with invalid code point "+n);return e=e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))),{type:"textord",mode:t.mode,text:e}}}),Bl=me((t,e)=>(e=Bs(t.body,e.withColor(t.color),!1),Z.makeFragment(e)),"htmlBuilder$8"),g=me((t,e)=>(e=Xs(t.body,e.withColor(t.color)),(e=new E.MathNode("mstyle",e)).setAttribute("mathcolor",t.color),e),"mathmlBuilder$7"),o({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var t=t.parser,r=Ei(e[0],"color-token").color;return{type:"color",mode:t.mode,color:r,body:Is(e[1])}},htmlBuilder:Bl,mathmlBuilder:g}),o({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:t,breakOnTokenText:r}=t,e=Ei(e[0],"color-token").color,r=(t.gullet.macros.set("\\current@color",e),t.parseExpression(!0,r));return{type:"color",mode:t.mode,color:e,body:r}},htmlBuilder:Bl,mathmlBuilder:g}),o({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var n="["===(t=t.parser).gullet.future().text?t.parseSizeGroup(!0):null,i=!t.settings.displayMode||!t.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:t.mode,newLine:i,size:n&&Ei(n,"size").value}},htmlBuilder(t,e){var r=Z.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size)&&(r.style.marginTop=K(Aa(t.size,e))),r},mathmlBuilder(t,e){var r=new E.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size)&&r.setAttribute("height",K(Aa(t.size,e))),r}}),mo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},yo=me(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new X("Expected a control sequence",t);return e},"checkControlSequence"),vo=me(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text?t.gullet.popToken():e},"getRHS"),xo=me((t,e,r,n)=>{var i=t.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)},"letCommand"),o({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:t,funcName:e}=t,r=(t.consumeSpaces(),t.fetch());if(mo[r.text])return"\\global"!==e&&"\\\\globallong"!==e||(r.text=mo[r.text]),Ei(t.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),o({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:t}=t,r=e.gullet.popToken(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new X("Expected a control sequence",r);for(var i,a=0,s=[[]];"{"!==e.gullet.future().text;)if("#"===(r=e.gullet.popToken()).text){if("{"===e.gullet.future().text){i=e.gullet.future(),s[a].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new X('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new X('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new X("Expected a macro definition");s[a].push(r.text)}var o=e.gullet.consumeArg().tokens;return i&&o.unshift(i),"\\edef"!==t&&"\\xdef"!==t||(o=e.gullet.expandTokens(o)).reverse(),e.gullet.macros.set(n,{tokens:o,numArgs:a,delimiters:s},t===mo[t]),{type:"internal",mode:e.mode}}}),o({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=yo(t.gullet.popToken()),n=(t.gullet.consumeSpaces(),vo(t));return xo(t,r,n,"\\\\globallet"===e),{type:"internal",mode:t.mode}}}),o({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=yo(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return xo(t,r,i,"\\\\globalfuture"===e),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}}),bo=me(function(t,e,r){if(r=gi(ja.math[t]&&ja.math[t].replace||t,e,r))return r;throw new Error("Unsupported symbol "+t+" and font size "+e+".")},"getMetrics"),wo=me(function(t,e,r,n){return e=r.havingBaseStyle(e),n=Z.makeSpan(n.concat(e.sizingClasses(r)),[t],r),t=e.sizeMultiplier/r.sizeMultiplier,n.height*=t,n.depth*=t,n.maxFontSize=e.sizeMultiplier,n},"styleWrap"),ko=me(function(t,e,r){r=e.havingBaseStyle(r),r=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight,t.classes.push("delimcenter"),t.style.top=K(r),t.height-=r,t.depth+=r},"centerSpan"),To=me(function(t,e,r,n,i,a){return t=Z.makeSymbol(t,"Main-Regular",i,n),i=wo(t,e,n,a),r&&ko(i,n,e),i},"makeSmallDelim"),Eo=me(function(t,e,r,n){return Z.makeSymbol(t,"Size"+e+"-Regular",r,n)},"mathrmSize"),Co=me(function(t,e,r,n,i,a){return t=Eo(t,e,i,n),i=wo(Z.makeSpan(["delimsizing","size"+e],[t],n),ra.TEXT,n,a),r&&ko(i,n,ra.TEXT),i},"makeLargeDelim"),So=me(function(t,e,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===e?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(t,e,r)])])}},"makeGlyphSpan"),_o=me(function(t,e,r){var n=(ya["Size4-Regular"][t.charCodeAt(0)]?ya["Size4-Regular"]:ya["Size1-Regular"])[t.charCodeAt(0)][4],t=new za("inner",pa(t,Math.round(1e3*e))),t=new Fa([t],{width:K(n),height:K(e),style:"width:"+K(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"});return(t=Z.makeSvgSpan([],[t],r)).height=e,t.style.height=K(e),t.style.width=K(n),{type:"elem",elem:t}},"makeInner"),Ao={type:"kern",size:-.008},Lo=["|","\\lvert","\\rvert","\\vert"],No=["\\|","\\lVert","\\rVert","\\Vert"],Io=me(function(t,e,r,n,i,a){var s,o,l,c="",h=0,u=s=o=t,d=null,p="Size1-Regular",t=("\\uparrow"===t?s=o="⏐":"\\Uparrow"===t?s=o="‖":"\\downarrow"===t?u=s="⏐":"\\Downarrow"===t?u=s="‖":"\\updownarrow"===t?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===t?(u="\\Uparrow",s="‖",o="\\Downarrow"):Yi.contains(Lo,t)?(s="∣",c="vert",h=333):Yi.contains(No,t)?(s="∥",c="doublevert",h=556):"["===t||"\\lbrack"===t?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===t||"\\rbrack"===t?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===t||"⌊"===t?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===t||"⌈"===t?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===t||"⌋"===t?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===t||"⌉"===t?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===t||"\\lparen"===t?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===t||"\\rparen"===t?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===t||"\\lbrace"===t?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(t=bo(u,p,i)).height+t.depth),g=(g=bo(s,p,i)).height+g.depth,f=(f=bo(o,p,i)).height+f.depth,m=0,y=1,e=(null!==d&&(m=(v=bo(d,p,i)).height+v.depth,y=2),(v=t+f+m)+Math.max(0,Math.ceil((e-v)/(y*g)))*y*g),v=n.fontMetrics().axisHeight,y=(r&&(v*=n.sizeMultiplier),e/2-v),g=[],v=(0<c.length?(r=e-t-f,v=Math.round(1e3*e),r=fa(c,Math.round(1e3*r)),c=new za(c,r),r=(h/1e3).toFixed(3)+"em",l=(v/1e3).toFixed(3)+"em",c=new Fa([c],{width:r,height:l,viewBox:"0 0 "+h+" "+v}),(h=Z.makeSvgSpan([],[c],n)).height=v/1e3,h.style.width=r,h.style.height=l,g.push({type:"elem",elem:h})):(g.push(So(o,p,i)),g.push(Ao),null===d?g.push(_o(s,e-t-f+.016,n)):(g.push(_o(s,c=(e-t-f-m)/2+.016,n)),g.push(Ao),g.push(So(d,p,i)),g.push(Ao),g.push(_o(s,c,n))),g.push(Ao),g.push(So(u,p,i))),n.havingBaseStyle(ra.TEXT)),r=Z.makeVList({positionType:"bottom",positionData:y,children:g},v);return wo(Z.makeSpan(["delimsizing","mult"],[r],v),ra.TEXT,n,a)},"makeStackedDelim"),Ro=me(function(t,e,r,n,i){return n=da(t,n,r),t=new za(t,n),n=new Fa([t],{width:"400em",height:K(e),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"}),Z.makeSvgSpan(["hide-tail"],[n],i)},"sqrtSvg"),Jo=me(function(t,e){var r,n=e.havingBaseSizing(),i=Go("\\surd",t*n.sizeMultiplier,Fo,n),n=n.sizeMultiplier,a=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),s=0,o=0,l=0,i="small"===i.type?(t<1?n=1:t<1.4&&(n=.7),o=(1+a)/n,(r=Ro("sqrtMain",s=(1+a+.08)/n,l=1e3+1e3*a+80,a,e)).style.minWidth="0.853em",.833/n):"large"===i.type?(l=1080*Po[i.size],o=(Po[i.size]+a)/n,s=(Po[i.size]+a+.08)/n,(r=Ro("sqrtSize"+i.size,s,l,a,e)).style.minWidth="1.02em",1/n):(s=t+a+.08,o=t+a,l=Math.floor(1e3*t+a)+80,(r=Ro("sqrtTall",s,l,a,e)).style.minWidth="0.742em",1.056);return r.height=o,r.style.height=K(s),{span:r,advanceWidth:i,ruleWidth:(e.fontMetrics().sqrtRuleThickness+a)*n}},"makeSqrtImage"),Mo=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Do=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Oo=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Po=[0,1.2,1.8,2.4,3],tl=me(function(t,e,r,n,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),Yi.contains(Mo,t)||Yi.contains(Oo,t))return Co(t,e,!1,r,n,i);if(Yi.contains(Do,t))return Io(t,Po[e],!1,r,n,i);throw new X("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),Bo=[{type:"small",style:ra.SCRIPTSCRIPT},{type:"small",style:ra.SCRIPT},{type:"small",style:ra.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],$o=[{type:"small",style:ra.SCRIPTSCRIPT},{type:"small",style:ra.SCRIPT},{type:"small",style:ra.TEXT},{type:"stack"}],Fo=[{type:"small",style:ra.SCRIPTSCRIPT},{type:"small",style:ra.SCRIPT},{type:"small",style:ra.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],zo=me(function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},"delimTypeToFont"),Go=me(function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);i<r.length&&"stack"!==r[i].type;i++){var a=(a=bo(t,zo(r[i]),"math")).height+a.depth;if("small"===r[i].type&&(a*=n.havingBaseStyle(r[i].style).sizeMultiplier),e<a)return r[i]}return r[r.length-1]},"traverseSequence"),Uo=me(function(t,e,r,n,i,a){"<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle");var s=Yi.contains(Oo,t)?Bo:Yi.contains(Mo,t)?Fo:$o;return"small"===(s=Go(t,e,s,n)).type?To(t,s.style,r,n,i,a):"large"===s.type?Co(t,s.size,r,n,i,a):Io(t,e,r,n,i,a)},"makeCustomSizedDelim"),f=me(function(t,e,r,n,i,a){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,o=5/n.fontMetrics().ptPerEm,e=Math.max(e-s,r+s),r=Math.max(e/500*901,2*e-o);return Uo(t,r,!0,n,i,a)},"makeLeftRightDelim"),qo={sqrtImage:Jo,sizedDelim:tl,sizeToMaxHeight:Po,customSizedDelim:Uo,leftRightDelim:f},jo={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Wo=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."],me(Ii,"checkDelimiter"),o({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:me((t,e)=>(e=Ii(e[0],t),{type:"delimsizing",mode:t.parser.mode,size:jo[t.funcName].size,mclass:jo[t.funcName].mclass,delim:e.text}),"handler"),htmlBuilder:me((t,e)=>"."===t.delim?Z.makeSpan([t.mclass]):qo.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:me(t=>{var e=[],e=("."!==t.delim&&e.push(Ys(t.delim,t.mode)),new E.MathNode("mo",e)),t=("mopen"===t.mclass||"mclose"===t.mclass?e.setAttribute("fence","true"):e.setAttribute("fence","false"),e.setAttribute("stretchy","true"),K(qo.sizeToMaxHeight[t.size]));return e.setAttribute("minsize",t),e.setAttribute("maxsize",t),e},"mathmlBuilder")}),me(Ri,"assertParsed"),o({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new X("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Ii(e[0],t).text,color:r}},"handler")}),o({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var e=Ii(e[0],t),r=(++(t=t.parser).leftrightDepth,t.parseExpression(!1)),n=(--t.leftrightDepth,t.expect("\\right",!1),Ei(t.parseFunction(),"leftright-right"));return{type:"leftright",mode:t.mode,body:r,left:e.text,right:n.delim,rightColor:n.color}},"handler"),htmlBuilder:me((t,e)=>{Ri(t);for(var r,n=Bs(t.body,e,!0,["mopen","mclose"]),i=0,a=0,s=!1,o=0;o<n.length;o++)n[o].isMiddle?s=!0:(i=Math.max(n[o].height,i),a=Math.max(n[o].depth,a));if(i*=e.sizeMultiplier,a*=e.sizeMultiplier,r="."===t.left?Us(e,["mopen"]):qo.leftRightDelim(t.left,i,a,e,t.mode,["mopen"]),n.unshift(r),s)for(var l=1;l<n.length;l++){var c=n[l].isMiddle;c&&(n[l]=qo.leftRightDelim(c.delim,i,a,c.options,t.mode,[]))}return r="."===t.right?Us(e,["mclose"]):(r=t.rightColor?e.withColor(t.rightColor):e,qo.leftRightDelim(t.right,i,a,r,t.mode,["mclose"])),n.push(r),Z.makeSpan(["minner"],n,e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>{Ri(t);var r,e=Xs(t.body,e);return"."!==t.left&&((r=new E.MathNode("mo",[Ys(t.left,t.mode)])).setAttribute("fence","true"),e.unshift(r)),"."!==t.right&&((r=new E.MathNode("mo",[Ys(t.right,t.mode)])).setAttribute("fence","true"),t.rightColor&&r.setAttribute("mathcolor",t.rightColor),e.push(r)),Hs(e)},"mathmlBuilder")}),o({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{if(e=Ii(e[0],t),t.parser.leftrightDepth)return{type:"middle",mode:t.parser.mode,delim:e.text};throw new X("\\middle without preceding \\left",e)},"handler"),htmlBuilder:me((t,e)=>{var r;return"."===t.delim?r=Us(e,[]):(r=qo.sizedDelim(t.delim,1,e,t.mode,[]),t={delim:t.delim,options:e},r.isMiddle=t),r},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t="\\vert"===t.delim||"|"===t.delim?Ys("|","text"):Ys(t.delim,t.mode),(t=new E.MathNode("mo",[t])).setAttribute("fence","true"),t.setAttribute("lspace","0.05em"),t.setAttribute("rspace","0.05em"),t),"mathmlBuilder")}),cl=me((t,e)=>{var r,n,i,a,s,o=Z.wrapFragment(qs(t.body,e),e),l=t.label.slice(1),c=e.sizeMultiplier,h=0,u=Yi.isCharacterBox(t.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/c,h=-.5*e.fontMetrics().xHeight):"phase"===l?(a=Aa({number:.6,unit:"pt"},e),s=Aa({number:.35,unit:"ex"},e),c/=e.havingBaseSizing().sizeMultiplier,n=o.height+o.depth+a+s,o.style.paddingLeft=K(n/2+a),c=Math.floor(1e3*n*c),i=ha(c),i=new Fa([new za("phase",i)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[i],e)).style.height=K(n),h=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),n=i=c=0,i=/box/.test(l)?(n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),c=e.fontMetrics().fboxsep+("colorbox"===l?0:n)):"angl"===l?(c=4*(n=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=ao.encloseSpan(o,l,c,i,e),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(n)):"angl"===l&&.049!==n&&(r.style.borderTopWidth=K(n),r.style.borderRightWidth=K(n)),h=o.depth+i,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor)&&(r.style.borderColor=t.borderColor)),s=t.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},e):(a=/cancel|phase/.test(l)?["svg-align"]:[],Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:a}]},e)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],e):Z.makeSpan(["mord"],[s],e)},"htmlBuilder$7"),pl=me((t,e)=>{var r=new E.MathNode(-1<t.label.indexOf("colorbox")?"mpadded":"menclose",[Zs(t.body,e)]);switch(t.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":var n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm;r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===t.label&&(n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),r.setAttribute("style","border: "+n+"em solid "+String(t.borderColor)));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r},"mathmlBuilder$6"),o({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:t,funcName:n}=t,i=Ei(e[0],"color-token").color;return{type:"enclose",mode:t.mode,label:n,backgroundColor:i,body:e[1]}},htmlBuilder:cl,mathmlBuilder:pl}),o({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:t,funcName:n}=t,i=Ei(e[0],"color-token").color,a=Ei(e[1],"color-token").color;return{type:"enclose",mode:t.mode,label:n,backgroundColor:a,borderColor:i,body:e[2]}},htmlBuilder:cl,mathmlBuilder:pl}),o({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){return{type:"enclose",mode:(t=t.parser).mode,label:"\\fbox",body:e[0]}}}),o({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"enclose",mode:t.mode,label:r,body:e}},htmlBuilder:cl,mathmlBuilder:pl}),o({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){return{type:"enclose",mode:(t=t.parser).mode,label:"\\angl",body:e[0]}}}),Yo={},me(Mi,"defineEnvironment"),Ho={},me(l,"defineMacro"),me(Di,"getHLines"),Vo=me(t=>{if(!t.parser.settings.displayMode)throw new X("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),me(Oi,"getAutoTag"),me(Pi,"parseArray"),me(Bi,"dCellStyle"),m=me(function(t,e){var r=t.body.length,P=t.hLinesBeforeRow,n=0,i=new Array(r),a=[],s=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),o=1/e.fontMetrics().ptPerEm,l=5*o,c=(t.colSeparationType&&"small"===t.colSeparationType&&(l=e.havingStyle(ra.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778),"CD"===t.colSeparationType?Aa({number:3,unit:"ex"},e):12*o),B=3*o,$=.7*(o=t.arraystretch*c),F=.3*o,h=0;function u(t){for(var e=0;e<t.length;++e)0<e&&(h+=.25),a.push({pos:h,isDashed:t[e]})}for(me(u,"setHLinePos"),u(P[0]),M=0;M<t.body.length;++M){for(var d=t.body[M],p=$,g=F,f=(n<d.length&&(n=d.length),new Array(d.length)),m=0;m<d.length;++m){var y=qs(d[m],e);g<y.depth&&(g=y.depth),p<y.height&&(p=y.height),f[m]=y}var z=t.rowGaps[M],v=0;z&&0<(v=Aa(z,e))&&(g<(v+=F)&&(g=v),v=0),t.addJot&&(g+=B),f.height=p,f.depth=g,h+=p,f.pos=h,h+=g+v,i[M]=f,u(P[M+1])}var x,b,w=h/2+e.fontMetrics().axisHeight,k=t.cols||[],T=[],E=[];if(t.tags&&t.tags.some(t=>t))for(M=0;M<r;++M){var C=i[M],G=C.pos-w,S=t.tags[M],_=void 0;(_=!0===S?Z.makeSpan(["eqn-num"],[],e):!1===S?Z.makeSpan([],[],e):Z.makeSpan([],Bs(S,e,!0),e)).depth=C.depth,_.height=C.height,E.push({type:"elem",elem:_,shift:G})}for(b=m=0;m<n||b<k.length;++m,++b){for(var A=k[b]||{},U=!0;"separator"===A.type;){if(U||((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(e.fontMetrics().doubleRuleSep),T.push(x)),"|"!==A.separator&&":"!==A.separator)throw new X("Invalid separator type: "+A.separator);var L="|"===A.separator?"solid":"dashed",N=Z.makeSpan(["vertical-separator"],[],e);N.style.height=K(h),N.style.borderRightWidth=K(s),N.style.borderRightStyle=L,N.style.margin="0 "+K(-s/2),(L=h-w)&&(N.style.verticalAlign=K(-L)),T.push(N),A=k[++b]||{},U=!1}if(!(n<=m)){for(var I=void 0,R=((0<m||t.hskipBeforeAndAfter)&&0!==(I=Yi.deflt(A.pregap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x)),[]),M=0;M<r;++M){var q,D=i[M],O=D[m];O&&(q=D.pos-w,O.depth=D.depth,O.height=D.height,R.push({type:"elem",elem:O,shift:q}))}R=Z.makeVList({positionType:"individualShift",children:R},e),R=Z.makeSpan(["col-align-"+(A.align||"c")],[R]),T.push(R),(m<n-1||t.hskipBeforeAndAfter)&&0!==(I=Yi.deflt(A.postgap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x))}}if(i=Z.makeSpan(["mtable"],T),0<a.length){for(var j=Z.makeLineSpan("hline",e,s),W=Z.makeLineSpan("hdashline",e,s),Y=[{type:"elem",elem:i,shift:0}];0<a.length;){var H=a.pop(),V=H.pos-w;Y.push(H.isDashed?{type:"elem",elem:W,shift:V}:{type:"elem",elem:j,shift:V})}i=Z.makeVList({positionType:"individualShift",children:Y},e)}return 0===E.length?Z.makeSpan(["mord"],[i],e):(c=Z.makeVList({positionType:"individualShift",children:E},e),c=Z.makeSpan(["tag"],[c],e),Z.makeFragment([i,c]))},"htmlBuilder"),Xo={c:"center ",l:"left ",r:"right "},Pl=me(function(t,e){for(var r=[],n=new E.MathNode("mtd",[],["mtr-glue"]),i=new E.MathNode("mtd",[],["mml-eqn-num"]),a=0;a<t.body.length;a++){for(var s=t.body[a],o=[],l=0;l<s.length;l++)o.push(new E.MathNode("mtd",[Zs(s[l],e)]));t.tags&&t.tags[a]&&(o.unshift(n),o.push(n),t.leqno?o.unshift(i):o.push(i)),r.push(new E.MathNode("mtr",o))}var c=new E.MathNode("mtable",r),h=.5===t.arraystretch?.1:.16+t.arraystretch-1+(t.addJot?.09:0),h=(c.setAttribute("rowspacing",K(h)),""),u="";if(t.cols&&0<t.cols.length){var d=t.cols,p="",g=!1,f=0,m=d.length;"separator"===d[0].type&&(h+="top ",f=1),"separator"===d[d.length-1].type&&(h+="bottom ",--m);for(var y=f;y<m;y++)"align"===d[y].type?(u+=Xo[d[y].align],g&&(p+="none "),g=!0):"separator"===d[y].type&&g&&(p+="|"===d[y].separator?"solid ":"dashed ",g=!1);c.setAttribute("columnalign",u.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===t.colSeparationType){for(var v=t.cols||[],x="",b=1;b<v.length;b++)x+=b%2?"0em ":"1em ";c.setAttribute("columnspacing",x.trim())}else"alignat"===t.colSeparationType||"gather"===t.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===t.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===t.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");for(var w="",k=t.hLinesBeforeRow,h=(h+=0<k[0].length?"left ":"")+(0<k[k.length-1].length?"right ":""),T=1;T<k.length-1;T++)w+=0===k[T].length?"none ":k[T][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==h&&(c=new E.MathNode("menclose",[c])).setAttribute("notation",h.trim()),t.arraystretch&&t.arraystretch<1&&(c=new E.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},"mathmlBuilder"),fl=me(function(t,e){-1===t.envName.indexOf("ed")&&Vo(t);var i,r=[],n=-1<t.envName.indexOf("at")?"alignat":"align",a="split"===t.envName,n=Pi(t.parser,{cols:r,addJot:!0,autoTag:a?void 0:Oi(t.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),s=0,o={type:"ordgroup",mode:t.mode,body:[]};if(e[0]&&"ordgroup"===e[0].type){for(var l="",c=0;c<e[0].body.length;c++)l+=Ei(e[0].body[c],"textord").text;i=Number(l),s=2*i}var h=!s;n.body.forEach(function(t){for(var e=1;e<t.length;e+=2){var r=Ei(t[e],"styling");Ei(r.body[0],"ordgroup").body.unshift(o)}if(h)s<t.length&&(s=t.length);else{var n=t.length/2;if(i<n)throw new X("Too many math in a row: expected "+i+", but got "+n,t[0])}});for(var u=0;u<s;++u){var d="r",p=0;u%2==1?d="l":0<u&&h&&(p=1),r[u]={type:"align",align:d,pregap:p,postgap:0}}return n.colSeparationType=h?"align":"alignat",n},"alignedHandler"),Mi({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){return e={cols:e=(Si(e[0])?[e[0]]:Ei(e[0],"ordgroup").body).map(function(t){var e=Ci(t).text;if(-1!=="lcr".indexOf(e))return{type:"align",align:e};if("|"===e)return{type:"separator",separator:"|"};if(":"===e)return{type:"separator",separator:":"};throw new X("Unknown column alignment: "+e,t)}),hskipBeforeAndAfter:!0,maxNumCols:e.length},Pi(t.parser,e,Bi(t.envName))},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===t.envName.charAt(t.envName.length-1)){var i=t.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new X("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}return i=Pi(t.parser,n,Bi(t.envName)),n=Math.max(0,...i.body.map(t=>t.length)),i.cols=new Array(n).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){return(t=Pi(t.parser,{arraystretch:.5},"script")).colSeparationType="small",t},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){if(1<(e=(Si(e[0])?[e[0]]:Ei(e[0],"ordgroup").body).map(function(t){var e=Ci(t).text;if(-1!=="lc".indexOf(e))return{type:"align",align:e};throw new X("Unknown column alignment: "+e,t)})).length)throw new X("{subarray} can contain only one column");if(0<(t=Pi(t.parser,{cols:e,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<t.body[0].length)throw new X("{subarray} can contain only one column");return t},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e=Pi(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Bi(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:-1<t.envName.indexOf("r")?".":"\\{",right:-1<t.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:fl,htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){Yi.contains(["gather","gather*"],t.envName)&&Vo(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Oi(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Pi(t.parser,e,"display")},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:fl,htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Vo(t);var e={autoTag:Oi(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Pi(t.parser,e,"display")},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Vo(t),Ni(t.parser)},htmlBuilder:m,mathmlBuilder:Pl}),l("\\nonumber","\\gdef\\@eqnsw{0}"),l("\\notag","\\nonumber"),o({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new X(t.funcName+" valid only within array environment")}}),Ko=Yo,o({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:t,funcName:r}=t,n=e[0];if("ordgroup"!==n.type)throw new X("Invalid environment name",n);for(var i="",a=0;a<n.body.length;++a)i+=Ei(n.body[a],"textord").text;if("\\begin"!==r)return{type:"environment",mode:t.mode,name:i,nameGroup:n};if(!Ko.hasOwnProperty(i))throw new X("No such environment: "+i,n);var e=Ko[i],{args:r,optArgs:s}=t.parseArguments("\\begin{"+i+"}",e),o={mode:t.mode,envName:i,parser:t},e=e.handler(o,r,s),o=(t.expect("\\end",!1),t.nextToken);if((r=Ei(t.parseFunction(),"environment")).name!==i)throw new X("Mismatch: \\begin{"+i+"} matched by \\end{"+r.name+"}",o);return e}}),Bl=me((t,e)=>{var r=t.font,e=e.withFont(r);return qs(t.body,e)},"htmlBuilder$5"),g=me((t,e)=>{var r=t.font,e=e.withFont(r);return Zs(t.body,e)},"mathmlBuilder$4"),Zo={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},o({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=Ns(e[0]);return{type:"font",mode:t.mode,font:(r=r in Zo?Zo[r]:r).slice(1),body:e}},"handler"),htmlBuilder:Bl,mathmlBuilder:g}),o({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:me((t,e)=>{var t=t.parser,e=e[0],r=Yi.isCharacterBox(e);return{type:"mclass",mode:t.mode,mclass:ho(e),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:e}],isCharacterBox:r}},"handler")}),o({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{parser:t,funcName:r,breakOnTokenText:n}=t,i=t.mode,n=t.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:n}}},"handler"),htmlBuilder:Bl,mathmlBuilder:g}),Qo=me((t,e)=>("display"===t?e=e.id>=ra.SCRIPT.id?e.text():ra.DISPLAY:"text"===t&&e.size===ra.DISPLAY.size?e=ra.TEXT:"script"===t?e=ra.SCRIPT:"scriptscript"===t&&(e=ra.SCRIPTSCRIPT),e),"adjustStyle"),Jo=me((t,e)=>{var r,n,i,a,s=Qo(t.size,e.style),o=s.fracNum(),l=s.fracDen(),o=e.havingStyle(o),c=qs(t.numer,o,e),h=(t.continued&&(h=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm,c.height=c.height<h?h:c.height,c.depth=c.depth<u?u:c.depth),o=e.havingStyle(l),qs(t.denom,o,e)),u=t.hasBarLine?(n=(a=t.barSize?(n=Aa(t.barSize,e),Z.makeLineSpan("frac-line",e,n)):Z.makeLineSpan("frac-line",e)).height,a.height):(a=null,n=0,e.fontMetrics().defaultRuleThickness),l=s.size===ra.DISPLAY.size||"display"===t.size?(r=e.fontMetrics().num1,i=0<n?3*u:7*u,e.fontMetrics().denom1):(i=0<n?(r=e.fontMetrics().num2,u):(r=e.fontMetrics().num3,3*u),e.fontMetrics().denom2),u=a?(u=e.fontMetrics().axisHeight,r-c.depth-(u+.5*n)<i&&(r+=i-(r-c.depth-(u+.5*n))),u-.5*n-(h.height-l)<i&&(l+=i-(u-.5*n-(h.height-l))),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:a,shift:-(u-.5*n)},{type:"elem",elem:c,shift:-r}]},e)):((a=r-c.depth-(h.height-l))<i&&(r+=.5*(i-a),l+=.5*(i-a)),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:c,shift:-r}]},e));return o=e.havingStyle(s),u.height*=o.sizeMultiplier/e.sizeMultiplier,u.depth*=o.sizeMultiplier/e.sizeMultiplier,n=s.size===ra.DISPLAY.size?e.fontMetrics().delim1:(s.size===ra.SCRIPTSCRIPT.size?e.havingStyle(ra.SCRIPT):e).fontMetrics().delim2,i=null==t.leftDelim?Us(e,["mopen"]):qo.customSizedDelim(t.leftDelim,n,!0,e.havingStyle(s),t.mode,["mopen"]),a=t.continued?Z.makeSpan([]):null==t.rightDelim?Us(e,["mclose"]):qo.customSizedDelim(t.rightDelim,n,!0,e.havingStyle(s),t.mode,["mclose"]),Z.makeSpan(["mord"].concat(o.sizingClasses(e)),[i,Z.makeSpan(["mfrac"],[u]),a],e)},"htmlBuilder$4"),tl=me((t,e)=>{var r=new E.MathNode("mfrac",[Zs(t.numer,e),Zs(t.denom,e)]),n=(t.hasBarLine?t.barSize&&(n=Aa(t.barSize,e),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),Qo(t.size,e.style));return n.size!==e.style.size&&(r=new E.MathNode("mstyle",[r]),e=n.size===ra.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")),null!=t.leftDelim||null!=t.rightDelim?(n=[],null!=t.leftDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),n.push(r),null!=t.rightDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),Hs(n)):r},"mathmlBuilder$3"),o({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:me((t,e)=>{var r,{parser:t,funcName:n}=t,i=e[0],e=e[1],a=null,s=null,o="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,a="(",s=")";break;case"\\\\bracefrac":r=!1,a="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,a="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:t.mode,continued:!1,numer:i,denom:e,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:Jo,mathmlBuilder:tl}),o({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:me((t,e)=>{var t=t.parser,r=e[0];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:e[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),o({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:t,funcName:r,token:n}=t;switch(r){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:e,token:n}}}),el=["display","text","script","scriptscript"],rl=me(function(t){var e=null;return 0<t.length?"."===(e=t)?null:t:e},"delimFromValue"),o({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var r,t=t.parser,n=e[4],i=e[5],a="atom"===(a=Ns(e[0])).type&&"open"===a.family?rl(a.text):null,s="atom"===(s=Ns(e[1])).type&&"close"===s.family?rl(s.text):null,o=null,l=!!(l=Ei(e[2],"size")).isBlank||0<(o=l.value).number,c="auto";return"ordgroup"===(e=e[3]).type?0<e.body.length&&(r=Ei(e.body[0],"textord"),c=el[Number(r.text)]):(e=Ei(e,"textord"),c=el[Number(e.text)]),{type:"genfrac",mode:t.mode,numer:n,denom:i,continued:!1,hasBarLine:l,barSize:o,leftDelim:a,rightDelim:s,size:c}},htmlBuilder:Jo,mathmlBuilder:tl}),o({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:t,token:r}=t;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:Ei(e[0],"size").value,token:r}}}),o({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:me((t,e)=>{var t=t.parser,r=e[0],n=Wi(Ei(e[1],"infix").size),e=e[2],i=0<n.number;return{type:"genfrac",mode:t.mode,numer:r,denom:e,continued:!1,hasBarLine:i,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:Jo,mathmlBuilder:tl}),nl=me((t,e)=>{var r,n,i=e.style,i="supsub"===t.type?(r=t.sup?qs(t.sup,e.havingStyle(i.sup()),e):qs(t.sub,e.havingStyle(i.sub()),e),Ei(t.base,"horizBrace")):Ei(t,"horizBrace"),t=qs(i.base,e.havingBaseStyle(ra.DISPLAY)),a=ao.svgSpan(i,e);return(i.isOver?(n=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:.1},{type:"elem",elem:a}]},e)).children[0].children[0].children[1]:(n=Z.makeVList({positionType:"bottom",positionData:t.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:t}]},e)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],e),n=i.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},e):Z.makeVList({positionType:"bottom",positionData:a.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:a}]},e)),Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],e)},"htmlBuilder$3"),f=me((t,e)=>{var r=ao.mathMLnode(t.label);return new E.MathNode(t.isOver?"mover":"munder",[Zs(t.base,e),r])},"mathmlBuilder$2"),o({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"horizBrace",mode:t.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:nl,mathmlBuilder:f}),o({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=e[1],e=Ei(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:e})?{type:"href",mode:t.mode,href:e,body:Is(r)}:t.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:me((t,e)=>{var r=Bs(t.body,e,!1);return Z.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>((e=(e=Ks(t.body,e))instanceof js?e:new js("mrow",[e])).setAttribute("href",t.href),e),"mathmlBuilder")}),o({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=Ei(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var n=[],i=0;i<r.length;i++){var a=r[i];n.push({type:"textord",mode:"text",text:"~"===a?"\\textasciitilde":a})}return e={type:"text",mode:t.mode,font:"\\texttt",body:n},{type:"href",mode:t.mode,href:r,body:Is(e)}},"handler")}),o({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){return{type:"hbox",mode:(t=t.parser).mode,body:Is(e[0])}},htmlBuilder(t,e){return t=Bs(t.body,e,!1),Z.makeFragment(t)},mathmlBuilder(t,e){return new E.MathNode("mrow",Xs(t.body,e))}}),o({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:me((t,e)=>{var{parser:t,funcName:r}=t,n=Ei(e[0],"raw").string,e=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,a={};switch(r){case"\\htmlClass":i={command:"\\htmlClass",class:a.class=n};break;case"\\htmlId":i={command:"\\htmlId",id:a.id=n};break;case"\\htmlStyle":i={command:"\\htmlStyle",style:a.style=n};break;case"\\htmlData":for(var s=n.split(","),o=0;o<s.length;o++){var l=s[o].split("=");if(2!==l.length)throw new X("Error parsing key-value for \\htmlData");a["data-"+l[0].trim()]=l[1].trim()}i={command:"\\htmlData",attributes:a};break;default:throw new Error("Unrecognized html command")}return t.settings.isTrusted(i)?{type:"html",mode:t.mode,attributes:a,body:Is(e)}:t.formatUnsupportedCmd(r)},"handler"),htmlBuilder:me((t,e)=>{var r,n=Bs(t.body,e,!1),i=["enclosing"],a=(t.attributes.class&&i.push(...t.attributes.class.trim().split(/\s+/)),Z.makeSpan(i,n,e));for(r in t.attributes)"class"!==r&&t.attributes.hasOwnProperty(r)&&a.setAttribute(r,t.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:me((t,e)=>Ks(t.body,e),"mathmlBuilder")}),o({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:me((t,e)=>({type:"htmlmathml",mode:(t=t.parser).mode,html:Is(e[0]),mathml:Is(e[1])}),"handler"),htmlBuilder:me((t,e)=>(t=Bs(t.html,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>Ks(t.mathml,e),"mathmlBuilder")}),il=me(function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new X("Invalid size: '"+t+"' in \\includegraphics");if(t={number:+(e[1]+e[2]),unit:e[3]},_a(t))return t;throw new X("Invalid unit: '"+t.unit+"' in \\includegraphics.")},"sizeData"),o({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:me((t,e,r)=>{var t=t.parser,n={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Ei(r[0],"raw").string.split(","),l=0;l<o.length;l++){var c=o[l].split("=");if(2===c.length){var h=c[1].trim();switch(c[0].trim()){case"alt":s=h;break;case"width":n=il(h);break;case"height":i=il(h);break;case"totalheight":a=il(h);break;default:throw new X("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}return r=Ei(e[0],"url").url,""===s&&(s=(s=(s=r).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),t.settings.isTrusted({command:"\\includegraphics",url:r})?{type:"includegraphics",mode:t.mode,alt:s,width:n,height:i,totalheight:a,src:r}:t.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:me((t,e)=>{var r=Aa(t.height,e),n=0,i=(0<t.totalheight.number&&(n=Aa(t.totalheight,e)-r),0),e=(0<t.width.number&&(i=Aa(t.width,e)),{height:K(r+n)});return 0<i&&(e.width=K(i)),0<n&&(e.verticalAlign=K(-n)),(i=new Pa(t.src,t.alt,e)).height=r,i.depth=n,i},"htmlBuilder"),mathmlBuilder:me((t,e)=>{var r=new E.MathNode("mglyph",[]),n=(r.setAttribute("alt",t.alt),Aa(t.height,e)),i=0;return 0<t.totalheight.number&&(i=Aa(t.totalheight,e)-n,r.setAttribute("valign",K(-i))),r.setAttribute("height",K(n+i)),0<t.width.number&&(n=Aa(t.width,e),r.setAttribute("width",K(n))),r.setAttribute("src",t.src),r},"mathmlBuilder")}),o({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var r,n,{parser:t,funcName:i}=t,e=Ei(e[0],"size");return t.settings.strict&&(r="m"===i[1],n="mu"===e.value.unit,r?(n||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" supports only mu units, not "+e.value.unit+" units"),"math"!==t.mode&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" works only in math mode")):n&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" doesn't support mu units")),{type:"kern",mode:t.mode,dimension:e.value}},htmlBuilder(t,e){return Z.makeGlue(t.dimension,e)},mathmlBuilder(t,e){return t=Aa(t.dimension,e),new E.SpaceNode(t)}}),o({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:e}},"handler"),htmlBuilder:me((t,e)=>{var r="clap"===t.alignment?(r=Z.makeSpan([],[qs(t.body,e)]),Z.makeSpan(["inner"],[r],e)):Z.makeSpan(["inner"],[qs(t.body,e)]),n=Z.makeSpan(["fix"],[]),t=Z.makeSpan([t.alignment],[r,n],e);return(r=Z.makeSpan(["strut"])).style.height=K(t.height+t.depth),t.depth&&(r.style.verticalAlign=K(-t.depth)),t.children.unshift(r),t=Z.makeSpan(["thinbox"],[t],e),Z.makeSpan(["mord","vbox"],[t],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(e=new E.MathNode("mpadded",[Zs(t.body,e)]),"rlap"!==t.alignment&&(t="llap"===t.alignment?"-1":"-0.5",e.setAttribute("lspace",t+"width")),e.setAttribute("width","0px"),e),"mathmlBuilder")}),o({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:t,parser:r}=t,n=r.mode,t=(r.switchMode("math"),"\\("===t?"\\)":"$"),i=r.parseExpression(!1,t);return r.expect(t),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:i}}}),o({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new X("Mismatched "+t.funcName)}}),al=me((t,e)=>{switch(e.style.size){case ra.DISPLAY.size:return t.display;case ra.TEXT.size:return t.text;case ra.SCRIPT.size:return t.script;case ra.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle"),o({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:me((t,e)=>({type:"mathchoice",mode:(t=t.parser).mode,display:Is(e[0]),text:Is(e[1]),script:Is(e[2]),scriptscript:Is(e[3])}),"handler"),htmlBuilder:me((t,e)=>(t=al(t,e),t=Bs(t,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=al(t,e),Ks(t,e)),"mathmlBuilder")}),sl=me((t,e,r,n,i,a,s)=>{t=Z.makeSpan([],[t]);var o,l,c=r&&Yi.isCharacterBox(r);if(e&&(o={elem:e=qs(e,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}),r&&(l={elem:e=qs(r,n.havingStyle(i.sub()),n),kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}),o&&l)var r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);else if(l)i=t.height-s,h=Z.makeVList({positionType:"top",positionData:i,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n);else{if(!o)return t;e=t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:e,children:[{type:"elem",elem:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}return r=[h],l&&0!==a&&!c&&((i=Z.makeSpan(["mspace"],[],n)).style.marginRight=K(a),r.unshift(i)),Z.makeSpan(["mop","op-limits"],r,n)},"assembleSupSub"),ol=["\\smallint"],ll=me((t,e)=>{var r,n,i,a=!1,s=("supsub"===t.type?(r=t.sup,n=t.sub,i=Ei(t.base,"op"),a=!0):i=Ei(t,"op"),!1);if((t=e.style).size===ra.DISPLAY.size&&i.symbol&&!Yi.contains(ol,i.name)&&(s=!0),i.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==i.name&&"\\oiiint"!==i.name||(c=i.name.slice(1),i.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(i.name,l,"math",e,["mop","op-symbol",s?"large-op":"small-op"]),0<c.length&&(o=l.italic,h=Z.staticSvg(c+"Size"+(s?"2":"1"),e),l=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:s?.08:0}]},e),i.name="\\"+c,l.classes.unshift("mop"),l.italic=o)}else if(i.body){var h=Bs(i.body,e,!0);1===h.length&&h[0]instanceof $a?(l=h[0]).classes[0]="mop":l=Z.makeSpan(["mop"],h,e)}else{for(var u=[],d=1;d<i.name.length;d++)u.push(Z.mathsym(i.name[d],i.mode,e));l=Z.makeSpan(["mop"],u,e)}return c=s=0,(l instanceof $a||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(s=(l.height-l.depth)/2-e.fontMetrics().axisHeight,c=l.italic),a?sl(l,r,n,e,t,c,s):(s&&(l.style.position="relative",l.style.top=K(s)),l)},"htmlBuilder$2"),cl=me((t,e)=>{var r;return t.symbol?(r=new js("mo",[Ys(t.name,t.mode)]),Yi.contains(ol,t.name)&&r.setAttribute("largeop","false")):r=t.body?new js("mo",Xs(t.body,e)):(r=new js("mi",[new Ws(t.name.slice(1))]),e=new js("mo",[Ys("","text")]),t.parentIsSupSub?new js("mrow",[r,e]):wi([r,e])),r},"mathmlBuilder$1"),hl={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},o({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:me((t,e)=>{var{parser:t,funcName:r}=t;return 1===r.length&&(r=hl[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:ll,mathmlBuilder:cl}),o({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Is(e)}),"handler"),htmlBuilder:ll,mathmlBuilder:cl}),ul={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},o({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:ll,mathmlBuilder:cl}),o({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:ll,mathmlBuilder:cl}),o({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return 1===e.length&&(e=ul[e]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:e}},htmlBuilder:ll,mathmlBuilder:cl}),dl=me((t,e)=>{var r,n,i,a,s=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=Ei(t.base,"operatorname"),s=!0):i=Ei(t,"operatorname"),0<i.body.length){for(var t=i.body.map(t=>{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),o=Bs(t,e.withFont("mathrm"),!0),l=0;l<o.length;l++){var c=o[l];c instanceof $a&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=Z.makeSpan(["mop"],o,e)}else a=Z.makeSpan(["mop"],[],e);return s?sl(a,r,n,e,e.style,0,0):a},"htmlBuilder$1"),pl=me((t,e)=>{for(var r=Xs(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof E.SpaceNode))if(a instanceof E.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var s=a.children[0];1===a.children.length&&s instanceof E.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}n&&(e=r.map(t=>t.toText()).join(""),r=[new E.TextNode(e)]),(e=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new E.MathNode("mo",[Ys("","text")]);return t.parentIsSupSub?new E.MathNode("mrow",[e,o]):E.newDocumentFragment([e,o])},"mathmlBuilder"),o({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"operatorname",mode:t.mode,body:Is(e),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:dl,mathmlBuilder:pl}),l("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),vi({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Z.makeFragment(Bs(t.body,e,!1)):Z.makeSpan(["mord"],Bs(t.body,e,!0),e)},mathmlBuilder(t,e){return Ks(t.body,e,!0)}}),o({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){return t=t.parser,e=e[0],{type:"overline",mode:t.mode,body:e}},htmlBuilder(t,e){var t=qs(t.body,e.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},e);return Z.makeSpan(["mord","overline"],[t],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("mover",[Zs(t.body,e),r])).setAttribute("accent","true"),t}}),o({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"phantom",mode:t.mode,body:Is(e)}),"handler"),htmlBuilder:me((t,e)=>(t=Bs(t.body,e.withPhantom(),!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=Xs(t.body,e),new E.MathNode("mphantom",t)),"mathmlBuilder")}),o({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"hphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var r=Z.makeSpan([],[qs(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Z.makeSpan(["mord"],[r],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=Xs(Is(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("height","0px"),t.setAttribute("depth","0px"),t),"mathmlBuilder")}),o({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"vphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var t=Z.makeSpan(["inner"],[qs(t.body,e.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[t,r],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=Xs(Is(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("width","0px"),t),"mathmlBuilder")}),o({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var t=t.parser,r=Ei(e[0],"size").value;return{type:"raisebox",mode:t.mode,dy:r,body:e[1]}},htmlBuilder(t,e){var r=qs(t.body,e),t=Aa(t.dy,e);return Z.makeVList({positionType:"shift",positionData:-t,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return e=new E.MathNode("mpadded",[Zs(t.body,e)]),t=t.dy.number+t.dy.unit,e.setAttribute("voffset",t),e}}),o({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){return{type:"internal",mode:(t=t.parser).mode}}}),o({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var t=t.parser,r=r[0],n=Ei(e[0],"size"),e=Ei(e[1],"size");return{type:"rule",mode:t.mode,shift:r&&Ei(r,"size").value,width:n.value,height:e.value}},htmlBuilder(t,e){var r=Z.makeSpan(["mord","rule"],[],e),n=Aa(t.width,e),i=Aa(t.height,e),t=t.shift?Aa(t.shift,e):0;return r.style.borderRightWidth=K(n),r.style.borderTopWidth=K(i),r.style.bottom=K(t),r.width=n,r.height=i+t,r.depth=-t,r.maxFontSize=1.125*i*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Aa(t.width,e),n=Aa(t.height,e),t=t.shift?Aa(t.shift,e):0,e=e.color&&e.getColor()||"black",i=new E.MathNode("mspace"),e=(i.setAttribute("mathbackground",e),i.setAttribute("width",K(r)),i.setAttribute("height",K(n)),new E.MathNode("mpadded",[i]));return 0<=t?e.setAttribute("height",K(t)):(e.setAttribute("height",K(t)),e.setAttribute("depth",K(-t))),e.setAttribute("voffset",K(t)),e}}),me($i,"sizingGroup"),gl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],fl=me((t,e)=>{var r=e.havingSize(t.size);return $i(t.body,r,e)},"htmlBuilder"),o({type:"sizing",names:gl,props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{breakOnTokenText:t,funcName:r,parser:n}=t,t=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:gl.indexOf(r)+1,body:t}},"handler"),htmlBuilder:fl,mathmlBuilder:me((t,e)=>(e=e.havingSize(t.size),t=Xs(t.body,e),(t=new E.MathNode("mstyle",t)).setAttribute("mathsize",K(e.sizeMultiplier)),t),"mathmlBuilder")}),o({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:me((t,e,r)=>{var t=t.parser,n=!1,i=!1,a=r[0]&&Ei(r[0],"ordgroup");if(a)for(var s,o=0;o<a.body.length;++o)if("t"===(s=a.body[o].text))n=!0;else{if("b"!==s){i=n=!1;break}i=!0}else i=n=!0;return r=e[0],{type:"smash",mode:t.mode,body:r,smashHeight:n,smashDepth:i}},"handler"),htmlBuilder:me((t,e)=>{var r=Z.makeSpan([],[qs(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;return t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Z.makeSpan(["mord"],[t],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(e=new E.MathNode("mpadded",[Zs(t.body,e)]),t.smashHeight&&e.setAttribute("height","0px"),t.smashDepth&&e.setAttribute("depth","0px"),e),"mathmlBuilder")}),o({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){return t=t.parser,r=r[0],e=e[0],{type:"sqrt",mode:t.mode,body:e,index:r}},htmlBuilder(t,e){0===(r=qs(t.body,e.havingCrampedStyle())).height&&(r.height=e.fontMetrics().xHeight);var r=Z.wrapFragment(r,e),n=i=e.fontMetrics().defaultRuleThickness,n=i+(e.style.id<ra.TEXT.id?e.fontMetrics().xHeight:n)/4,i=r.height+r.depth+n+i,{span:i,ruleWidth:a,advanceWidth:s}=qo.sqrtImage(i,e),o=((o=i.height-a)>r.height+r.depth+n&&(n=(n+o-r.height-r.depth)/2),i.height-r.height-n-a),n=(r.style.paddingLeft=K(s),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+o)},{type:"elem",elem:i},{type:"kern",size:a}]},e));return t.index?(s=e.havingStyle(ra.SCRIPTSCRIPT),r=qs(t.index,s,e),o=.6*(n.height-n.depth),i=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},e),a=Z.makeSpan(["root"],[i]),Z.makeSpan(["mord","sqrt"],[a,n],e)):Z.makeSpan(["mord","sqrt"],[n],e)},mathmlBuilder(t,e){var{body:t,index:r}=t;return r?new E.MathNode("mroot",[Zs(t,e),Zs(r,e)]):new E.MathNode("msqrt",[Zs(t,e)])}}),ml={display:ra.DISPLAY,text:ra.TEXT,script:ra.SCRIPT,scriptscript:ra.SCRIPTSCRIPT},o({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:t,funcName:r,parser:n}=t,t=n.parseExpression(!0,t),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:t}},htmlBuilder(t,e){var r=ml[t.style],r=e.havingStyle(r).withFont("");return $i(t.body,r,e)},mathmlBuilder(t,e){var r=ml[t.style],e=e.havingStyle(r),r=Xs(t.body,e),e=new E.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return e.setAttribute("scriptlevel",r[0]),e.setAttribute("displaystyle",r[1]),e}}),yl=me(function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===ra.DISPLAY.size||r.alwaysHandleSupSub)?ll:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===ra.DISPLAY.size||r.limits)?dl:null:"accent"===r.type?Yi.isCharacterBox(r.base)?so:null:"horizBrace"===r.type&&!t.sub===r.isOver?nl:null:null},"htmlBuilderDelegate"),vi({type:"supsub",htmlBuilder(t,e){if(a=yl(t,e))return a(t,e);var r,n,i,{base:a,sup:s,sub:o}=t,l=qs(a,e),c=e.fontMetrics(),h=0,u=0,a=a&&Yi.isCharacterBox(a),o=(s&&(i=e.havingStyle(e.style.sup()),r=qs(s,i,e),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/e.sizeMultiplier)),o&&(s=e.havingStyle(e.style.sub()),n=qs(o,s,e),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/e.sizeMultiplier)),i=e.style===ra.DISPLAY?c.sup1:e.style.cramped?c.sup3:c.sup2,e.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(n&&(o=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name),l instanceof $a||o)&&(s=K(-l.italic)),r&&n){h=Math.max(h,i,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),t=4*c.defaultRuleThickness,h-r.depth-(n.height-u)<t&&(u=t-(h-r.depth)+n.height,0<(o=.8*c.xHeight-(h-r.depth)))&&(h+=o,u-=o);var d=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u,marginRight:a,marginLeft:s},{type:"elem",elem:r,shift:-h,marginRight:a}]},e)}else if(n)u=Math.max(u,c.sub1,n.height-.8*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:u,children:[{type:"elem",elem:n,marginLeft:s,marginRight:a}]},e);else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,i,r.depth+.25*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:a}]},e)}return t=Gs(l,"right")||"mord",Z.makeSpan([t],[l,Z.makeSpan(["msupsub"],[d])],e)},mathmlBuilder(t,e){var r,n=!1,i=(t.base&&"horizBrace"===t.base.type&&!!t.sup===t.base.isOver&&(n=!0,r=t.base.isOver),!t.base||"op"!==t.base.type&&"operatorname"!==t.base.type||(t.base.parentIsSupSub=!0),[Zs(t.base,e)]);return t.sub&&i.push(Zs(t.sub,e)),t.sup&&i.push(Zs(t.sup,e)),r=n?r?"mover":"munder":t.sub?t.sup?(n=t.base)&&"op"===n.type&&n.limits&&e.style===ra.DISPLAY||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(e.style===ra.DISPLAY||n.limits)?"munderover":"msubsup":(r=t.base)&&"op"===r.type&&r.limits&&(e.style===ra.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||e.style===ra.DISPLAY)?"munder":"msub":(n=t.base)&&"op"===n.type&&n.limits&&(e.style===ra.DISPLAY||n.alwaysHandleSupSub)||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(n.limits||e.style===ra.DISPLAY)?"mover":"msup",new E.MathNode(r,i)}}),vi({type:"atom",htmlBuilder(t,e){return Z.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new E.MathNode("mo",[Ys(t.text,t.mode)]);return"bin"===t.family?"bold-italic"===(e=Vs(t,e))&&r.setAttribute("mathvariant",e):"punct"===t.family?r.setAttribute("separator","true"):"open"!==t.family&&"close"!==t.family||r.setAttribute("stretchy","false"),r}}),vl={mi:"italic",mn:"normal",mtext:"normal"},vi({type:"mathord",htmlBuilder(t,e){return Z.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new E.MathNode("mi",[Ys(t.text,t.mode,e)]);return(t=Vs(t,e)||"italic")!==vl[r.type]&&r.setAttribute("mathvariant",t),r}}),vi({type:"textord",htmlBuilder(t,e){return Z.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=Ys(t.text,t.mode,e),e=Vs(t,e)||"normal",t="text"===t.mode?new E.MathNode("mtext",[r]):/[0-9]/.test(t.text)?new E.MathNode("mn",[r]):"\\prime"===t.text?new E.MathNode("mo",[r]):new E.MathNode("mi",[r]);return e!==vl[t.type]&&t.setAttribute("mathvariant",e),t}}),xl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},bl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},vi({type:"spacing",htmlBuilder(t,e){var r,n;if(bl.hasOwnProperty(t.text))return r=bl[t.text].className||"","text"===t.mode?((n=Z.makeOrd(t,e,"textord")).classes.push(r),n):Z.makeSpan(["mspace",r],[Z.mathsym(t.text,t.mode,e)],e);if(xl.hasOwnProperty(t.text))return Z.makeSpan(["mspace",xl[t.text]],[],e);throw new X('Unknown type of space "'+t.text+'"')},mathmlBuilder(t,e){if(bl.hasOwnProperty(t.text))return new E.MathNode("mtext",[new E.TextNode(" ")]);if(xl.hasOwnProperty(t.text))return new E.MathNode("mspace");throw new X('Unknown type of space "'+t.text+'"')}}),wl=me(()=>{var t=new E.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad"),vi({type:"tag",mathmlBuilder(t,e){return(t=new E.MathNode("mtable",[new E.MathNode("mtr",[wl(),new E.MathNode("mtd",[Ks(t.body,e)]),wl(),new E.MathNode("mtd",[Ks(t.tag,e)])])])).setAttribute("width","100%"),t}}),kl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tl={"\\textbf":"textbf","\\textmd":"textmd"},El={"\\textit":"textit","\\textup":"textup"},Cl=me((t,e)=>(t=t.font)?kl[t]?e.withTextFontFamily(kl[t]):Tl[t]?e.withTextFontWeight(Tl[t]):"\\emph"===t?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(El[t]):e,"optionsWithFont"),o({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"text",mode:t.mode,body:Is(e),font:r}},htmlBuilder(t,e){return e=Cl(t,e),t=Bs(t.body,e,!0),Z.makeSpan(["mord","text"],t,e)},mathmlBuilder(t,e){return e=Cl(t,e),Ks(t.body,e)}}),o({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"underline",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=qs(t.body,e),r=Z.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return Z.makeSpan(["mord","underline"],[r],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("munder",[Zs(t.body,e),r])).setAttribute("accentunder","true"),t}}),o({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){return{type:"vcenter",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=qs(t.body,e),r=e.fontMetrics().axisHeight,r=.5*(t.height-r-(t.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(t,e){return new E.MathNode("mpadded",[Zs(t.body,e)],["vcenter"])}}),o({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Sl(t),n=[],i=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var s=r[a];"~"===s&&(s="\\textasciitilde"),n.push(Z.makeSymbol(s,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return Z.makeSpan(["mord","text"].concat(i.sizingClasses(e)),Z.tryCombineChars(n),i)},mathmlBuilder(t,e){return t=new E.TextNode(Sl(t)),(t=new E.MathNode("mtext",[t])).setAttribute("mathvariant","monospace"),t}}),Sl=me(t=>t.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),_l=_s,Al=new RegExp("[̀-ͯ]+$"),Ll=class{static{me(this,"Lexer")}constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new zi("EOF",new Fi(this,e,e));if(null===(n=this.tokenRegex.exec(t))||n.index!==e)throw new X("Unexpected character: '"+t[e]+"'",new zi(t[e],new Fi(this,e,e+1)));var r,n=n[6]||n[3]||(n[2]?"\\ ":" ");return 14===this.catcodes[n]?(-1===(r=t.indexOf(` +`,this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=r+1,this.lex()):new zi(n,new Fi(this,e,this.tokenRegex.lastIndex))}},Nl=class{static{me(this,"Namespace")}constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new X("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t,e=this.undefStack.pop();for(t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return(this.current.hasOwnProperty(t)?this.current:this.builtins)[t]}set(t,e,r){if(r=void 0!==r&&r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][t];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][t]=e)}else(r=this.undefStack[this.undefStack.length-1])&&!r.hasOwnProperty(t)&&(r[t]=this.current[t]);null==e?delete this.current[t]:this.current[t]=e}},Il=Ho,l("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}}),l("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}}),l("\\@firstoftwo",function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}}),l("\\@secondoftwo",function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}}),l("\\@ifnextchar",function(t){var e=t.consumeArgs(3),t=(t.consumeSpaces(),t.future());return 1===e[0].length&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}}),l("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),l("\\TextOrMath",function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}}),Rl={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},l("\\char",function(t){var e,r,n=t.popToken(),i="";if("'"===n.text)e=8,n=t.popToken();else if('"'===n.text)e=16,n=t.popToken();else if("`"===n.text)if("\\"===(n=t.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new X("\\char` missing argument");i=n.text.charCodeAt(0)}else e=10;if(e){if(null==(i=Rl[n.text])||e<=i)throw new X("Invalid base-"+e+" digit "+n.text);for(;null!=(r=Rl[t.future().text])&&r<e;)i=i*e+r,t.popToken()}return"\\@char{"+i+"}"}),Ml=me((t,e,r,n)=>{var i=t.consumeArg().tokens;if(1!==i.length)throw new X("\\newcommand's first argument must be a macro name");var a=i[0].text,s=t.isDefined(a);if(s&&!e)throw new X("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!s&&!r)throw new X("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");if(e=0,1===(i=t.consumeArg().tokens).length&&"["===i[0].text){for(var o="",l=t.expandNextToken();"]"!==l.text&&"EOF"!==l.text;)o+=l.text,l=t.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+o);e=parseInt(o),i=t.consumeArg().tokens}return s&&n||t.macros.set(a,{tokens:i,numArgs:e}),""},"newcommand"),l("\\newcommand",t=>Ml(t,!1,!0,!1)),l("\\renewcommand",t=>Ml(t,!0,!1,!1)),l("\\providecommand",t=>Ml(t,!0,!0,!0)),l("\\message",t=>(t=t.consumeArgs(1)[0],console.log(t.reverse().map(t=>t.text).join("")),"")),l("\\errmessage",t=>(t=t.consumeArgs(1)[0],console.error(t.reverse().map(t=>t.text).join("")),"")),l("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),_l[r],ja.math[r],ja.text[r]),""}),l("\\bgroup","{"),l("\\egroup","}"),l("~","\\nobreakspace"),l("\\lq","`"),l("\\rq","'"),l("\\aa","\\r a"),l("\\AA","\\r A"),l("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),l("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),l("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),l("ℬ","\\mathscr{B}"),l("ℰ","\\mathscr{E}"),l("ℱ","\\mathscr{F}"),l("ℋ","\\mathscr{H}"),l("ℐ","\\mathscr{I}"),l("ℒ","\\mathscr{L}"),l("ℳ","\\mathscr{M}"),l("ℛ","\\mathscr{R}"),l("ℭ","\\mathfrak{C}"),l("ℌ","\\mathfrak{H}"),l("ℨ","\\mathfrak{Z}"),l("\\Bbbk","\\Bbb{k}"),l("·","\\cdotp"),l("\\llap","\\mathllap{\\textrm{#1}}"),l("\\rlap","\\mathrlap{\\textrm{#1}}"),l("\\clap","\\mathclap{\\textrm{#1}}"),l("\\mathstrut","\\vphantom{(}"),l("\\underbar","\\underline{\\text{#1}}"),l("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),l("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),l("\\ne","\\neq"),l("≠","\\neq"),l("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),l("∉","\\notin"),l("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),l("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),l("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),l("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),l("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),l("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),l("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),l("⟂","\\perp"),l("‼","\\mathclose{!\\mkern-0.8mu!}"),l("∌","\\notni"),l("⌜","\\ulcorner"),l("⌝","\\urcorner"),l("⌞","\\llcorner"),l("⌟","\\lrcorner"),l("©","\\copyright"),l("®","\\textregistered"),l("️","\\textregistered"),l("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),l("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),l("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),l("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),l("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),l("⋮","\\vdots"),l("\\varGamma","\\mathit{\\Gamma}"),l("\\varDelta","\\mathit{\\Delta}"),l("\\varTheta","\\mathit{\\Theta}"),l("\\varLambda","\\mathit{\\Lambda}"),l("\\varXi","\\mathit{\\Xi}"),l("\\varPi","\\mathit{\\Pi}"),l("\\varSigma","\\mathit{\\Sigma}"),l("\\varUpsilon","\\mathit{\\Upsilon}"),l("\\varPhi","\\mathit{\\Phi}"),l("\\varPsi","\\mathit{\\Psi}"),l("\\varOmega","\\mathit{\\Omega}"),l("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),l("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),l("\\boxed","\\fbox{$\\displaystyle{#1}$}"),l("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),l("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),l("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),l("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),l("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}"),Dl={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},l("\\dots",function(t){var e="\\dotso";return(t=t.expandAfterFuture().text)in Dl?e=Dl[t]:("\\not"===t.slice(0,4)||t in ja.math&&Yi.contains(["bin","rel"],ja.math[t].group))&&(e="\\dotsb"),e}),Ol={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0},l("\\dotso",function(t){return t.future().text in Ol?"\\ldots\\,":"\\ldots"}),l("\\dotsc",function(t){return(t=t.future().text)in Ol&&","!==t?"\\ldots\\,":"\\ldots"}),l("\\cdots",function(t){return t.future().text in Ol?"\\@cdots\\,":"\\@cdots"}),l("\\dotsb","\\cdots"),l("\\dotsm","\\cdots"),l("\\dotsi","\\!\\cdots"),l("\\dotsx","\\ldots\\,"),l("\\DOTSI","\\relax"),l("\\DOTSB","\\relax"),l("\\DOTSX","\\relax"),l("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),l("\\,","\\tmspace+{3mu}{.1667em}"),l("\\thinspace","\\,"),l("\\>","\\mskip{4mu}"),l("\\:","\\tmspace+{4mu}{.2222em}"),l("\\medspace","\\:"),l("\\;","\\tmspace+{5mu}{.2777em}"),l("\\thickspace","\\;"),l("\\!","\\tmspace-{3mu}{.1667em}"),l("\\negthinspace","\\!"),l("\\negmedspace","\\tmspace-{4mu}{.2222em}"),l("\\negthickspace","\\tmspace-{5mu}{.277em}"),l("\\enspace","\\kern.5em "),l("\\enskip","\\hskip.5em\\relax"),l("\\quad","\\hskip1em\\relax"),l("\\qquad","\\hskip2em\\relax"),l("\\tag","\\@ifstar\\tag@literal\\tag@paren"),l("\\tag@paren","\\tag@literal{({#1})}"),l("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),l("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),l("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),l("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),l("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),l("\\newline","\\\\\\relax"),l("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),l("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(Pl=K(ya["Main-Regular"][84][1]-.7*ya["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),l("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Pl+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),l("\\hspace","\\@ifstar\\@hspacer\\@hspace"),l("\\@hspace","\\hskip #1\\relax"),l("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),l("\\ordinarycolon",":"),l("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),l("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),l("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),l("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),l("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),l("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),l("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),l("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),l("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),l("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),l("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),l("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),l("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),l("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),l("∷","\\dblcolon"),l("∹","\\eqcolon"),l("≔","\\coloneqq"),l("≕","\\eqqcolon"),l("⩴","\\Coloneqq"),l("\\ratio","\\vcentcolon"),l("\\coloncolon","\\dblcolon"),l("\\colonequals","\\coloneqq"),l("\\coloncolonequals","\\Coloneqq"),l("\\equalscolon","\\eqqcolon"),l("\\equalscoloncolon","\\Eqqcolon"),l("\\colonminus","\\coloneq"),l("\\coloncolonminus","\\Coloneq"),l("\\minuscolon","\\eqcolon"),l("\\minuscoloncolon","\\Eqcolon"),l("\\coloncolonapprox","\\Colonapprox"),l("\\coloncolonsim","\\Colonsim"),l("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),l("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),l("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),l("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),l("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),l("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),l("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),l("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),l("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),l("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),l("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),l("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),l("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),l("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),l("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),l("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),l("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),l("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),l("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),l("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),l("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),l("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),l("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),l("\\imath","\\html@mathml{\\@imath}{ı}"),l("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),l("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),l("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),l("⟦","\\llbracket"),l("⟧","\\rrbracket"),l("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),l("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),l("⦃","\\lBrace"),l("⦄","\\rBrace"),l("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),l("⦵","\\minuso"),l("\\darr","\\downarrow"),l("\\dArr","\\Downarrow"),l("\\Darr","\\Downarrow"),l("\\lang","\\langle"),l("\\rang","\\rangle"),l("\\uarr","\\uparrow"),l("\\uArr","\\Uparrow"),l("\\Uarr","\\Uparrow"),l("\\N","\\mathbb{N}"),l("\\R","\\mathbb{R}"),l("\\Z","\\mathbb{Z}"),l("\\alef","\\aleph"),l("\\alefsym","\\aleph"),l("\\Alpha","\\mathrm{A}"),l("\\Beta","\\mathrm{B}"),l("\\bull","\\bullet"),l("\\Chi","\\mathrm{X}"),l("\\clubs","\\clubsuit"),l("\\cnums","\\mathbb{C}"),l("\\Complex","\\mathbb{C}"),l("\\Dagger","\\ddagger"),l("\\diamonds","\\diamondsuit"),l("\\empty","\\emptyset"),l("\\Epsilon","\\mathrm{E}"),l("\\Eta","\\mathrm{H}"),l("\\exist","\\exists"),l("\\harr","\\leftrightarrow"),l("\\hArr","\\Leftrightarrow"),l("\\Harr","\\Leftrightarrow"),l("\\hearts","\\heartsuit"),l("\\image","\\Im"),l("\\infin","\\infty"),l("\\Iota","\\mathrm{I}"),l("\\isin","\\in"),l("\\Kappa","\\mathrm{K}"),l("\\larr","\\leftarrow"),l("\\lArr","\\Leftarrow"),l("\\Larr","\\Leftarrow"),l("\\lrarr","\\leftrightarrow"),l("\\lrArr","\\Leftrightarrow"),l("\\Lrarr","\\Leftrightarrow"),l("\\Mu","\\mathrm{M}"),l("\\natnums","\\mathbb{N}"),l("\\Nu","\\mathrm{N}"),l("\\Omicron","\\mathrm{O}"),l("\\plusmn","\\pm"),l("\\rarr","\\rightarrow"),l("\\rArr","\\Rightarrow"),l("\\Rarr","\\Rightarrow"),l("\\real","\\Re"),l("\\reals","\\mathbb{R}"),l("\\Reals","\\mathbb{R}"),l("\\Rho","\\mathrm{P}"),l("\\sdot","\\cdot"),l("\\sect","\\S"),l("\\spades","\\spadesuit"),l("\\sub","\\subset"),l("\\sube","\\subseteq"),l("\\supe","\\supseteq"),l("\\Tau","\\mathrm{T}"),l("\\thetasym","\\vartheta"),l("\\weierp","\\wp"),l("\\Zeta","\\mathrm{Z}"),l("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),l("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),l("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),l("\\bra","\\mathinner{\\langle{#1}|}"),l("\\ket","\\mathinner{|{#1}\\rangle}"),l("\\braket","\\mathinner{\\langle{#1}\\rangle}"),l("\\Bra","\\left\\langle#1\\right|"),l("\\Ket","\\left|#1\\right\\rangle"),l("\\bra@ket",(Bl=me(l=>t=>{var e=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|"),o=(t.macros.beginGroup(),me(r=>t=>{l&&(t.macros.set("|",a),i.length)&&t.macros.set("\\|",s);var e=r;return!r&&i.length&&"|"===t.future().text&&(t.popToken(),e=!0),{tokens:e?i:n,numArgs:0}},"midMacro")),o=(t.macros.set("|",o(!1)),i.length&&t.macros.set("\\|",o(!0)),t.consumeArg().tokens),r=t.expandTokens([...r,...o,...e]);return t.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),l("\\bra@set",Bl(!0)),l("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),l("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),l("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),l("\\angln","{\\angl n}"),l("\\blue","\\textcolor{##6495ed}{#1}"),l("\\orange","\\textcolor{##ffa500}{#1}"),l("\\pink","\\textcolor{##ff00af}{#1}"),l("\\red","\\textcolor{##df0030}{#1}"),l("\\green","\\textcolor{##28ae7b}{#1}"),l("\\gray","\\textcolor{gray}{#1}"),l("\\purple","\\textcolor{##9d38bd}{#1}"),l("\\blueA","\\textcolor{##ccfaff}{#1}"),l("\\blueB","\\textcolor{##80f6ff}{#1}"),l("\\blueC","\\textcolor{##63d9ea}{#1}"),l("\\blueD","\\textcolor{##11accd}{#1}"),l("\\blueE","\\textcolor{##0c7f99}{#1}"),l("\\tealA","\\textcolor{##94fff5}{#1}"),l("\\tealB","\\textcolor{##26edd5}{#1}"),l("\\tealC","\\textcolor{##01d1c1}{#1}"),l("\\tealD","\\textcolor{##01a995}{#1}"),l("\\tealE","\\textcolor{##208170}{#1}"),l("\\greenA","\\textcolor{##b6ffb0}{#1}"),l("\\greenB","\\textcolor{##8af281}{#1}"),l("\\greenC","\\textcolor{##74cf70}{#1}"),l("\\greenD","\\textcolor{##1fab54}{#1}"),l("\\greenE","\\textcolor{##0d923f}{#1}"),l("\\goldA","\\textcolor{##ffd0a9}{#1}"),l("\\goldB","\\textcolor{##ffbb71}{#1}"),l("\\goldC","\\textcolor{##ff9c39}{#1}"),l("\\goldD","\\textcolor{##e07d10}{#1}"),l("\\goldE","\\textcolor{##a75a05}{#1}"),l("\\redA","\\textcolor{##fca9a9}{#1}"),l("\\redB","\\textcolor{##ff8482}{#1}"),l("\\redC","\\textcolor{##f9685d}{#1}"),l("\\redD","\\textcolor{##e84d39}{#1}"),l("\\redE","\\textcolor{##bc2612}{#1}"),l("\\maroonA","\\textcolor{##ffbde0}{#1}"),l("\\maroonB","\\textcolor{##ff92c6}{#1}"),l("\\maroonC","\\textcolor{##ed5fa6}{#1}"),l("\\maroonD","\\textcolor{##ca337c}{#1}"),l("\\maroonE","\\textcolor{##9e034e}{#1}"),l("\\purpleA","\\textcolor{##ddd7ff}{#1}"),l("\\purpleB","\\textcolor{##c6b9fc}{#1}"),l("\\purpleC","\\textcolor{##aa87ff}{#1}"),l("\\purpleD","\\textcolor{##7854ab}{#1}"),l("\\purpleE","\\textcolor{##543b78}{#1}"),l("\\mintA","\\textcolor{##f5f9e8}{#1}"),l("\\mintB","\\textcolor{##edf2df}{#1}"),l("\\mintC","\\textcolor{##e0e5cc}{#1}"),l("\\grayA","\\textcolor{##f6f7f7}{#1}"),l("\\grayB","\\textcolor{##f0f1f2}{#1}"),l("\\grayC","\\textcolor{##e3e5e6}{#1}"),l("\\grayD","\\textcolor{##d6d8da}{#1}"),l("\\grayE","\\textcolor{##babec2}{#1}"),l("\\grayF","\\textcolor{##888d93}{#1}"),l("\\grayG","\\textcolor{##626569}{#1}"),l("\\grayH","\\textcolor{##3b3e40}{#1}"),l("\\grayI","\\textcolor{##21242c}{#1}"),l("\\kaBlue","\\textcolor{##314453}{#1}"),l("\\kaGreen","\\textcolor{##71B307}{#1}"),$l={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Fl=class{static{me(this,"MacroExpander")}constructor(t,e,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=e,this.expansionCount=0,this.feed(t),this.macros=new Nl(Il,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Ll(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,r,n;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:e,end:r}=this.consumeArg());return this.pushToken(new zi("EOF",r.loc)),this.pushTokens(n),e.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(t){var e,r=[],n=t&&0<t.length,i=(n||this.consumeSpaces(),this.future()),a=0,s=0;do{if(e=this.popToken(),r.push(e),"{"===e.text)++a;else if("}"===e.text){if(-1==--a)throw new X("Extra }",e)}else if("EOF"===e.text)throw new X("Unexpected end of input in a macro argument, expected '"+(t&&n?t[s]:"}")+"'",e);if(t&&n)if((0===a||1===a&&"{"===t[s])&&e.text===t[s]){if(++s===t.length){r.splice(-s,s);break}}else s=0}while(0!==a||n);return"{"===i.text&&"}"===r[r.length-1].text&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:e}}consumeArgs(t,e){if(e){if(e.length!==t+1)throw new X("The length of delimiters doesn't match the number of args!");for(var r=e[0],n=0;n<r.length;n++){var i=this.popToken();if(r[n]!==i.text)throw new X("Use of the macro doesn't match its definition",i)}}for(var a=[],s=0;s<t;s++)a.push(this.consumeArg(e&&e[s+1]).tokens);return a}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new X("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),r=e.text,n=e.noexpand?null:this._getExpansion(r);if(null==n||t&&n.unexpandable){if(t&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(e),!1}this.countExpansion(1);var i=n.tokens,a=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;0<=s;--s){var o=i[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);i.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var t;if(!1===this.expandOnce())return(t=this.stack.pop()).treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new zi(t)]):void 0}expandTokens(t){var e,r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)!1===this.expandOnce(!0)&&((e=this.stack.pop()).treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),r.push(e));return this.countExpansion(r.length),r}expandMacroAsText(t){return(t=this.expandMacro(t))&&t.map(t=>t.text).join("")}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1!==t.length||null==(t=this.lexer.catcodes[t])||13===t){if("string"!=typeof(t="function"==typeof e?e(this):e))return t;var r=0;if(-1!==t.indexOf("#"))for(var n=t.replace(/##/g,"");-1!==n.indexOf("#"+(r+1));)++r;for(var i=new Ll(t,this.settings),a=[],s=i.lex();"EOF"!==s.text;)a.push(s),s=i.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(t){return this.macros.has(t)||_l.hasOwnProperty(t)||ja.math.hasOwnProperty(t)||ja.text.hasOwnProperty(t)||$l.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:_l.hasOwnProperty(t)&&!_l[t].primitive}},zl=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Gl=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Ul={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},ql={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(jl=class a{static{me(this,"Parser")}constructor(t,e){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Fl(t,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new X("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken,t=(this.consume(),this.gullet.pushToken(new zi("}")),this.gullet.pushTokens(t),this.parseExpression(!1));return this.expect("}"),this.nextToken=e,t}parseExpression(t,e){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==a.endOfExpression.indexOf(n.text)||e&&n.text===e||t&&_l[n.text]&&_l[n.text].infix)break;if(!(n=this.parseAtom(e)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r,n,i=-1,a=0;a<t.length;a++)if("infix"===t[a].type){if(-1!==i)throw new X("only one infix operator per group",t[a].token);e=t[i=a].replaceWith}return-1!==i&&e?(r=t.slice(0,i),n=t.slice(i+1),r=1===r.length&&"ordgroup"===r[0].type?r[0]:{type:"ordgroup",mode:this.mode,body:r},n=1===n.length&&"ordgroup"===n[0].type?n[0]:{type:"ordgroup",mode:this.mode,body:n},["\\\\abovefrac"===e?this.callFunction(e,[r,t[i],n],[]):this.callFunction(e,[r,n],[])]):t}handleSupSubscript(t){var e=this.fetch(),r=e.text;this.consume(),this.consumeSpaces();do{var n=this.parseGroup(t)}while("internal"===(null==n?void 0:n.type));if(n)return n;throw new X("Expected group after '"+r+"'",e)}formatUnsupportedCmd(t){for(var e=[],r=0;r<t.length;r++)e.push({type:"textord",mode:"text",text:t[r]});var n={type:"text",mode:this.mode,body:e};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(t){var e,r,n=this.parseGroup("atom",t);if("internal"===n?.type||"text"===this.mode)return n;for(;;){this.consumeSpaces();var i=this.fetch();if("\\limits"===i.text||"\\nolimits"===i.text){if(n&&"op"===n.type){var a="\\limits"===i.text;n.limits=a,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new X("Limit controls must follow a math operator",i);n.alwaysHandleSupSub&&(n.limits="\\limits"===i.text)}this.consume()}else if("^"===i.text){if(e)throw new X("Double superscript",i);e=this.handleSupSubscript("superscript")}else if("_"===i.text){if(r)throw new X("Double subscript",i);r=this.handleSupSubscript("subscript")}else if("'"===i.text){if(e)throw new X("Double superscript",i);var s={type:"textord",mode:this.mode,text:"\\prime"},o=[s];for(this.consume();"'"===this.fetch().text;)o.push(s),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),e={type:"ordgroup",mode:this.mode,body:o}}else{if(!Gl[i.text])break;var l=zl.test(i.text),c=[];for(c.push(new zi(Gl[i.text])),this.consume();;){var h=this.fetch().text;if(!Gl[h]||zl.test(h)!==l)break;c.unshift(new zi(Gl[h])),this.consume()}a=this.subparse(c),l?r={type:"ordgroup",mode:"math",body:a}:e={type:"ordgroup",mode:"math",body:a}}}return e||r?{type:"supsub",mode:this.mode,base:n,sup:e,sub:r}:n}parseFunction(t,e){var r=this.fetch(),n=r.text;if(!(i=_l[n]))return null;if(this.consume(),e&&"atom"!==e&&!i.allowedInArgument)throw new X("Got function '"+n+"' with no arguments"+(e?" as "+e:""),r);if("text"===this.mode&&!i.allowedInText)throw new X("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new X("Can't use function '"+n+"' in math mode",r);var{args:e,optArgs:i}=this.parseArguments(n,i);return this.callFunction(n,e,i,r,t)}callFunction(t,e,r,n,i){var a=_l[t];if(a&&a.handler)return a.handler({funcName:t,parser:this,token:n,breakOnTokenText:i},e,r);throw new X("No function handler for "+t)}parseArguments(t,e){var r=e.numArgs+e.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var n=[],i=[],a=0;a<r;a++){var s=e.argTypes&&e.argTypes[a],o=a<e.numOptionalArgs,s=((e.primitive&&null==s||"sqrt"===e.type&&1===a&&null==i[0])&&(s="primitive"),this.parseGroupOfType("argument to '"+t+"'",s,o));if(o)i.push(s);else{if(null==s)throw new X("Null argument, please report this as a bug");n.push(s)}}return{args:n,optArgs:i}}parseGroupOfType(t,e,r){switch(e){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,e);case"hbox":var n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":return null!=(n=this.parseStringGroup("raw",r))?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new X("A primitive argument cannot be optional");if(null==(n=this.parseGroup(t)))throw new X("Expected group as "+t,this.fetch());return n;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new X("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(t,e){if(null==(e=this.gullet.scanArgument(e)))return null;for(var r,n="";"EOF"!==(r=this.fetch()).text;)n+=r.text,this.consume();return this.consume(),e.text=n,e}parseRegexGroup(t,e){for(var r,n=this.fetch(),i=n,a="";"EOF"!==(r=this.fetch()).text&&t.test(a+r.text);)a+=(i=r).text,this.consume();if(""===a)throw new X("Invalid "+e+": '"+n.text+"'",n);return n.range(i,a)}parseColorGroup(t){if(null==(t=this.parseStringGroup("color",t)))return null;var e=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(e)return e=e[0],/^[0-9a-f]{6}$/i.test(e)&&(e="#"+e),{type:"color-token",mode:this.mode,color:e};throw new X("Invalid color: '"+t.text+"'",t)}parseSizeGroup(t){var e,r=!1;if(this.gullet.consumeSpaces(),!(e=t||"{"===this.gullet.future().text?this.parseStringGroup("size",t):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;if(t||0!==e.text.length||(e.text="0pt",r=!0),!(t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e.text)))throw new X("Invalid size: '"+e.text+"'",e);if(t={number:+(t[1]+t[2]),unit:t[3]},_a(t))return{type:"size",mode:this.mode,value:t,isBlank:r};throw new X("Invalid unit: '"+t.unit+"'",e)}parseUrlGroup(t){return this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12),t=this.parseStringGroup("url",t),this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t?null:(t=t.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:t})}parseArgumentGroup(t,e){var r,n;return null==(t=this.gullet.scanArgument(t))?null:(r=this.mode,e&&this.switchMode(e),this.gullet.beginGroup(),n=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),t={type:"ordgroup",mode:this.mode,loc:t.loc,body:n},e&&this.switchMode(r),t)}parseGroup(t,e){var r=this.fetch(),n=r.text;if("{"===n||"\\begingroup"===n){this.consume();var i="{"===n?"}":"\\endgroup",a=(this.gullet.beginGroup(),this.parseExpression(!1,i)),s=this.fetch();this.expect(i),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:Fi.range(r,s),body:a,semisimple:"\\begingroup"===n||void 0}}else if(null==(i=this.parseFunction(e,t)||this.parseSymbol())&&"\\"===n[0]&&!$l.hasOwnProperty(n)){if(this.settings.throwOnError)throw new X("Undefined control sequence: "+n,r);i=this.formatUnsupportedCmd(n),this.consume()}return i}formLigatures(t){for(var e=t.length-1,r=0;r<e;++r){var n=t[r],i=n.text;"-"===i&&"-"===t[r+1].text&&(r+1<e&&"-"===t[r+2].text?(t.splice(r,3,{type:"textord",mode:"text",loc:Fi.range(n,t[r+2]),text:"---"}),e-=2):(t.splice(r,2,{type:"textord",mode:"text",loc:Fi.range(n,t[r+1]),text:"--"}),--e)),"'"!==i&&"`"!==i||t[r+1].text!==i||(t.splice(r,2,{type:"textord",mode:"text",loc:Fi.range(n,t[r+1]),text:i+i}),--e)}}parseSymbol(){var t=this.fetch(),e=t.text;if(/^\\verb[^a-zA-Z]/.test(e)){if(this.consume(),(n=(i="*"===(n=e.slice(5)).charAt(0))?n.slice(1):n).length<2||n.charAt(0)!==n.slice(-1))throw new X(`\\verb assertion failed -- + please report what input caused this bug`);return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:i}}ql.hasOwnProperty(e[0])&&!ja[this.mode][e[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+e[0]+'" used in math mode',t),e=ql[e[0]]+e.slice(1));var r=Al.exec(e);if(r&&("i"===(e=e.substring(0,r.index))?e="ı":"j"===e&&(e="ȷ")),ja[this.mode][e]){this.settings.strict&&"math"===this.mode&&0<=os.indexOf(e)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var n=ja[this.mode][e].group,i=Fi.range(t),a=Ua.hasOwnProperty(n)?{type:"atom",mode:this.mode,family:n,loc:i,text:e}:{type:n,mode:this.mode,loc:i,text:e}}else{if(!(128<=e.charCodeAt(0)))return null;this.settings.strict&&(di(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),a={type:"textord",mode:"text",loc:Fi.range(t),text:e}}if(this.consume(),r)for(var s=0;s<r[0].length;s++){var o=r[0][s];if(!Ul[o])throw new X("Unknown accent ' "+o+"'",t);var l=Ul[o][this.mode]||Ul[o].text;if(!l)throw new X("Accent "+o+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:Fi.range(t),label:l,isStretchy:!1,isShifty:!0,base:a}}return a}}).endOfExpression=["}","\\endgroup","\\end","\\right","&"],Wl=me(function(t,e){if(!("string"==typeof t||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(t=new jl(t,e)).gullet.macros.current["\\df@tag"];var r=t.parse();if(delete t.gullet.macros.current["\\current@color"],delete t.gullet.macros.current["\\color"],t.gullet.macros.get("\\df@tag")){if(!e.displayMode)throw new X("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:t.subparse([new zi("\\df@tag")])}]}return r},"parseTree"),Yl=me(function(t,e,r){e.textContent="",t=Kl(t,r).toNode(),e.appendChild(t)},"render"),typeof document<"u"&&"CSS1Compat"!==document.compatMode&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Yl=me(function(){throw new X("KaTeX doesn't work in quirks mode.")},"render")),Hl=me(function(t,e){return Kl(t,e).toMarkup()},"renderToString"),Vl=me(function(t,e){return e=new Vi(e),Wl(t,e)},"generateParseTree"),Xl=me(function(t,e,r){if(!r.throwOnError&&t instanceof X)return(e=Z.makeSpan(["katex-error"],[new $a(e)])).setAttribute("title",t.toString()),e.setAttribute("style","color:"+r.errorColor),e;throw t},"renderError"),Kl=me(function(t,e){e=new Vi(e);try{var r=Wl(t,e);return to(r,t,e)}catch(r){return Xl(r,t,e)}},"renderToDomTree"),Zl=me(function(t,e){e=new Vi(e);try{var r=Wl(t,e);return eo(r,t,e)}catch(r){return Xl(r,t,e)}},"renderToHTMLTree"),tc={version:Ql="0.16.22",render:Yl,renderToString:Hl,ParseError:X,SETTINGS_SCHEMA:Hi,__parse:Vl,__renderToDomTree:Kl,__renderToHTMLTree:Zl,__setFontMetrics:pi,__defineSymbol:e,__defineFunction:o,__defineMacro:l,__domTree:Jl={Span:Da,Anchor:Oa,SymbolNode:$a,SvgNode:Fa,PathNode:za,LineNode:Ga}}});function rc(){let e="data-temp-href-target";si.addHook("beforeSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),si.addHook("afterSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target"))&&t.setAttribute("rel","noopener")})}var nc,ic,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,fc,mc,yc,vc,xc,bc,wc,kc,Tc,Ec,Cc,Sc,_c,L,Ac,Lc,Nc,Ic,Rc,Mc,Dc,Oc=b(()=>{oi(),nc=/<br\s*\/?>/gi,ic=me(t=>t?pc(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ac=(()=>{let t=!1;return()=>{t||(rc(),t=!0)}})(),me(rc,"setupDompurifyHooks"),sc=me(t=>(ac(),si.sanitize(t)),"removeScript"),oc=me((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(e=e.securityLevel)||"strict"===e?t=sc(t):"loose"!==e&&(t=(t=(t=pc(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=dc(t))),t),"sanitizeMore"),lc=me((t,e)=>t&&(e.dompurifyConfig?si.sanitize(oc(t,e),e.dompurifyConfig):si.sanitize(oc(t,e),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),cc=me((t,e)=>"string"==typeof t?lc(t,e):t.flat().map(t=>lc(t,e)),"sanitizeTextOrArray"),hc=me(t=>nc.test(t),"hasBreaks"),uc=me(t=>t.split(nc),"splitBreaks"),dc=me(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),pc=me(t=>t.replace(nc,"#br#"),"breakToPlaceholder"),gc=me(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),fc=me(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),mc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.max(...t)},"getMax"),yc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.min(...t)},"getMin"),vc=me(function(t){var r,n,i=t.split(/(,)/),a=[];for(let e=0;e<i.length;e++){let t=i[e];","===t&&0<e&&e+1<i.length&&(r=i[e-1],n=i[e+1],bc(r,n))&&(t=r+","+n,e++,a.pop()),a.push(wc(t))}return a.join("")},"parseGenericTypes"),xc=me((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),bc=me((t,e)=>(t=xc(t,"~"),e=xc(e,"~"),1===t&&1===e),"shouldCombineSets"),wc=me(t=>{let e=xc(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),kc=me(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Tc=/\$\$(.*)\$\$/g,Ec=me(t=>0<(t.match(Tc)?.length??0),"hasKatex"),Cc=me(async(t,e)=>{var r=document.createElement("div"),t=(r.innerHTML=await _c(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r),{width:r.clientWidth,height:r.clientHeight});return r.remove(),t},"calculateMathMLDimensions"),Sc=me(async(t,e)=>{if(!Ec(t))return t;if(!(kc()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Tc,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(ec(),li))).default,n=e.forceLegacyMathML||!kc()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(nc).map(t=>Ec(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Tc,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),_c=me(async(t,e)=>lc(await Sc(t,e),e),"renderKatexSanitized"),L={getRows:ic,sanitizeText:lc,sanitizeTextOrArray:cc,hasBreaks:hc,splitBreaks:uc,lineBreakRegex:nc,removeScript:sc,getUrl:gc,evaluate:fc,getMax:mc,getMin:yc}}),Pc=b(()=>{fr(),rn(),Oc(),t(),Ac={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Lc=new Map,Nc=new Map,Ic=me(t=>{for(var e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(D.debug("Registering icon pack:",e.name),"loader"in e)Nc.set(e.name,e.loader);else{if(!("icons"in e))throw D.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Lc.set(e.name,e.icons)}}},"registerIconPacks"),Rc=me(async(t,e)=>{var r=A(t,!0,void 0!==e);if(!r)throw new Error("Invalid icon name: "+t);if(!(e=r.prefix||e))throw new Error("Icon name must contain a prefix: "+t);let n=Lc.get(e);if(!n){var i=Nc.get(e);if(!i)throw new Error("Icon set not found: "+r.prefix);try{n={...await i(),prefix:e},Lc.set(e,n)}catch(t){throw D.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(i=lt(n,r.name))return i;throw new Error("Icon not found: "+t)},"getRegisteredIconData"),Mc=me(async t=>{try{return await Rc(t),!0}catch{return!1}},"isIconAvailable"),Dc=me(async(t,e,r)=>{let n;try{n=await Rc(t,e?.fallbackPrefix)}catch(t){D.error(t),n=Ac}return e=St(wt((t=vt(n,e)).body),{...t.attributes,...r}),lc(e,ar())},"getIconSVG")});function Bc(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n,i=Array.from("string"==typeof t?[t]:t),t=(i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,""),i.reduce(function(t,e){return(e=e.match(/\n([\t ]+|(?!\s).)/g))?t.concat(e.map(function(t){return null!=(t=null==(t=t.match(/[\t ]/g))?void 0:t.length)?t:0})):t},[])),a=(t.length&&(n=new RegExp(` +[ ]{`+Math.min.apply(Math,t)+"}","g"),i=i.map(function(t){return t.replace(n,` +`)})),i[0]=i[0].replace(/^\r?\n/,""),i[0]);return e.forEach(function(t,e){var r=(n=a.match(/(?:^|\n)( *)$/))?n[1]:"",n=t;"string"==typeof t&&t.includes(` +`)&&(n=String(t).split(` +`).map(function(t,e){return 0===e?t:""+r+t}).join(` +`)),a+=n+i[e+1]}),a}var $c,Fc,zc,Gc,Uc,qc,jc,Wc,Yc,Hc,Vc,Xc,Kc,Zc,Qc,Jc,th,eh,rh,nh=b(()=>{me(Bc,"dedent")}),ih=b(()=>{$c=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Fc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,zc=/\s*%%.*\n/gm}),ah=b(()=>{Gc=class extends Error{static{me(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),sh=b(()=>{t(),ih(),ah(),Uc={},qc=me(function(t,e){t=t.replace($c,"").replace(Fc,"").replace(zc,` +`);for(var[r,{detector:n}]of Object.entries(Uc))if(n(t,e))return r;throw new Gc("No diagram type detected matching given configuration for text: "+t)},"detectType"),jc=me((...t)=>{for(var{id:e,detector:r,loader:n}of t)Wc(e,r,n)},"registerLazyLoadedDiagrams"),Wc=me((t,e,r)=>{Uc[t]&&D.warn(`Detector with key ${t} already exists. Overwriting.`),Uc[t]={detector:e,loader:r},D.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),Yc=me(t=>Uc[t].loader,"getDiagramLoader")}),oh=b(()=>{function B(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,24],r=[1,25],$=[1,26],F=[1,27],z=[1,28],n=[1,63],i=[1,64],a=[1,65],s=[1,66],o=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],E=[1,42],C=[1,43],S=[1,44],_=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],G=[1,51],U=[1,52],q=[1,53],j=[1,54],W=[1,55],Y=[1,56],H=[1,57],V=[1,58],X=[1,59],K=[1,60],Z=[14,42],Q=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],J=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],R=[1,82],M=[1,83],D=[1,84],O=[1,85],P=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],e={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(a[o-3]);break;case 19:n.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:n.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:n.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:n.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:n.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:n.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:n.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:n.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:n.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:n.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:n.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:n.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:n.addContainer("container",...a[o]),this.$=a[o];break;case 48:n.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:n.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:n.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:n.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:n.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:n.addComponent("component",...a[o]),this.$=a[o];break;case 54:n.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:n.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:n.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:n.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:n.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:n.addRel("rel",...a[o]),this.$=a[o];break;case 61:n.addRel("birel",...a[o]),this.$=a[o];break;case 62:n.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:n.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:n.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:n.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:n.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),n.addRel("rel",...a[o]),this.$=a[o];break;case 68:n.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:n.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:n.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:var l={};l[a[o-1].trim()]=a[o].trim(),this.$=l;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:70,19:20,20:21,21:22,22:e,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:71,19:20,20:21,21:22,22:e,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:72,19:20,20:21,21:22,22:e,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:73,19:20,20:21,21:22,22:e,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{14:[1,74]},t(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:i,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K}),t(Z,[2,14]),t(Q,[2,16],{12:[1,76]}),t(Z,[2,36],{12:[1,77]}),t(J,[2,19]),t(J,[2,20]),{25:[1,78]},{27:[1,79]},t(J,[2,23]),{35:80,75:81,76:R,77:M,79:D,80:O},{35:86,75:81,76:R,77:M,79:D,80:O},{35:87,75:81,76:R,77:M,79:D,80:O},{35:88,75:81,76:R,77:M,79:D,80:O},{35:89,75:81,76:R,77:M,79:D,80:O},{35:90,75:81,76:R,77:M,79:D,80:O},{35:91,75:81,76:R,77:M,79:D,80:O},{35:92,75:81,76:R,77:M,79:D,80:O},{35:93,75:81,76:R,77:M,79:D,80:O},{35:94,75:81,76:R,77:M,79:D,80:O},{35:95,75:81,76:R,77:M,79:D,80:O},{35:96,75:81,76:R,77:M,79:D,80:O},{35:97,75:81,76:R,77:M,79:D,80:O},{35:98,75:81,76:R,77:M,79:D,80:O},{35:99,75:81,76:R,77:M,79:D,80:O},{35:100,75:81,76:R,77:M,79:D,80:O},{35:101,75:81,76:R,77:M,79:D,80:O},{35:102,75:81,76:R,77:M,79:D,80:O},{35:103,75:81,76:R,77:M,79:D,80:O},{35:104,75:81,76:R,77:M,79:D,80:O},t(P,[2,59]),{35:105,75:81,76:R,77:M,79:D,80:O},{35:106,75:81,76:R,77:M,79:D,80:O},{35:107,75:81,76:R,77:M,79:D,80:O},{35:108,75:81,76:R,77:M,79:D,80:O},{35:109,75:81,76:R,77:M,79:D,80:O},{35:110,75:81,76:R,77:M,79:D,80:O},{35:111,75:81,76:R,77:M,79:D,80:O},{35:112,75:81,76:R,77:M,79:D,80:O},{35:113,75:81,76:R,77:M,79:D,80:O},{35:114,75:81,76:R,77:M,79:D,80:O},{35:115,75:81,76:R,77:M,79:D,80:O},{20:116,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:R,77:M,79:D,80:O},{35:120,75:81,76:R,77:M,79:D,80:O},{35:121,75:81,76:R,77:M,79:D,80:O},{35:122,75:81,76:R,77:M,79:D,80:O},{35:123,75:81,76:R,77:M,79:D,80:O},{35:124,75:81,76:R,77:M,79:D,80:O},{35:125,75:81,76:R,77:M,79:D,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Z,[2,15]),t(Q,[2,17],{21:22,19:130,22:e,23:r,24:$,26:F,28:z}),t(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:$,26:F,28:z,34:n,36:i,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K}),t(J,[2,21]),t(J,[2,22]),t(P,[2,39]),t(tt,[2,71],{75:81,35:132,76:R,77:M,79:D,80:O}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(P,[2,52]),t(P,[2,53]),t(P,[2,54]),t(P,[2,55]),t(P,[2,56]),t(P,[2,57]),t(P,[2,58]),t(P,[2,60]),t(P,[2,61]),t(P,[2,62]),t(P,[2,63]),t(P,[2,64]),t(P,[2,65]),t(P,[2,66]),t(P,[2,67]),t(P,[2,68]),t(P,[2,69]),t(P,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(rt,[2,28]),t(rt,[2,29]),t(rt,[2,30]),t(rt,[2,31]),t(rt,[2,32]),t(rt,[2,33]),t(rt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Q,[2,18]),t(Z,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(P,[2,24]),t(P,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:me(function(t,e,r,n){switch(r){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};e.lexer=r,me(B,"Parser"),(Hc=new((B.prototype=e).Parser=B)).parser=Hc,Vc=Hc}),lh=b(()=>{t(),Xc=me(function(t,e){for(var r of e)t.attr(r[0],r[1])},"d3Attrs"),Kc=me(function(t,e,r){var n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),Zc=me(function(t,e,r,n){e=Kc(e,r,n),Xc(t,e)},"configureSvgSize"),Qc=me(function(t,e,r,n){var i=e.node().getBBox(),a=i.width,s=(D.info(`SVG bounds: ${a}x`+(s=i.height),i),D.info("Graph bounds: 0x0",t),D.info(`Calculated bounds: ${t=a+2*r}x`+(a=s+2*r)),Zc(e,a,t,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));e.attr("viewBox",s)},"setupGraphViewbox")}),ch=b(()=>{t(),Jc={},th=me((t,e,r)=>{let n="";return t in Jc&&Jc[t]?n=Jc[t](r):D.warn("No theme found for "+t),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 1px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${n} + + ${e} +`},"getStyles"),eh=me((t,e)=>{void 0!==e&&(Jc[t]=e)},"addStylesForDiagram"),rh=th}),hh={};KBt(hh,{clear:()=>fh,getAccDescription:()=>xh,getAccTitle:()=>yh,getDiagramTitle:()=>wh,setAccDescription:()=>vh,setAccTitle:()=>mh,setDiagramTitle:()=>bh});var uh,dh,ph,gh,fh,mh,yh,vh,xh,bh,wh,kh,Th,O,Eh,Ch,Sh,_h,Ah,Lh,Nh,Ih,Rh,Mh,Dh,Oh,Ph,Bh,$h,Fh,zh,Gh,Uh,qh,jh,Wh,Yh,Hh,Vh,Xh,Kh,Zh,Qh,Jh,tu,eu,ru,nu,iu,au,su,ou,lu,cu,hu,uu,du,pu,gu,fu,mu,yu,vu,xu,bu,wu,ku=b(()=>{Oc(),rn(),ph=dh=uh="",gh=me(t=>lc(t,ar()),"sanitizeText"),fh=me(()=>{dh=ph=uh=""},"clear"),mh=me(t=>{uh=gh(t).replace(/^\s+/g,"")},"setAccTitle"),yh=me(()=>uh,"getAccTitle"),vh=me(t=>{ph=gh(t).replace(/\n\s+/g,` +`)},"setAccDescription"),xh=me(()=>ph,"getAccDescription"),bh=me(t=>{dh=gh(t)},"setDiagramTitle"),wh=me(()=>dh,"getDiagramTitle")}),Tu=b(()=>{sh(),t(),rn(),Oc(),lh(),ch(),ku(),kh=D,Th=It,O=ar,Eh=ir,Ch=Ve,Sh=me(t=>lc(t,O()),"sanitizeText"),_h=Qc,Ah=me(()=>hh,"getCommonDb"),Lh={},Nh=me((t,e,r)=>{Lh[t]&&kh.warn(`Diagram with id ${t} already registered. Overwriting.`),Lh[t]=e,r&&Wc(t,r),eh(t,e.styles),e.injectUtils?.(kh,Th,O,Sh,_h,Ah(),()=>{})},"registerDiagram"),Ih=me(t=>{if(t in Lh)return Lh[t];throw new Rh(t)},"getDiagram"),Rh=class extends Error{static{me(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),Eu=b(()=>{Tu(),Oc(),ku(),Mh=[],Dh=[""],Bh=[{alias:Oh="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Ph=""}],Fh="",zh=!($h=[]),Gh=4,Uh=2,jh=me(function(){return qh},"getC4Type"),Wh=me(function(t){qh=lc(t,O())},"setC4Type"),Yh=me(function(r,n,i,a,s,o,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let t={},e=$h.find(t=>t.from===n&&t.to===i);e?t=e:$h.push(t),t.type=r,t.from=n,t.to=i,t.label={text:a},null==s?t.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],t[r]={text:a}):t.techn={text:s},null==o?t.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],t[r]={text:a}):t.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],t[s]=r):t.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],t[a]=o):t.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],t[s]=r):t.link=h,t.wrap=fu()}},"addRel"),Hh=me(function(r,n,i,a,s,o,l){if(null!==n&&null!==i){let t={},e=Mh.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Mh.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.descr={text:""}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.descr={text:a},"object"==typeof s?([i,c]=Object.entries(s)[0],t[i]=c):t.sprite=s,"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.typeC4Shape={text:r},t.parentBoundary=Oh,t.wrap=fu()}},"addPersonOrSystem"),Vh=me(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=Mh.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Mh.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=fu(),t.typeC4Shape={text:r},t.parentBoundary=Oh}},"addContainer"),Xh=me(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=Mh.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Mh.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=fu(),t.typeC4Shape={text:r},t.parentBoundary=Oh}},"addComponent"),Kh=me(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Bh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Bh.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"system"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Oh,t.wrap=fu(),Ph=Oh,Oh=r,Dh.push(Ph)}},"addPersonOrSystemBoundary"),Zh=me(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Bh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Bh.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"container"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Oh,t.wrap=fu(),Ph=Oh,Oh=r,Dh.push(Ph)}},"addContainerBoundary"),Qh=me(function(r,n,i,a,s,t,o,l){if(null!==n&&null!==i){let t={},e=Bh.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Bh.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.type={text:"node"}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.type={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,c]=Object.entries(s)[0],t[i]={text:c}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.nodeType=r,t.parentBoundary=Oh,t.wrap=fu(),Ph=Oh,Oh=n,Dh.push(Ph)}},"addDeploymentNode"),Jh=me(function(){Oh=Ph,Dh.pop(),Ph=Dh.pop(),Dh.push(Ph)},"popBoundaryParseStack"),tu=me(function(t,e,r,n,i,a,s,o,l,c,h){let u=Mh.find(t=>t.alias===e);var d,p;void 0===u&&void 0===(u=Bh.find(t=>t.alias===e))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=n&&("object"==typeof n?([p,d]=Object.entries(n)[0],u[p]=d):u.fontColor=n),null!=i&&("object"==typeof i?([r,p]=Object.entries(i)[0],u[r]=p):u.borderColor=i),null!=a&&("object"==typeof a?([d,n]=Object.entries(a)[0],u[d]=n):u.shadowing=a),null!=s&&("object"==typeof s?([r,p]=Object.entries(s)[0],u[r]=p):u.shape=s),null!=o&&("object"==typeof o?([i,d]=Object.entries(o)[0],u[i]=d):u.sprite=o),null!=l&&("object"==typeof l?([n,a]=Object.entries(l)[0],u[n]=a):u.techn=l),null!=c&&("object"==typeof c?([r,p]=Object.entries(c)[0],u[r]=p):u.legendText=c),null!=h&&("object"==typeof h?([s,i]=Object.entries(h)[0],u[s]=i):u.legendSprite=h))},"updateElStyle"),eu=me(function(t,e,r,n,i,a,s){var o,l,c=$h.find(t=>t.from===e&&t.to===r);void 0!==c&&(null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.textColor=n),null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.lineColor=i),null!=a&&("object"==typeof a?([n,o]=Object.entries(a)[0],c[n]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,i]=Object.entries(s)[0],c[l]=parseInt(i)):c.offsetY=parseInt(s))},"updateRelStyle"),ru=me(function(t,e,r){var e="object"==typeof e?(n=Object.values(e)[0],parseInt(n)):parseInt(e),n="object"==typeof r?(n=Object.values(r)[0],parseInt(n)):parseInt(r);1<=e&&(Gh=e),1<=n&&(Uh=n)},"updateLayoutConfig"),nu=me(function(){return Gh},"getC4ShapeInRow"),iu=me(function(){return Uh},"getC4BoundaryInRow"),au=me(function(){return Oh},"getCurrentBoundaryParse"),su=me(function(){return Ph},"getParentBoundaryParse"),ou=me(function(e){return null==e?Mh:Mh.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),lu=me(function(e){return Mh.find(t=>t.alias===e)},"getC4Shape"),cu=me(function(t){return Object.keys(ou(t))},"getC4ShapeKeys"),hu=me(function(e){return null==e?Bh:Bh.filter(t=>t.parentBoundary===e)},"getBoundaries"),uu=hu,du=me(function(){return $h},"getRels"),pu=me(function(){return Fh},"getTitle"),gu=me(function(t){zh=t},"setWrap"),fu=me(function(){return zh},"autoWrap"),mu=me(function(){Mh=[],Bh=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Oh="global",Dh=[Ph=""],Dh=[Fh=""],zh=!($h=[]),Gh=4,Uh=2},"clear"),yu={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},vu={FILLED:0,OPEN:1},xu={LEFTOF:0,RIGHTOF:1,OVER:2},bu=me(function(t){Fh=lc(t,O())},"setTitle"),wu={addPersonOrSystem:Hh,addPersonOrSystemBoundary:Kh,addContainer:Vh,addContainerBoundary:Zh,addComponent:Xh,addDeploymentNode:Qh,popBoundaryParseStack:Jh,addRel:Yh,updateElStyle:tu,updateRelStyle:eu,updateLayoutConfig:ru,autoWrap:fu,setWrap:gu,getC4ShapeArray:ou,getC4Shape:lu,getC4ShapeKeys:cu,getBoundaries:hu,getBoundarys:uu,getCurrentBoundaryParse:au,getParentBoundaryParse:su,getRels:du,getTitle:pu,getC4Type:jh,getC4ShapeInRow:nu,getC4BoundaryInRow:iu,setAccTitle:mh,getAccTitle:yh,getAccDescription:xh,setAccDescription:vh,getConfig:me(()=>O().c4,"getConfig"),clear:mu,LINETYPE:yu,ARROWTYPE:vu,PLACEMENT:xu,setTitle:bu,setC4Type:Wh}});function Cu(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}var Su=b(()=>{me(Cu,"ascending")});function _u(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}var Au=b(()=>{me(_u,"descending")});function Lu(r){let a,s,i;function o(t,e,r=0,n=t.length){if(r<n){if(0!==a(e,e))return n;do{var i=r+n>>>1}while(s(t[i],e)<0?r=1+i:n=i,r<n)}return r}function t(t,e,r=0,n=t.length){if(r<n){if(0!==a(e,e))return n;do{var i=r+n>>>1}while(s(t[i],e)<=0?r=1+i:n=i,r<n)}return r}function e(t,e,r=0,n=t.length){return r<(n=o(t,e,r,n-1))&&i(t[n-1],e)>-i(t[n],e)?n-1:n}return i=2!==r.length?(a=Cu,s=me((t,e)=>Cu(r(t),e),"compare2"),me((t,e)=>r(t)-e,"delta")):(a=r===Cu||r===_u?r:Nu,s=r),me(o,"left"),me(t,"right"),me(e,"center"),{left:o,center:e,right:t}}function Nu(){return 0}var Iu=b(()=>{Su(),Au(),me(Lu,"bisector"),me(Nu,"zero")});function Ru(t){return null===t?NaN:+t}var Mu,Du,Ou=b(()=>{me(Ru,"number")}),Pu=b(()=>{Su(),Iu(),Ou(),Mu=Lu(Cu).right,Lu(Ru).center,Du=Mu});function Bu({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):r}function $u({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):(t.set(e,r),r)}function Fu({_intern:t,_key:e},r){return e=e(r),t.has(e)&&(r=t.get(e),t.delete(e)),r}function zu(t){return null!==t&&"object"==typeof t?t.valueOf():t}var Gu,Uu=b(()=>{Gu=class extends Map{static{me(this,"InternMap")}constructor(t,e=zu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(var[r,n]of t)this.set(r,n)}get(t){return super.get(Bu(this,t))}has(t){return super.has(Bu(this,t))}set(t,e){return super.set($u(this,t),e)}delete(t){return super.delete(Fu(this,t))}},me(Bu,"intern_get"),me($u,"intern_set"),me(Fu,"intern_delete"),me(zu,"keyof")});function qu(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=Hu<=a?10:Vu<=a?5:Xu<=a?2:1,o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(t*c),l=Math.round(e*c),o/c<t&&++o,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(t/c),l=Math.round(e/c),o*c<t&&++o,l*c>e&&--l),l<o&&.5<=r&&r<2?qu(t,e,2*r):[o,l,c]}function ju(t,e,r){if(!(0<(r=+r)))return[];if((t=+t)==(e=+e))return[t];var n=e<t,[i,a,s]=n?qu(e,t,r):qu(t,e,r);if(!(i<=a))return[];var o=a-i+1,l=new Array(o);if(n)if(s<0)for(let t=0;t<o;++t)l[t]=(a-t)/-s;else for(let t=0;t<o;++t)l[t]=(a-t)*s;else if(s<0)for(let t=0;t<o;++t)l[t]=(i+t)/-s;else for(let t=0;t<o;++t)l[t]=(i+t)*s;return l}function Wu(t,e,r){return qu(t=+t,e=+e,r=+r)[2]}function Yu(t,e,r){r=+r;var n=(e=+e)<(t=+t);return(n?-1:1)*((t=n?Wu(e,t,r):Wu(t,e,r))<0?1/-t:t)}var Hu,Vu,Xu,Ku=b(()=>{Hu=Math.sqrt(50),Vu=Math.sqrt(10),Xu=Math.sqrt(2),me(qu,"tickSpec"),me(ju,"ticks"),me(Wu,"tickIncrement"),me(Yu,"tickStep")});function Zu(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n<t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n<i||void 0===n&&i<=i)&&(n=i)}return n}var Qu=b(()=>{me(Zu,"max")});function Ju(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var td=b(()=>{me(Ju,"min")});function ed(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n<i;)a[n]=t+n*r;return a}var rd=b(()=>{me(ed,"range")}),nd=b(()=>{Pu(),Iu(),Qu(),td(),rd(),Ku(),Uu()});function id(t){return t}var ad=b(()=>{me(id,"default")});function sd(t){return"translate("+t+",0)"}function od(t){return"translate(0,"+t+")"}function ld(e){return t=>+e(t)}function cd(e,r){return r=Math.max(0,e.bandwidth()-2*r)/2,e.round()&&(r=Math.round(r)),t=>+e(t)+r}function hd(){return!this.__axis}function ud(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1<window.devicePixelRatio?0:.5,k=p===gd||4===p?-1:1,T=4===p||2===p?"x":"y",E=p===gd||p===fd?sd:od;function e(t){var e=m??(g.ticks?g.ticks.apply(g,f):g.domain()),r=y??(g.tickFormat?g.tickFormat.apply(g,f):id),n=Math.max(v,0)+b,i=+(a=g.range())[0]+w,a=+a[a.length-1]+w,s=(g.bandwidth?cd:ld)(g.copy(),w),o=t.selection?t.selection():t,l=o.selectAll(".domain").data([null]),c=(e=o.selectAll(".tick").data(e,g).order()).exit(),h=e.enter().append("g").attr("class","tick"),u=e.select("line"),d=e.select("text"),l=l.merge(l.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),e=e.merge(h),u=u.merge(h.append("line").attr("stroke","currentColor").attr(T+"2",k*v)),d=d.merge(h.append("text").attr("fill","currentColor").attr(T,k*n).attr("dy",p===gd?"0em":p===fd?"0.71em":"0.32em"));t!==o&&(l=l.transition(t),e=e.transition(t),u=u.transition(t),d=d.transition(t),c=c.transition(t).attr("opacity",1e-6).attr("transform",function(t){return isFinite(t=s(t))?E(t+w):this.getAttribute("transform")}),h.attr("opacity",1e-6).attr("transform",function(t){var e=this.parentNode.__axis;return E((e&&isFinite(e=e(t))?e:s(t))+w)})),c.remove(),l.attr("d",4===p||2===p?x?"M"+k*x+","+i+"H"+w+"V"+a+"H"+k*x:"M"+w+","+i+"V"+a:x?"M"+i+","+k*x+"V"+w+"H"+a+"V"+k*x:"M"+i+","+w+"H"+a),e.attr("opacity",1).attr("transform",function(t){return E(s(t)+w)}),u.attr(T+"2",k*v),d.attr(T,k*n).text(r),o.filter(hd).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===p?"start":4===p?"end":"middle"),o.each(function(){this.__axis=s})}return me(e,"axis"),e.scale=function(t){return arguments.length?(g=t,e):g},e.ticks=function(){return f=Array.from(arguments),e},e.tickArguments=function(t){return arguments.length?(f=null==t?[]:Array.from(t),e):f.slice()},e.tickValues=function(t){return arguments.length?(m=null==t?null:Array.from(t),e):m&&m.slice()},e.tickFormat=function(t){return arguments.length?(y=t,e):y},e.tickSize=function(t){return arguments.length?(v=x=+t,e):v},e.tickSizeInner=function(t){return arguments.length?(v=+t,e):v},e.tickSizeOuter=function(t){return arguments.length?(x=+t,e):x},e.tickPadding=function(t){return arguments.length?(b=+t,e):b},e.offset=function(t){return arguments.length?(w=+t,e):w},e}function dd(t){return ud(gd,t)}function pd(t){return ud(fd,t)}var gd,fd,md=b(()=>{ad(),gd=1,fd=3,me(sd,"translateX"),me(od,"translateY"),me(ld,"number"),me(cd,"center"),me(hd,"entering"),me(ud,"axis"),me(dd,"axisTop"),me(pd,"axisBottom")}),yd=b(()=>{md()});function vd(){for(var t,e=0,r=arguments.length,n={};e<r;++e){if(!(t=arguments[e]+"")||t in n||/[\s.]/.test(t))throw new Error("illegal type: "+t);n[t]=[]}return new xd(n)}function xd(t){this._=t}function bd(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(0<=r&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function wd(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}function kd(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=Td,t=t.slice(0,n).concat(t.slice(n+1));break}return null!=r&&t.push({name:e,value:r}),t}var Td,Ed,Cd,Sd,_d=b(()=>{Td={value:me(()=>{},"value")},me(vd,"dispatch"),me(xd,"Dispatch"),me(bd,"parseTypenames"),xd.prototype=vd.prototype={constructor:xd,on:me(function(t,e){var r,n=this._,i=bd(t+"",n),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(r=(t=i[a]).type)n[r]=kd(n[r],t.name,e);else if(null==e)for(r in n)n[r]=kd(n[r],t.name,null);return this}for(;++a<s;)if(r=(r=(t=i[a]).type)&&wd(n[r],t.name))return r},"on"),copy:me(function(){var t,e={},r=this._;for(t in r)e[t]=r[t].slice();return new xd(e)},"copy"),call:me(function(t,e){if(0<(r=arguments.length-2))for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(n=this._[t]).length;a<r;++a)n[a].value.apply(e,i)},"call"),apply:me(function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)},"apply")},me(wd,"get"),me(kd,"set"),Ed=vd}),Ad=b(()=>{_d()}),Ld=b(()=>{Sd={svg:"http://www.w3.org/2000/svg",xhtml:Cd="http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Nd(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),Sd.hasOwnProperty(e)?{space:Sd[e],local:t}:t}var Id=b(()=>{Ld(),me(Nd,"default")});function Rd(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===Cd&&t.documentElement.namespaceURI===Cd?t.createElement(r):t.createElementNS(e,r)}}function Md(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Dd(t){return((t=Nd(t)).local?Md:Rd)(t)}var Od=b(()=>{Id(),Ld(),me(Rd,"creatorInherit"),me(Md,"creatorFixed"),me(Dd,"default")});function Pd(){}function Bd(t){return null==t?Pd:function(){return this.querySelector(t)}}var $d=b(()=>{me(Pd,"none"),me(Bd,"default")});function Fd(t){"function"!=typeof t&&(t=Bd(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a,s,o=e[i],l=o.length,c=n[i]=new Array(l),h=0;h<l;++h)(a=o[h])&&(s=t.call(a,a.__data__,h,o))&&("__data__"in a&&(s.__data__=a.__data__),c[h]=s);return new dg(n,this._parents)}var zd=b(()=>{yg(),$d(),me(Fd,"default")});function Gd(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}var Ud=b(()=>{me(Gd,"array")});function qd(){return[]}function jd(t){return null==t?qd:function(){return this.querySelectorAll(t)}}var Wd=b(()=>{me(qd,"empty"),me(jd,"default")});function Yd(t){return function(){return Gd(t.apply(this,arguments))}}function Hd(t){t=("function"==typeof t?Yd:jd)(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a<r;++a)for(var s,o=e[a],l=o.length,c=0;c<l;++c)(s=o[c])&&(n.push(t.call(s,s.__data__,c,o)),i.push(s));return new dg(n,i)}var Vd=b(()=>{yg(),Ud(),Wd(),me(Yd,"arrayAll"),me(Hd,"default")});function Xd(t){return function(){return this.matches(t)}}function Kd(e){return function(t){return t.matches(e)}}var Zd=b(()=>{me(Xd,"default"),me(Kd,"childMatcher")});function Qd(t){return function(){return ep.call(this.children,t)}}function Jd(){return this.firstElementChild}function tp(t){return this.select(null==t?Jd:Qd("function"==typeof t?t:Kd(t)))}var ep,rp=b(()=>{Zd(),ep=Array.prototype.find,me(Qd,"childFind"),me(Jd,"childFirst"),me(tp,"default")});function np(){return Array.from(this.children)}function ip(t){return function(){return sp.call(this.children,t)}}function ap(t){return this.selectAll(null==t?np:ip("function"==typeof t?t:Kd(t)))}var sp,op=b(()=>{Zd(),sp=Array.prototype.filter,me(np,"children"),me(ip,"childrenFilter"),me(ap,"default")});function lp(t){"function"!=typeof t&&(t=Xd(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a,s=e[i],o=s.length,l=n[i]=[],c=0;c<o;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new dg(n,this._parents)}var cp=b(()=>{yg(),Zd(),me(lp,"default")});function hp(t){return new Array(t.length)}var up=b(()=>{me(hp,"default")});function dp(){return new dg(this._enter||this._groups.map(hp),this._parents)}function pp(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var gp=b(()=>{up(),yg(),me(dp,"default"),me(pp,"EnterNode"),pp.prototype={constructor:pp,appendChild:me(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:me(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:me(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:me(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function fp(t){return function(){return t}}var mp=b(()=>{me(fp,"default")});function yp(t,e,r,n,i,a){for(var s,o=0,l=e.length,c=a.length;o<c;++o)(s=e[o])?(s.__data__=a[o],n[o]=s):r[o]=new pp(t,a[o]);for(;o<l;++o)(s=e[o])&&(i[o]=s)}function vp(t,e,r,n,i,a,s){for(var o,l,c=new Map,h=e.length,u=a.length,d=new Array(h),p=0;p<h;++p)(o=e[p])&&(d[p]=l=s.call(o,o.__data__,p,e)+"",c.has(l)?i[p]=o:c.set(l,o));for(p=0;p<u;++p)l=s.call(t,a[p],p,a)+"",(o=c.get(l))?((n[p]=o).__data__=a[p],c.delete(l)):r[p]=new pp(t,a[p]);for(p=0;p<h;++p)(o=e[p])&&c.get(d[p])===o&&(i[p]=o)}function xp(t){return t.__data__}function bp(t,e){if(!arguments.length)return Array.from(this,xp);var r=e?vp:yp,n=this._parents,i=this._groups;"function"!=typeof t&&(t=fp(t));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=n[c],u=i[c],d=u.length,p=wp(t.call(h,h&&h.__data__,c,n)),g=p.length,f=o[c]=new Array(g),m=s[c]=new Array(g);r(h,u,f,m,l[c]=new Array(d),p,e);for(var y,v,x=0,b=0;x<g;++x)if(y=f[x]){for(b<=x&&(b=x+1);!(v=m[b])&&++b<g;);y._next=v||null}}return(s=new dg(s,n))._enter=o,s._exit=l,s}function wp(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var kp=b(()=>{yg(),gp(),mp(),me(yp,"bindIndex"),me(vp,"bindKey"),me(xp,"datum"),me(bp,"default"),me(wp,"arraylike")});function Tp(){return new dg(this._exit||this._groups.map(hp),this._parents)}var Ep=b(()=>{up(),yg(),me(Tp,"default")});function Cp(t,e,r){var n=this.enter(),i=this,a=this.exit(),n="function"==typeof t?(n=t(n))&&n.selection():n.append(t+"");return null!=e&&(i=(i=e(i))&&i.selection()),null==r?a.remove():r(a),n&&i?n.merge(i).order():i}var Sp=b(()=>{me(Cp,"default")});function _p(t){for(var t=t.selection?t.selection():t,e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),s=0;s<i;++s)for(var o,l=e[s],c=r[s],h=l.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=l[d]||c[d])&&(u[d]=o);for(;s<n;++s)a[s]=e[s];return new dg(a,this._parents)}var Ap=b(()=>{yg(),me(_p,"default")});function Lp(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n,i=t[e],a=i.length-1,s=i[a];0<=--a;)(n=i[a])&&(s&&4^n.compareDocumentPosition(s)&&s.parentNode.insertBefore(n,s),s=n);return this}var Np=b(()=>{me(Lp,"default")});function Ip(r){function t(t,e){return t&&e?r(t.__data__,e.__data__):!t-!e}r=r||Rp,me(t,"compareNode");for(var e=this._groups,n=e.length,i=new Array(n),a=0;a<n;++a){for(var s,o=e[a],l=o.length,c=i[a]=new Array(l),h=0;h<l;++h)(s=o[h])&&(c[h]=s);c.sort(t)}return new dg(i,this._parents).order()}function Rp(t,e){return t<e?-1:e<t?1:e<=t?0:NaN}var Mp=b(()=>{yg(),me(Ip,"default"),me(Rp,"ascending")});function Dp(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var Op=b(()=>{me(Dp,"default")});function Pp(){return Array.from(this)}var Bp=b(()=>{me(Pp,"default")});function $p(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s}return null}var Fp=b(()=>{me($p,"default")});function zp(){let t=0;for(var e of this)++t;return t}var Gp=b(()=>{me(zp,"default")});function Up(){return!this.node()}var qp=b(()=>{me(Up,"default")});function jp(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i,a=e[r],s=0,o=a.length;s<o;++s)(i=a[s])&&t.call(i,i.__data__,s,a);return this}var Wp=b(()=>{me(jp,"default")});function Yp(t){return function(){this.removeAttribute(t)}}function Hp(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Vp(t,e){return function(){this.setAttribute(t,e)}}function Xp(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Kp(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}}function Zp(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function Qp(t,e){var r,t=Nd(t);return arguments.length<2?(r=this.node(),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)):this.each((null==e?t.local?Hp:Yp:"function"==typeof e?t.local?Zp:Kp:t.local?Xp:Vp)(t,e))}var Jp=b(()=>{Id(),me(Yp,"attrRemove"),me(Hp,"attrRemoveNS"),me(Vp,"attrConstant"),me(Xp,"attrConstantNS"),me(Kp,"attrFunction"),me(Zp,"attrFunctionNS"),me(Qp,"default")});function t0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var e0=b(()=>{me(t0,"default")});function r0(t){return function(){this.style.removeProperty(t)}}function n0(t,e,r){return function(){this.style.setProperty(t,e,r)}}function i0(e,r,n){return function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,n)}}function a0(t,e,r){return 1<arguments.length?this.each((null==e?r0:"function"==typeof e?i0:n0)(t,e,r??"")):s0(this.node(),t)}function s0(t,e){return t.style.getPropertyValue(e)||t0(t).getComputedStyle(t,null).getPropertyValue(e)}var o0=b(()=>{e0(),me(r0,"styleRemove"),me(n0,"styleConstant"),me(i0,"styleFunction"),me(a0,"default"),me(s0,"styleValue")});function l0(t){return function(){delete this[t]}}function c0(t,e){return function(){this[t]=e}}function h0(e,r){return function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}}function u0(t,e){return 1<arguments.length?this.each((null==e?l0:"function"==typeof e?h0:c0)(t,e)):this.node()[t]}var d0=b(()=>{me(l0,"propertyRemove"),me(c0,"propertyConstant"),me(h0,"propertyFunction"),me(u0,"default")});function p0(t){return t.trim().split(/^|\s+/)}function g0(t){return t.classList||new f0(t)}function f0(t){this._node=t,this._names=p0(t.getAttribute("class")||"")}function m0(t,e){for(var r=g0(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function y0(t,e){for(var r=g0(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function v0(t){return function(){m0(this,t)}}function x0(t){return function(){y0(this,t)}}function b0(t,e){return function(){(e.apply(this,arguments)?m0:y0)(this,t)}}function w0(t,e){var r=p0(t+"");if(arguments.length<2){for(var n=g0(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof e?b0:e?v0:x0)(r,e))}var k0=b(()=>{me(p0,"classArray"),me(g0,"classList"),me(f0,"ClassList"),f0.prototype={add:me(function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:me(function(t){0<=(t=this._names.indexOf(t))&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:me(function(t){return 0<=this._names.indexOf(t)},"contains")},me(m0,"classedAdd"),me(y0,"classedRemove"),me(v0,"classedTrue"),me(x0,"classedFalse"),me(b0,"classedFunction"),me(w0,"default")});function T0(){this.textContent=""}function E0(t){return function(){this.textContent=t}}function C0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function S0(t){return arguments.length?this.each(null==t?T0:("function"==typeof t?C0:E0)(t)):this.node().textContent}var _0=b(()=>{me(T0,"textRemove"),me(E0,"textConstant"),me(C0,"textFunction"),me(S0,"default")});function A0(){this.innerHTML=""}function L0(t){return function(){this.innerHTML=t}}function N0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function I0(t){return arguments.length?this.each(null==t?A0:("function"==typeof t?N0:L0)(t)):this.node().innerHTML}var R0=b(()=>{me(A0,"htmlRemove"),me(L0,"htmlConstant"),me(N0,"htmlFunction"),me(I0,"default")});function M0(){this.nextSibling&&this.parentNode.appendChild(this)}function D0(){return this.each(M0)}var O0=b(()=>{me(M0,"raise"),me(D0,"default")});function P0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function B0(){return this.each(P0)}var $0=b(()=>{me(P0,"lower"),me(B0,"default")});function F0(t){var e="function"==typeof t?t:Dd(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var z0=b(()=>{Od(),me(F0,"default")});function G0(){return null}function U0(t,e){var r="function"==typeof t?t:Dd(t),n=null==e?G0:"function"==typeof e?e:Bd(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var q0=b(()=>{Od(),$d(),me(G0,"constantNull"),me(U0,"default")});function j0(){var t=this.parentNode;t&&t.removeChild(this)}function W0(){return this.each(j0)}var Y0=b(()=>{me(j0,"remove"),me(W0,"default")});function H0(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function V0(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function X0(t){return this.select(t?V0:H0)}var K0=b(()=>{me(H0,"selection_cloneShallow"),me(V0,"selection_cloneDeep"),me(X0,"default")});function Z0(t){return arguments.length?this.property("__data__",t):this.node().__data__}var Q0=b(()=>{me(Z0,"default")});function J0(e){return function(t){e.call(this,t,this.__data__)}}function tg(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return 0<=r&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}function eg(a){return function(){var t=this.__on;if(t){for(var e,r=0,n=-1,i=t.length;r<i;++r)e=t[r],a.type&&e.type!==a.type||e.name!==a.name?t[++n]=e:this.removeEventListener(e.type,e.listener,e.options);++n?t.length=n:delete this.__on}}}function rg(a,s,o){return function(){var t,e=this.__on,r=J0(s);if(e)for(var n=0,i=e.length;n<i;++n)if((t=e[n]).type===a.type&&t.name===a.name)return this.removeEventListener(t.type,t.listener,t.options),this.addEventListener(t.type,t.listener=r,t.options=o),void(t.value=s);this.addEventListener(a.type,r,o),t={type:a.type,name:a.name,value:s,listener:r,options:o},e?e.push(t):this.__on=[t]}}function ng(t,e,r){var n,i,a=tg(t+""),s=a.length;if(!(arguments.length<2)){for(o=e?rg:eg,n=0;n<s;++n)this.each(o(a[n],e,r));return this}var o=this.node().__on;if(o)for(var l,c=0,h=o.length;c<h;++c)for(n=0,l=o[c];n<s;++n)if((i=a[n]).type===l.type&&i.name===l.name)return l.value}var ig=b(()=>{me(J0,"contextListener"),me(tg,"parseTypenames"),me(eg,"onRemove"),me(rg,"onAdd"),me(ng,"default")});function ag(t,e,r){var n=t0(t),i=n.CustomEvent;"function"==typeof i?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function sg(t,e){return function(){return ag(this,t,e)}}function og(t,e){return function(){return ag(this,t,e.apply(this,arguments))}}function lg(t,e){return this.each(("function"==typeof e?og:sg)(t,e))}var cg=b(()=>{e0(),me(ag,"dispatchEvent"),me(sg,"dispatchConstant"),me(og,"dispatchFunction"),me(lg,"default")});function*hg(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n,i=t[e],a=0,s=i.length;a<s;++a)(n=i[a])&&(yield n)}var ug=b(()=>{me(hg,"default")});function dg(t,e){this._groups=t,this._parents=e}function pg(){return new dg([[document.documentElement]],fg)}function gg(){return this}var fg,mg,yg=b(()=>{zd(),Vd(),rp(),op(),cp(),kp(),gp(),Ep(),Sp(),Ap(),Np(),Mp(),Op(),Bp(),Fp(),Gp(),qp(),Wp(),Jp(),o0(),d0(),k0(),_0(),R0(),O0(),$0(),z0(),q0(),Y0(),K0(),Q0(),ig(),cg(),ug(),fg=[null],me(dg,"Selection"),me(pg,"selection"),me(gg,"selection_selection"),dg.prototype=pg.prototype={constructor:dg,select:Fd,selectAll:Hd,selectChild:tp,selectChildren:ap,filter:lp,data:bp,enter:dp,exit:Tp,join:Cp,merge:_p,selection:gg,order:Lp,sort:Ip,call:Dp,nodes:Pp,node:$p,size:zp,empty:Up,each:jp,attr:Qp,style:a0,property:u0,classed:w0,text:S0,html:I0,raise:D0,lower:B0,append:F0,insert:U0,remove:W0,clone:X0,datum:Z0,on:ng,dispatch:lg,[Symbol.iterator]:hg},mg=pg});function H(t){return"string"==typeof t?new dg([[document.querySelector(t)]],[document.documentElement]):new dg([[t]],fg)}var vg=b(()=>{yg(),me(H,"default")}),xg=b(()=>{Zd(),Id(),vg(),yg(),$d(),Wd(),o0()}),bg=b(()=>{});function wg(t,e,r){(t.prototype=e.prototype=r).constructor=t}function kg(t,e){var r,n=Object.create(t.prototype);for(r in e)n[r]=e[r];return n}var Tg=b(()=>{me(wg,"default"),me(kg,"extend")});function Eg(){}function Cg(){return this.rgb().formatHex()}function Sg(){return this.rgb().formatHex8()}function _g(){return Ug(this).formatHsl()}function Ag(){return this.rgb().formatRgb()}function Lg(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Zg.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Ng(e):3===r?new Dg(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Ig(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Ig(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Qg.exec(t))?new Dg(e[1],e[2],e[3],1):(e=Jg.exec(t))?new Dg(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=t1.exec(t))?Ig(e[1],e[2],e[3],e[4]):(e=e1.exec(t))?Ig(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=r1.exec(t))?Gg(e[1],e[2]/100,e[3]/100,1):(e=n1.exec(t))?Gg(e[1],e[2]/100,e[3]/100,e[4]):i1.hasOwnProperty(t)?Ng(i1[t]):"transparent"===t?new Dg(NaN,NaN,NaN,0):null}function Ng(t){return new Dg(t>>16&255,t>>8&255,255&t,1)}function Ig(t,e,r,n){return new Dg(t=n<=0?e=r=NaN:t,e,r,n)}function Rg(t){return(t=t instanceof Eg?t:Lg(t))?new Dg((t=t.rgb()).r,t.g,t.b,t.opacity):new Dg}function Mg(t,e,r,n){return 1===arguments.length?Rg(t):new Dg(t,e,r,n??1)}function Dg(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Og(){return"#"+zg(this.r)+zg(this.g)+zg(this.b)}function Pg(){return"#"+zg(this.r)+zg(this.g)+zg(this.b)+zg(255*(isNaN(this.opacity)?1:this.opacity))}function Bg(){var t=$g(this.opacity);return(1===t?"rgb(":"rgba(")+Fg(this.r)+`, ${Fg(this.g)}, `+Fg(this.b)+(1===t?")":`, ${t})`)}function $g(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Fg(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function zg(t){return((t=Fg(t))<16?"0":"")+t.toString(16)}function Gg(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new jg(t,e,r,n)}function Ug(t){var e,r,n,i,a,s,o,l;return t instanceof jg?new jg(t.h,t.s,t.l,t.opacity):(t=t instanceof Eg?t:Lg(t))?t instanceof jg?t:(e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),s=NaN,l=((a=Math.max(e,r,n))+i)/2,(o=a-i)?(s=e===a?(r-n)/o+6*(r<n):r===a?(n-e)/o+2:(e-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=0<l&&l<1?0:s,new jg(s,o,l,t.opacity)):new jg}function qg(t,e,r,n){return 1===arguments.length?Ug(t):new jg(t,e,r,n??1)}function jg(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function Wg(t){return(t=(t||0)%360)<0?t+360:t}function Yg(t){return Math.max(0,Math.min(1,t||0))}function Hg(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}var Vg,Xg,Kg,Zg,Qg,Jg,t1,e1,r1,n1,i1,a1,s1,o1=b(()=>{Tg(),me(Eg,"Color"),Vg="\\s*([+-]?\\d+)\\s*",Xg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zg=/^#([0-9a-f]{3,8})$/,Qg=new RegExp(`^rgb\\(${Vg},${Vg},${Vg}\\)$`),Jg=new RegExp(`^rgb\\(${Kg},${Kg},${Kg}\\)$`),t1=new RegExp(`^rgba\\(${Vg},${Vg},${Vg},${Xg}\\)$`),e1=new RegExp(`^rgba\\(${Kg},${Kg},${Kg},${Xg}\\)$`),r1=new RegExp(`^hsl\\(${Xg},${Kg},${Kg}\\)$`),n1=new RegExp(`^hsla\\(${Xg},${Kg},${Kg},${Xg}\\)$`),i1={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},wg(Eg,Lg,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Cg,formatHex:Cg,formatHex8:Sg,formatHsl:_g,formatRgb:Ag,toString:Ag}),me(Cg,"color_formatHex"),me(Sg,"color_formatHex8"),me(_g,"color_formatHsl"),me(Ag,"color_formatRgb"),me(Lg,"color"),me(Ng,"rgbn"),me(Ig,"rgba"),me(Rg,"rgbConvert"),me(Mg,"rgb"),me(Dg,"Rgb"),wg(Dg,Mg,kg(Eg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Dg(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Dg(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Dg(Fg(this.r),Fg(this.g),Fg(this.b),$g(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:Og,formatHex:Og,formatHex8:Pg,formatRgb:Bg,toString:Bg})),me(Og,"rgb_formatHex"),me(Pg,"rgb_formatHex8"),me(Bg,"rgb_formatRgb"),me($g,"clampa"),me(Fg,"clampi"),me(zg,"hex"),me(Gg,"hsla"),me(Ug,"hslConvert"),me(qg,"hsl"),me(jg,"Hsl"),wg(jg,qg,kg(Eg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new jg(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new jg(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l;return new Dg(Hg(240<=t?t-240:120+t,r=2*r-(e=r+(r<.5?r:1-r)*e),e),Hg(t,r,e),Hg(t<120?240+t:t-120,r,e),this.opacity)},clamp(){return new jg(Wg(this.h),Yg(this.s),Yg(this.l),$g(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(){var t=$g(this.opacity);return(1===t?"hsl(":"hsla(")+Wg(this.h)+`, ${100*Yg(this.s)}%, ${100*Yg(this.l)}%`+(1===t?")":`, ${t})`)}})),me(Wg,"clamph"),me(Yg,"clampt"),me(Hg,"hsl2rgb")}),l1=b(()=>{a1=Math.PI/180,s1=180/Math.PI});function c1(t){var e,r,n,i,a,s;return t instanceof u1?new u1(t.l,t.a,t.b,t.opacity):t instanceof v1?x1(t):(i=d1(.2225045*(e=f1((t=t instanceof Dg?t:Rg(t)).r))+.7168786*(r=f1(t.g))+.0606169*(n=f1(t.b))),e===r&&r===n?a=s=i:(a=d1((.4360747*e+.3850649*r+.1430804*n)/.96422),s=d1((.0139322*e+.0971045*r+.7141733*n)/.82521)),new u1(116*i-16,500*(a-i),200*(i-s),t.opacity))}function h1(t,e,r,n){return 1===arguments.length?c1(t):new u1(t,e,r,n??1)}function u1(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function d1(t){return T1<t?Math.pow(t,1/3):t/k1+b1}function p1(t){return w1<t?t*t*t:k1*(t-b1)}function g1(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function f1(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function m1(t){var e;return t instanceof v1?new v1(t.h,t.c,t.l,t.opacity):0===(t=t instanceof u1?t:c1(t)).a&&0===t.b?new v1(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity):new v1((e=Math.atan2(t.b,t.a)*s1)<0?360+e:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function y1(t,e,r,n){return 1===arguments.length?m1(t):new v1(t,e,r,n??1)}function v1(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function x1(t){var e;return isNaN(t.h)?new u1(t.l,0,0,t.opacity):(e=t.h*a1,new u1(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity))}var b1,w1,k1,T1,E1=b(()=>{Tg(),o1(),l1(),b1=4/29,k1=3*(w1=6/29)*w1,T1=w1*w1*w1,me(c1,"labConvert"),me(h1,"lab"),me(u1,"Lab"),wg(u1,h1,kg(Eg,{brighter(t){return new u1(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new u1(this.l-18*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new Dg(g1(3.1338561*(e=.96422*p1(e))-1.6168667*(t=+p1(t))-.4906146*(r=.82521*p1(r))),g1(-.9787684*e+1.9161415*t+.033454*r),g1(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),me(d1,"xyz2lab"),me(p1,"lab2xyz"),me(g1,"lrgb2rgb"),me(f1,"rgb2lrgb"),me(m1,"hclConvert"),me(y1,"hcl"),me(v1,"Hcl"),me(x1,"hcl2lab"),wg(v1,y1,kg(Eg,{brighter(t){return new v1(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new v1(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return x1(this).rgb()}}))}),C1=b(()=>{o1(),E1()});function S1(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function _1(s){var o=s.length-1;return function(t){var e=t<=0?t=0:1<=t?o-(t=1):Math.floor(t*o),r=s[e],n=s[e+1],i=0<e?s[e-1]:2*r-n,a=e<o-1?s[e+2]:2*n-r;return S1((t-e/o)*o,i,r,n,a)}}var A1=b(()=>{me(S1,"basis"),me(_1,"default")});function L1(n){var i=n.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*i),r=n[(e+i-1)%i];return S1((t-e/i)*i,r,n[e%i],n[(e+1)%i],n[(e+2)%i])}}var N1,I1=b(()=>{A1(),me(L1,"default")}),R1=b(()=>{N1=me(t=>()=>t,"default")});function M1(e,r){return function(t){return e+t*r}}function D1(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(t){return Math.pow(e+t*r,n)}}function O1(t,e){var r=e-t;return r?M1(t,180<r||r<-180?r-360*Math.round(r/360):r):N1(isNaN(t)?e:t)}function P1(r){return 1==(r=+r)?B1:function(t,e){return e-t?D1(t,e,r):N1(isNaN(t)?e:t)}}function B1(t,e){var r=e-t;return r?M1(t,r):N1(isNaN(t)?e:t)}var $1=b(()=>{R1(),me(M1,"linear"),me(D1,"exponential"),me(O1,"hue"),me(P1,"gamma"),me(B1,"nogamma")});function F1(o){return function(t){for(var e,r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),s=0;s<r;++s)e=Mg(t[s]),n[s]=e.r||0,i[s]=e.g||0,a[s]=e.b||0;return n=o(n),i=o(i),a=o(a),e.opacity=1,function(t){return e.r=n(t),e.g=i(t),e.b=a(t),e+""}}}var z1,G1=b(()=>{C1(),A1(),I1(),$1(),z1=me(function t(e){var s=P1(e);function r(e,t){var r=s((e=Mg(e)).r,(t=Mg(t)).r),n=s(e.g,t.g),i=s(e.b,t.b),a=B1(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=n(t),e.b=i(t),e.opacity=a(t),e+""}}return me(r,"rgb"),r.gamma=t,r},"rgbGamma")(1),me(F1,"rgbSpline"),F1(_1),F1(L1)});function U1(e,r){r=r||[];var n,i=e?Math.min(r.length,e.length):0,a=r.slice();return function(t){for(n=0;n<i;++n)a[n]=e[n]*(1-t)+r[n]*t;return a}}function q1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var j1=b(()=>{me(U1,"default"),me(q1,"isNumberArray")});function W1(t,e){for(var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s=0;s<n;++s)i[s]=sf(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(t){for(s=0;s<n;++s)a[s]=i[s](t);return a}}var Y1=b(()=>{of(),me(W1,"genericArray")});function H1(e,r){var n=new Date;return e=+e,r=+r,function(t){return n.setTime(e*(1-t)+r*t),n}}var V1=b(()=>{me(H1,"default")});function X1(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var K1=b(()=>{me(X1,"default")});function Z1(t,e){var r,n={},i={};for(r in null!==t&&"object"==typeof t||(t={}),e=null!==e&&"object"==typeof e?e:{})r in t?n[r]=sf(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}var Q1=b(()=>{of(),me(Z1,"default")});function J1(t){return function(){return t}}function tf(e){return function(t){return e(t)+""}}function ef(t,n){var e,r,i,a=rf.lastIndex=nf.lastIndex=0,s=-1,o=[],l=[];for(t+="",n+="";(e=rf.exec(t))&&(r=nf.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(e=e[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:X1(e,r)})),a=nf.lastIndex;return a<n.length&&(i=n.slice(a),o[s]?o[s]+=i:o[++s]=i),o.length<2?l[0]?tf(l[0].x):J1(n):(n=l.length,function(t){for(var e,r=0;r<n;++r)o[(e=l[r]).i]=e.x(t);return o.join("")})}var rf,nf,af=b(()=>{K1(),rf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nf=new RegExp(rf.source,"g"),me(J1,"zero"),me(tf,"one"),me(ef,"default")});function sf(t,e){var r=typeof e;return null==e||"boolean"==r?N1(e):("number"==r?X1:"string"==r?(r=Lg(e))?(e=r,z1):ef:e instanceof Lg?z1:e instanceof Date?H1:q1(e)?U1:Array.isArray(e)?W1:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Z1:X1)(t,e)}var of=b(()=>{C1(),G1(),Y1(),V1(),K1(),Q1(),af(),R1(),j1(),me(sf,"default")});function lf(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var cf=b(()=>{me(lf,"default")});function hf(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*uf,skewX:Math.atan(l)*uf,scaleX:s,scaleY:o}}var uf,df,pf=b(()=>{uf=180/Math.PI,df={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},me(hf,"default")});function gf(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?df:hf(t.a,t.b,t.c,t.d,t.e,t.f)}function ff(t){return null!=t&&((mf=mf||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=mf.transform.baseVal.consolidate())?hf((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):df}var mf,yf=b(()=>{pf(),me(gf,"parseCss"),me(ff,"parseSvg")});function vf(r,o,l,i){function c(t){return t.length?t.pop()+" ":""}function n(t,e,r,n,i,a){var s;t!==r||e!==n?(s=i.push("translate(",null,o,null,l),a.push({i:s-4,x:X1(t,r)},{i:s-2,x:X1(e,n)})):(r||n)&&i.push("translate("+r+o+n+l)}function s(t,e,r,n){t!==e?(180<t-e?e+=360:180<e-t&&(t+=360),n.push({i:r.push(c(r)+"rotate(",null,i)-2,x:X1(t,e)})):e&&r.push(c(r)+"rotate("+e+i)}function h(t,e,r,n){t!==e?n.push({i:r.push(c(r)+"skewX(",null,i)-2,x:X1(t,e)}):e&&r.push(c(r)+"skewX("+e+i)}function u(t,e,r,n,i,a){var s;t!==r||e!==n?(s=i.push(c(i)+"scale(",null,",",null,")"),a.push({i:s-4,x:X1(t,r)},{i:s-2,x:X1(e,n)})):1===r&&1===n||i.push(c(i)+"scale("+r+","+n+")")}return me(c,"pop"),me(n,"translate"),me(s,"rotate"),me(h,"skewX"),me(u,"scale"),function(t,e){var i=[],a=[];return t=r(t),e=r(e),n(t.translateX,t.translateY,e.translateX,e.translateY,i,a),s(t.rotate,e.rotate,i,a),h(t.skewX,e.skewX,i,a),u(t.scaleX,t.scaleY,e.scaleX,e.scaleY,i,a),function(t){for(var e,r=-1,n=a.length;++r<n;)i[(e=a[r]).i]=e.x(t);return i.join("")}}}var xf,bf,wf=b(()=>{K1(),yf(),me(vf,"interpolateTransform"),xf=vf(gf,"px, ","px)","deg)"),bf=vf(ff,", ",")",")")});function kf(s){return function(e,t){var r=s((e=y1(e)).h,(t=y1(t)).h),n=B1(e.c,t.c),i=B1(e.l,t.l),a=B1(e.opacity,t.opacity);return function(t){return e.h=r(t),e.c=n(t),e.l=i(t),e.opacity=a(t),e+""}}}var Tf,Ef=b(()=>{C1(),$1(),me(kf,"hcl"),Tf=kf(O1),kf(B1)}),Cf=b(()=>{of(),K1(),cf(),af(),wf(),G1(),Ef()});function Sf(){return Uf||(Wf(_f),Uf=jf.now()+qf)}function _f(){Uf=0}function Af(){this._call=this._time=this._next=null}function Lf(t,e,r){var n=new Af;return n.restart(t,e,r),n}function Nf(){Sf(),++Of;for(var t,e=Ff;e;)0<=(t=Uf-e._time)&&e._call.call(void 0,t),e=e._next;--Of}function If(){Uf=(Gf=jf.now())+qf,Of=Pf=0;try{Nf()}finally{Of=0,Mf(),Uf=0}}function Rf(){var t=jf.now(),e=t-Gf;$f<e&&(qf-=e,Gf=t)}function Mf(){for(var t,e,r=Ff,n=1/0;r;)r=r._call?(n>r._time&&(n=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:Ff=e);zf=t,Df(n)}function Df(t){Of||(Pf=Pf&&clearTimeout(Pf),24<t-Uf?(t<1/0&&(Pf=setTimeout(If,t-jf.now()-qf)),Bf=Bf&&clearInterval(Bf)):(Bf||(Gf=jf.now(),Bf=setInterval(Rf,$f)),Of=1,Wf(If)))}var Of,Pf,Bf,$f,Ff,zf,Gf,Uf,qf,jf,Wf,Yf=b(()=>{$f=1e3,qf=Uf=Gf=Bf=Pf=Of=0,jf="object"==typeof performance&&performance.now?performance:Date,Wf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)},me(Sf,"now"),me(_f,"clearNow"),me(Af,"Timer"),Af.prototype=Lf.prototype={constructor:Af,restart:me(function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Sf():+r)+(null==e?0:+e),this._next||zf===this||(zf?zf._next=this:Ff=this,zf=this),this._call=t,this._time=r,Df()},"restart"),stop:me(function(){this._call&&(this._call=null,this._time=1/0,Df())},"stop")},me(Lf,"timer"),me(Nf,"timerFlush"),me(If,"wake"),me(Rf,"poke"),me(Mf,"nap"),me(Df,"sleep")});function Hf(e,r,t){var n=new Af;return r=null==r?0:+r,n.restart(t=>{n.stop(),e(t+r)},r,t),n}var Vf=b(()=>{Yf(),me(Hf,"default")}),Xf=b(()=>{Yf(),Vf()});function Kf(t,e,r,n,i,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};tm(t,r,{name:e,index:n,group:i,on:em,tween:rm,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:nm})}function Zf(t,e){if((t=Jf(t,e)).state>nm)throw new Error("too late; already scheduled");return t}function Qf(t,e){if((t=Jf(t,e)).state>sm)throw new Error("too late; already running");return t}function Jf(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function tm(a,s,o){var l,c=a.__transition;function t(t){o.state=im,o.timer.restart(h,o.delay,o.time),o.delay<=t&&h(t-o.delay)}function h(t){var e,r,n,i;if(o.state!==im)return d();for(e in c)if(i=c[e],i.name===o.name){if(i.state===sm)return Hf(h);i.state===om?(i.state=cm,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[e]):+e<s&&(i.state=cm,i.timer.stop(),i.on.call("cancel",a,a.__data__,i.index,i.group),delete c[e])}if(Hf(function(){o.state===sm&&(o.state=om,o.timer.restart(u,o.delay,o.time),u(t))}),o.state=am,o.on.call("start",a,a.__data__,o.index,o.group),o.state===am){for(o.state=sm,l=new Array(n=o.tween.length),e=0,r=-1;e<n;++e)(i=o.tween[e].value.call(a,a.__data__,o.index,o.group))&&(l[++r]=i);l.length=r+1}}function u(t){for(var e=t<o.duration?o.ease.call(null,t/o.duration):(o.timer.restart(d),o.state=lm,1),r=-1,n=l.length;++r<n;)l[r].call(a,e);o.state===lm&&(o.on.call("end",a,a.__data__,o.index,o.group),d())}function d(){for(var t in o.state=cm,o.timer.stop(),delete c[s],c)return;delete a.__transition}(c[s]=o).timer=Lf(t,0,o.time),me(t,"schedule"),me(h,"start"),me(u,"tick"),me(d,"stop")}var em,rm,nm,im,am,sm,om,lm,cm,hm=b(()=>{Ad(),Xf(),em=Ed("start","end","cancel","interrupt"),rm=[],nm=0,im=1,am=2,sm=3,om=4,lm=5,cm=6,me(Kf,"default"),me(Zf,"init"),me(Qf,"set"),me(Jf,"get"),me(tm,"create")});function um(t,e){var r,n,i,a=t.__transition,s=!0;if(a){for(i in e=null==e?null:e+"",a)(r=a[i]).name!==e?s=!1:(n=am<r.state&&r.state<lm,r.state=cm,r.timer.stop(),r.on.call(n?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[i]);s&&delete t.__transition}}var dm=b(()=>{hm(),me(um,"default")});function pm(t){return this.each(function(){um(this,t)})}var gm=b(()=>{dm(),me(pm,"default")});function fm(i,a){var s,o;return function(){var t=Qf(this,i),e=t.tween;if(e!==s)for(var r=0,n=(o=s=e).length;r<n;++r)if(o[r].name===a){(o=o.slice()).splice(r,1);break}t.tween=o}}function mm(a,s,o){var l,c;if("function"!=typeof o)throw new Error;return function(){var t=Qf(this,a),e=t.tween;if(e!==l){c=(l=e).slice();for(var r={name:s,value:o},n=0,i=c.length;n<i;++n)if(c[n].name===s){c[n]=r;break}n===i&&c.push(r)}t.tween=c}}function ym(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n,i=Jf(this.node(),r).tween,a=0,s=i.length;a<s;++a)if((n=i[a]).name===t)return n.value;return null}return this.each((null==e?fm:mm)(r,t,e))}function vm(t,e,r){var n=t._id;return t.each(function(){var t=Qf(this,n);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return Jf(t,n).value[e]}}var xm=b(()=>{hm(),me(fm,"tweenRemove"),me(mm,"tweenFunction"),me(ym,"default"),me(vm,"tweenValue")});function bm(t,e){var r;return("number"==typeof e?X1:e instanceof Lg?z1:(r=Lg(e))?(e=r,z1):ef)(t,e)}var wm=b(()=>{C1(),Cf(),me(bm,"default")});function km(t){return function(){this.removeAttribute(t)}}function Tm(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Em(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttribute(e);return t===s?null:t===i?a:a=r(i=t,n)}}function Cm(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttributeNS(e.space,e.local);return t===s?null:t===i?a:a=r(i=t,n)}}function Sm(n,i,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttribute(n):(t=this.getAttribute(n))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=i(s=t,r))}}function _m(n,i,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttributeNS(n.space,n.local):(t=this.getAttributeNS(n.space,n.local))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=i(s=t,r))}}function Am(t,e){var r=Nd(t),n="transform"===r?bf:bm;return this.attrTween(t,"function"==typeof e?(r.local?_m:Sm)(r,n,vm(this,"attr."+t,e)):null==e?(r.local?Tm:km)(r):(r.local?Cm:Em)(r,n,e))}var Lm=b(()=>{Cf(),xg(),xm(),wm(),me(km,"attrRemove"),me(Tm,"attrRemoveNS"),me(Em,"attrConstant"),me(Cm,"attrConstantNS"),me(Sm,"attrFunction"),me(_m,"attrFunctionNS"),me(Am,"default")});function Nm(e,r){return function(t){this.setAttribute(e,r.call(this,t))}}function Im(e,r){return function(t){this.setAttributeNS(e.space,e.local,r.call(this,t))}}function Rm(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Im(e,t):n}return me(t,"tween"),t._value=r,t}function Mm(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Nm(e,t):n}return me(t,"tween"),t._value=r,t}function Dm(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return t=Nd(t),this.tween(r,(t.local?Rm:Mm)(t,e))}var Om=b(()=>{xg(),me(Nm,"attrInterpolate"),me(Im,"attrInterpolateNS"),me(Rm,"attrTweenNS"),me(Mm,"attrTween"),me(Dm,"default")});function Pm(t,e){return function(){Zf(this,t).delay=+e.apply(this,arguments)}}function Bm(t,e){return e=+e,function(){Zf(this,t).delay=e}}function $m(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Pm:Bm)(e,t)):Jf(this.node(),e).delay}var Fm=b(()=>{hm(),me(Pm,"delayFunction"),me(Bm,"delayConstant"),me($m,"default")});function zm(t,e){return function(){Qf(this,t).duration=+e.apply(this,arguments)}}function Gm(t,e){return e=+e,function(){Qf(this,t).duration=e}}function Um(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?zm:Gm)(e,t)):Jf(this.node(),e).duration}var qm=b(()=>{hm(),me(zm,"durationFunction"),me(Gm,"durationConstant"),me(Um,"default")});function jm(t,e){if("function"!=typeof e)throw new Error;return function(){Qf(this,t).ease=e}}function Wm(t){var e=this._id;return arguments.length?this.each(jm(e,t)):Jf(this.node(),e).ease}var Ym=b(()=>{hm(),me(jm,"easeConstant"),me(Wm,"default")});function Hm(e,r){return function(){var t=r.apply(this,arguments);if("function"!=typeof t)throw new Error;Qf(this,e).ease=t}}function Vm(t){if("function"!=typeof t)throw new Error;return this.each(Hm(this._id,t))}var Xm=b(()=>{hm(),me(Hm,"easeVarying"),me(Vm,"default")});function Km(t){"function"!=typeof t&&(t=Xd(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a,s=e[i],o=s.length,l=n[i]=[],c=0;c<o;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new By(n,this._parents,this._name,this._id)}var Zm=b(()=>{xg(),Uy(),me(Km,"default")});function Qm(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),s=0;s<i;++s)for(var o,l=e[s],c=r[s],h=l.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=l[d]||c[d])&&(u[d]=o);for(;s<n;++s)a[s]=e[s];return new By(a,this._parents,this._name,this._id)}var Jm=b(()=>{Uy(),me(Qm,"default")});function ty(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return!(t=0<=e?t.slice(0,e):t)||"start"===t})}function ey(r,n,i){var a,s,o=ty(n)?Zf:Qf;return function(){var t=o(this,r),e=t.on;e!==a&&(s=(a=e).copy()).on(n,i),t.on=s}}function ry(t,e){var r=this._id;return arguments.length<2?Jf(this.node(),r).on.on(t):this.each(ey(r,t,e))}var ny=b(()=>{hm(),me(ty,"start"),me(ey,"onFunction"),me(ry,"default")});function iy(r){return function(){var t,e=this.parentNode;for(t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function ay(){return this.on("end.remove",iy(this._id))}var sy=b(()=>{me(iy,"removeFunction"),me(ay,"default")});function oy(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Bd(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var o,l,c=n[s],h=c.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=c[d])&&(l=t.call(o,o.__data__,d,c))&&("__data__"in o&&(l.__data__=o.__data__),u[d]=l,Kf(u[d],e,r,d,u,Jf(o,r)));return new By(a,this._parents,e,r)}var ly=b(()=>{xg(),Uy(),hm(),me(oy,"default")});function cy(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=jd(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o<i;++o)for(var l,c=n[o],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var d,p=t.call(l,l.__data__,u,c),g=Jf(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&Kf(d,e,r,f,p,g);a.push(p),s.push(l)}return new By(a,s,e,r)}var hy=b(()=>{xg(),Uy(),hm(),me(cy,"default")});function uy(){return new dy(this._groups,this._parents)}var dy,py=b(()=>{xg(),dy=mg.prototype.constructor,me(uy,"default")});function gy(r,n){var i,a,s;return function(){var t=s0(this,r),e=(this.style.removeProperty(r),s0(this,r));return t===e?null:t===i&&e===a?s:s=n(i=t,a=e)}}function fy(t){return function(){this.style.removeProperty(t)}}function my(e,r,n){var i,a,s=n+"";return function(){var t=s0(this,e);return t===s?null:t===i?a:a=r(i=t,n)}}function yy(n,i,a){var s,o,l;return function(){var t=s0(this,n),e=a(this),r=e+"";return null==e&&(this.style.removeProperty(n),r=e=s0(this,n)),t===r?null:t===s&&r===o?l:(o=r,l=i(s=t,e))}}function vy(n,i){var a,s,o,l,c="style."+i,h="end."+c;return function(){var t=Qf(this,n),e=t.on,r=null==t.value[c]?l=l||fy(i):void 0;e===a&&o===r||(s=(a=e).copy()).on(h,o=r),t.on=s}}function xy(t,e,r){var n="transform"==(t+="")?xf:bm;return null==e?this.styleTween(t,gy(t,n)).on("end.style."+t,fy(t)):"function"==typeof e?this.styleTween(t,yy(t,n,vm(this,"style."+t,e))).each(vy(this._id,t)):this.styleTween(t,my(t,n,e),r).on("end.style."+t,null)}var by=b(()=>{Cf(),xg(),hm(),xm(),wm(),me(gy,"styleNull"),me(fy,"styleRemove"),me(my,"styleConstant"),me(yy,"styleFunction"),me(vy,"styleMaybeRemove"),me(xy,"default")});function wy(e,r,n){return function(t){this.style.setProperty(e,r.call(this,t),n)}}function ky(e,r,n){var i,a;function t(){var t=r.apply(this,arguments);return i=t!==a?(a=t)&&wy(e,t,n):i}return me(t,"tween"),t._value=r,t}function Ty(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;return this.tween(n,ky(t,e,r??""))}var Ey=b(()=>{me(wy,"styleInterpolate"),me(ky,"styleTween"),me(Ty,"default")});function Cy(t){return function(){this.textContent=t}}function Sy(e){return function(){var t=e(this);this.textContent=t??""}}function _y(t){return this.tween("text","function"==typeof t?Sy(vm(this,"text",t)):Cy(null==t?"":t+""))}var Ay=b(()=>{xm(),me(Cy,"textConstant"),me(Sy,"textFunction"),me(_y,"default")});function Ly(e){return function(t){this.textContent=e.call(this,t)}}function Ny(e){var r,n;function t(){var t=e.apply(this,arguments);return r=t!==n?(n=t)&&Ly(t):r}return me(t,"tween"),t._value=e,t}function Iy(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ny(t))}var Ry=b(()=>{me(Ly,"textInterpolate"),me(Ny,"textTween"),me(Iy,"default")});function My(){for(var t=this._name,e=this._id,r=++zy,n=this._groups,i=n.length,a=0;a<i;++a)for(var s,o=n[a],l=o.length,c=0;c<l;++c)(s=o[c])&&Kf(s,t,r,c,o,{time:(s=Jf(s,e)).time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease});return new By(n,this._parents,t,r)}var Dy=b(()=>{Uy(),hm(),me(My,"default")});function Oy(){var i,a,s=this,o=s._id,l=s.size();return new Promise(function(t,e){var r={value:e},n={value:me(function(){0==--l&&t()},"value")};s.each(function(){var t=Qf(this,o),e=t.on;e!==i&&((a=(i=e).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(n)),t.on=a}),0===l&&t()})}var Py=b(()=>{hm(),me(Oy,"default")});function By(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function $y(t){return mg().transition(t)}function Fy(){return++zy}var zy,Gy,Uy=b(()=>{xg(),Lm(),Om(),Fm(),qm(),Ym(),Xm(),Zm(),Jm(),ny(),sy(),ly(),hy(),py(),by(),Ey(),Ay(),Ry(),Dy(),xm(),Py(),zy=0,me(By,"Transition"),me($y,"transition"),me(Fy,"newId"),Gy=mg.prototype,By.prototype=$y.prototype={constructor:By,select:oy,selectAll:cy,selectChild:Gy.selectChild,selectChildren:Gy.selectChildren,filter:Km,merge:Qm,selection:uy,transition:My,call:Gy.call,nodes:Gy.nodes,node:Gy.node,size:Gy.size,empty:Gy.empty,each:Gy.each,on:ry,attr:Am,attrTween:Dm,style:xy,styleTween:Ty,text:_y,textTween:Iy,remove:ay,tween:ym,delay:$m,duration:Um,ease:Wm,easeVarying:Vm,end:Oy,[Symbol.iterator]:Gy[Symbol.iterator]}});function qy(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var jy=b(()=>{me(qy,"cubicInOut")}),Wy=b(()=>{jy()});function Yy(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function Hy(t){var e,r;t=t instanceof By?(e=t._id,t._name):(e=++zy,(r=Vy).time=Sf(),null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s,o=n[a],l=o.length,c=0;c<l;++c)(s=o[c])&&Kf(s,t,e,c,o,r||Yy(s,e));return new By(n,this._parents,t,e)}var Vy,Xy=b(()=>{Uy(),hm(),Wy(),Xf(),Vy={time:null,delay:0,duration:250,ease:qy},me(Yy,"inherit"),me(Hy,"default")}),Ky=b(()=>{xg(),gm(),Xy(),mg.prototype.interrupt=pm,mg.prototype.transition=Hy}),Zy=b(()=>{Ky()}),Qy=b(()=>{}),Jy=b(()=>{}),t2=b(()=>{});function e2(t){return[+t[0],+t[1]]}function r2(t){return[e2(t[0]),e2(t[1])]}function n2(t){return{type:t}}var i2,a2,s2,o2=b(()=>{Zy(),Qy(),Jy(),t2(),{abs:i2,max:a2,min:s2}=Math,me(e2,"number1"),me(r2,"number2"),["w","e"].map(n2),me(function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),me(function(t){return t&&[t[0][0],t[1][0]]},"output"),["n","s"].map(n2),me(function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),me(function(t){return t&&[t[0][1],t[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(n2),me(function(t){return null==t?null:r2(t)},"input"),me(function(t){return t},"output"),me(n2,"type")}),l2=b(()=>{o2()});function c2(r){this._+=r[0];for(let t=1,e=r.length;t<e;++t)this._+=arguments[t]+r[t]}function h2(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return c2;let n=10**e;return function(r){this._+=r[0];for(let t=1,e=r.length;t<e;++t)this._+=Math.round(arguments[t]*n)/n+r[t]}}function u2(){return new m2}var d2,p2,g2,f2,m2,y2=b(()=>{d2=Math.PI,f2=(p2=2*d2)-(g2=1e-6),me(c2,"append"),me(h2,"appendRound"),m2=class{static{me(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?c2:h2(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,n){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(t,e,r,n,i,a){this._append`C${+t},${+e},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,r,n,i){if(t=+t,e=+e,r=+r,n=+n,(i=+i)<0)throw new Error("negative radius: "+i);var a,s,o=this._x1,l=this._y1,c=r-t,h=n-e,u=o-t,d=l-e,p=u*u+d*d;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:g2<p&&(Math.abs(d*c-h*u)>g2&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan((d2-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,Math.abs(p-1)>g2&&this._append`L${t+p*u},${e+p*d}`,this._append`A${i},${i},0,0,${+(u*o<d*r)},${this._x1=t+n*c},${this._y1=e+n*h}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,r,n,i,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error("negative radius: "+r);var s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,c=e+o,h=1^a,a=a?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>g2||Math.abs(this._y1-c)>g2)&&this._append`L${l},${c}`,r&&((a=a<0?a%p2+p2:a)>f2?this._append`A${r},${r},0,1,${h},${t-s},${e-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:g2<a&&this._append`A${r},${r},0,${+(d2<=a)},${h},${this._x1=t+r*Math.cos(i)},${this._y1=e+r*Math.sin(i)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}},me(u2,"path"),u2.prototype=m2.prototype}),v2=b(()=>{y2()}),x2=b(()=>{}),b2=b(()=>{}),w2=b(()=>{}),k2=b(()=>{}),T2=b(()=>{}),E2=b(()=>{}),C2=b(()=>{});function S2(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function _2(t,e){var r;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(r=t.slice(0,e)).length?r[0]+r.slice(2):r,+t.slice(e+1)]}var A2=b(()=>{me(S2,"default"),me(_2,"formatDecimalParts")});function L2(t){return(t=_2(Math.abs(t)))?t[1]:NaN}var N2=b(()=>{A2(),me(L2,"default")});function I2(o,l){return function(t,e){for(var r=t.length,n=[],i=0,a=o[0],s=0;0<r&&0<a&&(e<s+a+1&&(a=Math.max(1,e-s)),n.push(t.substring(r-=a,r+a)),!((s+=a+1)>e));)a=o[i=(i+1)%o.length];return n.reverse().join(l)}}var R2=b(()=>{me(I2,"default")});function M2(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var D2=b(()=>{me(M2,"default")});function O2(t){var e;if(e=B2.exec(t))return new P2({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function P2(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}var B2,$2=b(()=>{B2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,me(O2,"formatSpecifier"),O2.prototype=P2.prototype,me(P2,"FormatSpecifier"),P2.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}});function F2(t){t:for(var e,r=t.length,n=1,i=-1;n<r;++n)switch(t[n]){case".":i=e=n;break;case"0":0===i&&(i=n),e=n;break;default:if(!+t[n])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}var z2=b(()=>{me(F2,"default")});function G2(t,e){var r,n,i=_2(t,e);return i?(r=i[0],(i=(i=i[1])-(U2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n<i?r+new Array(i-n+1).join("0"):0<i?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+_2(t,Math.max(0,e+i-1))[0]):t+""}var U2,q2=b(()=>{A2(),me(G2,"default")});function j2(t,e){var r;return(e=_2(t,e))?(r=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+r:r.length>e+1?r.slice(0,e+1)+"."+r.slice(e+1):r+new Array(e-r.length+2).join("0")):t+""}var W2,Y2=b(()=>{A2(),me(j2,"default")}),H2=b(()=>{A2(),q2(),Y2(),W2={"%":me((t,e)=>(100*t).toFixed(e),"%"),b:me(t=>Math.round(t).toString(2),"b"),c:me(t=>t+"","c"),d:S2,e:me((t,e)=>t.toExponential(e),"e"),f:me((t,e)=>t.toFixed(e),"f"),g:me((t,e)=>t.toPrecision(e),"g"),o:me(t=>Math.round(t).toString(8),"o"),p:me((t,e)=>j2(100*t,e),"p"),r:j2,s:G2,X:me(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:me(t=>Math.round(t).toString(16),"x")}});function V2(t){return t}var X2=b(()=>{me(V2,"default")});function K2(t){var k=void 0===t.grouping||void 0===t.thousands?V2:I2(Z2.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",T=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?V2:M2(Z2.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",C=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function s(t){var c=(t=O2(t)).fill,h=t.align,u=t.sign,e=t.symbol,d=t.zero,p=t.width,g=t.comma,f=t.precision,m=t.trim,y=t.type,v=("n"===y?(g=!0,y="g"):W2[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===e?n:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===e?i:/[%p]/.test(y)?a:"",b=W2[y],w=/[defgprs%]/.test(y);function r(t){var e,r,n,i=v,a=x;if("c"===y)a=b(t)+a,t="";else{var s=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:b(Math.abs(t),f),m&&(t=F2(t)),i=((s=(!s||0!=+t||"+"===u)&&s)?"("===u?u:C:"-"===u||"("===u?"":u)+i,a=("s"===y?Q2[8+U2/3]:"")+a+(s&&"("===u?")":""),w)for(e=-1,r=t.length;++e<r;)if((n=t.charCodeAt(e))<48||57<n){a=(46===n?T+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}g&&!d&&(t=k(t,1/0));var o=i.length+t.length+a.length,l=o<p?new Array(p-o+1).join(c):"";switch(g&&d&&(t=k(l+t,l.length?p-a.length:1/0),l=""),h){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,o=l.length>>1)+i+t+a+l.slice(o);break;default:t=l+i+t+a}return E(t)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),me(r,"format"),r.toString=function(){return t+""},r}function e(t,e){var r=s(((t=O2(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(L2(e)/3))),n=Math.pow(10,-t),i=Q2[8+t/3];return function(t){return r(n*t)+i}}return me(s,"newFormat"),me(e,"formatPrefix"),{format:s,formatPrefix:e}}var Z2,Q2,J2=b(()=>{N2(),R2(),D2(),$2(),z2(),H2(),q2(),X2(),Z2=Array.prototype.map,Q2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],me(K2,"default")});function tv(t){return ev=K2(t),rv=ev.format,nv=ev.formatPrefix,ev}var ev,rv,nv,iv=b(()=>{J2(),tv({thousands:",",grouping:[3],currency:["$",""]}),me(tv,"defaultLocale")});function av(t){return Math.max(0,-L2(Math.abs(t)))}var sv=b(()=>{N2(),me(av,"default")});function ov(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(L2(e)/3)))-L2(Math.abs(t)))}var lv=b(()=>{N2(),me(ov,"default")});function cv(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,L2(e)-L2(t))+1}var hv=b(()=>{N2(),me(cv,"default")}),uv=b(()=>{iv(),$2(),sv(),lv(),hv()}),dv=b(()=>{});function pv(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;0<=--n;)e+=r[n].value;else e=1;t.value=e}function gv(){return this.eachAfter(pv)}var fv=b(()=>{me(pv,"count"),me(gv,"default")});function mv(t,e){let r=-1;for(var n of this)t.call(e,n,++r,this);return this}var yv=b(()=>{me(mv,"default")});function vv(t,e){for(var r,n,i,a=[this],s=-1;r=a.pop();)if(t.call(e,r,++s,this),n=r.children)for(i=n.length-1;0<=i;--i)a.push(n[i]);return this}var xv=b(()=>{me(vv,"default")});function bv(t,e){for(var r,n,i,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),r=a.children)for(n=0,i=r.length;n<i;++n)s.push(r[n]);for(;a=o.pop();)t.call(e,a,++l,this);return this}var wv=b(()=>{me(bv,"default")});function kv(t,e){let r=-1;for(var n of this)if(t.call(e,n,++r,this))return n}var Tv=b(()=>{me(kv,"default")});function Ev(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,r=t.children,n=r&&r.length;0<=--n;)e+=r[n].value;t.value=e})}var Cv=b(()=>{me(Ev,"default")});function Sv(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var _v=b(()=>{me(Sv,"default")});function Av(t){for(var e=this,r=Lv(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n}function Lv(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;for(t=r.pop(),e=n.pop();t===e;)i=t,t=r.pop(),e=n.pop();return i}var Nv=b(()=>{me(Av,"default"),me(Lv,"leastCommonAncestor")});function Iv(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}var Rv=b(()=>{me(Iv,"default")});function Mv(){return Array.from(this)}var Dv=b(()=>{me(Mv,"default")});function Ov(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var Pv=b(()=>{me(Ov,"default")});function Bv(){var e=this,r=[];return e.each(function(t){t!==e&&r.push({source:t.parent,target:t})}),r}var $v=b(()=>{me(Bv,"default")});function*Fv(){var t,e,r,n,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,r=t.children)for(n=0,i=r.length;n<i;++n)a.push(r[n])}while(a.length)}var zv=b(()=>{me(Fv,"default")});function Gv(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=jv)):void 0===e&&(e=qv);for(var r,n,i,a,s,o=[t=new Hv(t)];r=o.pop();)if((i=e(r.data))&&(s=(i=Array.from(i)).length))for(r.children=i,a=s-1;0<=a;--a)o.push(n=i[a]=new Hv(i[a])),n.parent=r,n.depth=r.depth+1;return t.eachBefore(Yv)}function Uv(){return Gv(this).eachBefore(Wv)}function qv(t){return t.children}function jv(t){return Array.isArray(t)?t[1]:null}function Wv(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Yv(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function Hv(t){this.data=t,this.depth=this.height=0,this.parent=null}var Vv=b(()=>{fv(),yv(),xv(),wv(),Tv(),Cv(),_v(),Nv(),Rv(),Dv(),Pv(),$v(),zv(),me(Gv,"hierarchy"),me(Uv,"node_copy"),me(qv,"objectChildren"),me(jv,"mapChildren"),me(Wv,"copyData"),me(Yv,"computeHeight"),me(Hv,"Node"),Hv.prototype=Gv.prototype={constructor:Hv,count:gv,each:mv,eachAfter:bv,eachBefore:vv,find:kv,sum:Ev,sort:Sv,path:Av,ancestors:Iv,descendants:Mv,leaves:Ov,links:Bv,copy:Uv,[Symbol.iterator]:Fv}});function Xv(t){if("function"!=typeof t)throw new Error;return t}var Kv=b(()=>{me(Xv,"required")});function Zv(){return 0}function Qv(t){return function(){return t}}var Jv=b(()=>{me(Zv,"constantZero"),me(Qv,"default")});function tx(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}var ex=b(()=>{me(tx,"default")});function rx(t,e,r,n,i){for(var a,s=t.children,o=-1,l=s.length,c=t.value&&(n-e)/t.value;++o<l;)(a=s[o]).y0=r,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var nx=b(()=>{me(rx,"default")});function ix(t,e,r,n,i){for(var a,s=t.children,o=-1,l=s.length,c=t.value&&(i-r)/t.value;++o<l;)(a=s[o]).x0=e,a.x1=n,a.y0=r,a.y1=r+=a.value*c}var ax=b(()=>{me(ix,"default")});function sx(t,e,r,n,i,a){for(var s,o,l,c,h,u,d,p,g,f,m,y=[],v=e.children,x=0,b=0,w=v.length,k=e.value;x<w;){for(l=i-r,c=a-n;!(h=v[b++].value)&&b<w;);for(m=(u=d=h)*h*(f=Math.max(c/l,l/c)/(k*t)),g=Math.max(d/m,m/u);b<w;++b){if(h+=o=v[b].value,o<u&&(u=o),d<o&&(d=o),m=h*h*f,g<(p=Math.max(d/m,m/u))){h-=o;break}g=p}y.push(s={value:h,dice:l<c,children:v.slice(x,b)}),s.dice?rx(s,r,n,i,k?n+=c*h/k:a):ix(s,r,n,k?r+=l*h/k:i,a),k-=h,x=b}return y}var ox,lx,cx=b(()=>{nx(),ax(),ox=(1+Math.sqrt(5))/2,me(sx,"squarifyRatio"),lx=me(function e(a){function t(t,e,r,n,i){sx(a,t,e,r,n,i)}return me(t,"squarify"),t.ratio=function(t){return e(1<(t=+t)?t:1)},t},"custom")(ox)});function hx(){var s=lx,e=!1,r=1,n=1,o=[0],l=Zv,c=Zv,h=Zv,u=Zv,d=Zv;function i(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(a),o=[0],e&&t.eachBefore(tx),t}function a(t){var e=o[t.depth],r=t.x0+e,n=t.y0+e,i=t.x1-e,a=t.y1-e;i<r&&(r=i=(r+i)/2),a<n&&(n=a=(n+a)/2),t.x0=r,t.y0=n,t.x1=i,t.y1=a,t.children&&(e=o[t.depth+1]=l(t)/2,r+=d(t)-e,n+=c(t)-e,(i-=h(t)-e)<r&&(r=i=(r+i)/2),(a-=u(t)-e)<n&&(n=a=(n+a)/2),s(t,r,n,i,a))}return me(i,"treemap"),me(a,"positionNode"),i.round=function(t){return arguments.length?(e=!!t,i):e},i.size=function(t){return arguments.length?(r=+t[0],n=+t[1],i):[r,n]},i.tile=function(t){return arguments.length?(s=Xv(t),i):s},i.padding=function(t){return arguments.length?i.paddingInner(t).paddingOuter(t):i.paddingInner()},i.paddingInner=function(t){return arguments.length?(l="function"==typeof t?t:Qv(+t),i):l},i.paddingOuter=function(t){return arguments.length?i.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):i.paddingTop()},i.paddingTop=function(t){return arguments.length?(c="function"==typeof t?t:Qv(+t),i):c},i.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:Qv(+t),i):h},i.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Qv(+t),i):u},i.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Qv(+t),i):d},i}var ux=b(()=>{ex(),cx(),Kv(),Jv(),me(hx,"default")}),dx=b(()=>{Vv(),ux()}),px=b(()=>{}),gx=b(()=>{});function fx(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var mx=b(()=>{me(fx,"initRange")});function yx(){var r=new Gu,n=[],i=[],a=vx;function s(t){let e=r.get(t);if(void 0===e){if(a!==vx)return a;r.set(t,e=n.push(t)-1)}return i[e%i.length]}return me(s,"scale"),s.domain=function(t){if(!arguments.length)return n.slice();n=[],r=new Gu;for(var e of t)r.has(e)||r.set(e,n.push(e)-1);return s},s.range=function(t){return arguments.length?(i=Array.from(t),s):i.slice()},s.unknown=function(t){return arguments.length?(a=t,s):a},s.copy=function(){return yx(n,i).unknown(a)},fx.apply(s,arguments),s}var vx,xx=b(()=>{nd(),mx(),vx=Symbol("implicit"),me(yx,"ordinal")});function bx(){var i,a,t=yx().unknown(void 0),s=t.domain,o=t.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function e(){var t=s().length,e=c<l,r=e?c:l,n=(i=((n=e?l:c)-r)/Math.max(1,t-u+2*d),h&&(i=Math.floor(i)),r+=(n-r-i*(t-u))*p,a=i*(1-u),h&&(r=Math.round(r),a=Math.round(a)),ed(t).map(function(t){return r+i*t}));return o(e?n.reverse():n)}return delete t.unknown,me(e,"rescale"),t.domain=function(t){return(arguments.length?(s(t),e):s)()},t.range=function(t){return arguments.length?([l,c]=t,l=+l,c=+c,e()):[l,c]},t.rangeRound=function(t){return[l,c]=t,l=+l,c=+c,h=!0,e()},t.bandwidth=function(){return a},t.step=function(){return i},t.round=function(t){return arguments.length?(h=!!t,e()):h},t.padding=function(t){return arguments.length?(u=Math.min(1,d=+t),e()):u},t.paddingInner=function(t){return arguments.length?(u=Math.min(1,t),e()):u},t.paddingOuter=function(t){return arguments.length?(d=+t,e()):d},t.align=function(t){return arguments.length?(p=Math.max(0,Math.min(1,t)),e()):p},t.copy=function(){return bx(s(),[l,c]).round(h).paddingInner(u).paddingOuter(d).align(p)},fx.apply(e(),arguments)}var wx=b(()=>{nd(),mx(),xx(),me(bx,"band")});function kx(t){return function(){return t}}var Tx=b(()=>{me(kx,"constants")});function Ex(t){return+t}var Cx=b(()=>{me(Ex,"number")});function Sx(t){return t}function _x(e,r){return(r-=e=+e)?function(t){return(t-e)/r}:kx(isNaN(r)?NaN:.5)}function Ax(e,r){var t;return r<e&&(t=e,e=r,r=t),function(t){return Math.max(e,Math.min(r,t))}}function Lx(t,e,r){var n=t[0],t=t[1],i=e[0],e=e[1],i=t<n?(n=_x(t,n),r(e,i)):(n=_x(n,t),r(i,e));return function(t){return i(n(t))}}function Nx(r,t,e){var n=Math.min(r.length,t.length)-1,i=new Array(n),a=new Array(n),s=-1;for(r[n]<r[0]&&(r=r.slice().reverse(),t=t.slice().reverse());++s<n;)i[s]=_x(r[s],r[s+1]),a[s]=e(t[s],t[s+1]);return function(t){var e=Du(r,t,1,n)-1;return a[e](i[e](t))}}function Ix(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Rx(){var r,n,e,i,a,s,o=Dx,l=Dx,c=sf,h=Sx;function u(){var t=Math.min(o.length,l.length);return h!==Sx&&(h=Ax(o[0],o[t-1])),i=2<t?Nx:Lx,a=s=null,d}function d(t){return null==t||isNaN(t=+t)?e:(a=a||i(o.map(r),l,c))(r(h(t)))}return me(u,"rescale"),me(d,"scale"),d.invert=function(t){return h(n((s=s||i(l,o.map(r),X1))(t)))},d.domain=function(t){return arguments.length?(o=Array.from(t,Ex),u()):o.slice()},d.range=function(t){return arguments.length?(l=Array.from(t),u()):l.slice()},d.rangeRound=function(t){return l=Array.from(t),c=lf,u()},d.clamp=function(t){return arguments.length?(h=!!t||Sx,u()):h!==Sx},d.interpolate=function(t){return arguments.length?(c=t,u()):c},d.unknown=function(t){return arguments.length?(e=t,d):e},function(t,e){return r=t,n=e,u()}}function Mx(){return Rx()(Sx,Sx)}var Dx,Ox=b(()=>{nd(),Cf(),Tx(),Cx(),Dx=[0,1],me(Sx,"identity"),me(_x,"normalize"),me(Ax,"clamper"),me(Lx,"bimap"),me(Nx,"polymap"),me(Ix,"copy"),me(Rx,"transformer"),me(Mx,"continuous")});function Px(t,e,r,n){var i,a=Yu(t,e,r);switch((n=O2(n??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=ov(a,s))||(n.precision=i),nv(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=cv(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=av(a))||(n.precision=i-2*("%"===n.type))}return rv(n)}var Bx=b(()=>{nd(),uv(),me(Px,"tickFormat")});function $x(c){var h=c.domain;return c.ticks=function(t){var e=h();return ju(e[0],e[e.length-1],t??10)},c.tickFormat=function(t,e){var r=h();return Px(r[0],r[r.length-1],t??10,e)},c.nice=function(t){null==t&&(t=10);var e,r,n=h(),i=0,a=n.length-1,s=n[i],o=n[a],l=10;for(o<s&&(r=s,s=o,o=r,r=i,i=a,a=r);0<l--;){if((r=Wu(s,o,t))===e)return n[i]=s,n[a]=o,h(n);if(0<r)s=Math.floor(s/r)*r,o=Math.ceil(o/r)*r;else{if(!(r<0))break;s=Math.ceil(s*r)/r,o=Math.floor(o*r)/r}e=r}return c},c}function Fx(){var t=Mx();return t.copy=function(){return Ix(t,Fx())},fx.apply(t,arguments),$x(t)}var zx=b(()=>{nd(),Ox(),mx(),Bx(),me($x,"linearish"),me(Fx,"linear")});function Gx(t,e){var r,n=0,i=(t=t.slice()).length-1,a=t[n],s=t[i];return s<a&&(r=n,n=i,i=r,r=a,a=s,s=r),t[n]=e.floor(a),t[i]=e.ceil(s),t}var Ux=b(()=>{me(Gx,"nice")});function qx(a,s,r,n){function o(t){return a(t=0===arguments.length?new Date:new Date(+t)),t}return me(o,"interval"),o.floor=t=>(a(t=new Date(+t)),t),o.ceil=t=>(a(t=new Date(t-1)),s(t,1),a(t),t),o.round=t=>{var e=o(t),r=o.ceil(t);return t-e<r-t?e:r},o.offset=(t,e)=>(s(t=new Date(+t),null==e?1:Math.floor(e)),t),o.range=(t,e,r)=>{var n,i=[];if(t=o.ceil(t),r=null==r?1:Math.floor(r),t<e&&0<r)for(;i.push(n=new Date(+t)),s(t,r),a(t),n<t&&t<e;);return i},o.filter=r=>qx(t=>{if(t<=t)for(;a(t),!r(t);)t.setTime(t-1)},(t,e)=>{if(t<=t)if(e<0)for(;++e<=0;)for(;s(t,-1),!r(t););else for(;0<=--e;)for(;s(t,1),!r(t););}),r&&(o.count=(t,e)=>(jx.setTime(+t),Wx.setTime(+e),a(jx),a(Wx),Math.floor(r(jx,Wx))),o.every=e=>(e=Math.floor(e),isFinite(e)&&0<e?1<e?o.filter(n?t=>n(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}var jx,Wx,Yx,Hx,Vx,Xx,Kx,Zx,Qx,Jx,tb,eb=b(()=>{jx=new Date,Wx=new Date,me(qx,"timeInterval")}),rb=b(()=>{eb(),(Yx=qx(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t)).every=r=>(r=Math.floor(r),isFinite(r)&&0<r?1<r?qx(t=>{t.setTime(Math.floor(t/r)*r)},(t,e)=>{t.setTime(+t+e*r)},(t,e)=>(e-t)/r):Yx:null)}),nb=b(()=>{eb(),(Hx=qx(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds())).range}),ib=b(()=>{eb(),(Vx=qx(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes())).range,(Xx=qx(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())).range}),ab=b(()=>{eb(),(Kx=qx(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours())).range,(Zx=qx(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours())).range}),sb=b(()=>{eb(),(Qx=qx(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1)).range,(Jx=qx(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1)).range,(tb=qx(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5))).range});function ob(e){return qx(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5)}function lb(e){return qx(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}var cb,hb,ub,db,pb,gb,fb,mb,yb,vb,xb,bb,wb,kb,Tb,Eb,Cb,Sb,_b=b(()=>{eb(),me(ob,"timeWeekday"),cb=ob(0),hb=ob(1),ub=ob(2),db=ob(3),pb=ob(4),gb=ob(5),fb=ob(6),cb.range,hb.range,ub.range,db.range,pb.range,gb.range,fb.range,me(lb,"utcWeekday"),mb=lb(0),yb=lb(1),vb=lb(2),xb=lb(3),bb=lb(4),wb=lb(5),kb=lb(6),mb.range,yb.range,vb.range,xb.range,bb.range,wb.range,kb.range}),Ab=b(()=>{eb(),(Tb=qx(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())).range,(Eb=qx(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())).range}),Lb=b(()=>{eb(),(Cb=qx(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear())).every=r=>isFinite(r=Math.floor(r))&&0<r?qx(t=>{t.setFullYear(Math.floor(t.getFullYear()/r)*r),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e*r)}):null,(Sb=qx(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear())).every=r=>isFinite(r=Math.floor(r))&&0<r?qx(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/r)*r),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*r)}):null});function Nb(a,t,e,r,n,i){let s=[[Hx,1,1e3],[Hx,5,5e3],[Hx,15,15e3],[Hx,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[n,1,36e5],[n,3,108e5],[n,6,216e5],[n,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[t,1,2592e6],[t,3,7776e6],[a,1,31536e6]];function o(t,e,r){var n=e<t;return n&&([t,e]=[e,t]),r=(r=r&&"function"==typeof r.range?r:l(t,e,r))?r.range(t,+e+1):[],n?r.reverse():r}function l(t,e,r){var n=Math.abs(e-t)/r,i=Lu(([,,t])=>t).right(s,n);return i===s.length?a.every(Yu(t/31536e6,e/31536e6,r)):0===i?Yx.every(Math.max(Yu(t,e,r),1)):([t,e]=s[n/s[i-1][2]<s[i][2]/n?i-1:i],t.every(e))}return me(o,"ticks"),me(l,"tickInterval"),[o,l]}var Ib,Rb,Mb,Db,Ob=b(()=>{nd(),rb(),nb(),ib(),ab(),sb(),_b(),Ab(),Lb(),me(Nb,"ticker"),[Ib,Rb]=Nb(Sb,Eb,mb,tb,Zx,Xx),[Mb,Db]=Nb(Cb,Tb,cb,Qx,Kx,Vx)}),Pb=b(()=>{rb(),nb(),ib(),ab(),sb(),_b(),Ab(),Lb(),Ob()});function Bb(t){var e;return 0<=t.y&&t.y<100?((e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L)).setFullYear(t.y),e):new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function $b(t){var e;return 0<=t.y&&t.y<100?((e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L))).setUTCFullYear(t.y),e):new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Fb(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function zb(t){var n=t.dateTime,i=t.date,a=t.time,e=t.periods,r=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,c=qb(e),h=jb(e),P=qb(r),B=jb(r),$=qb(s),F=jb(s),z=qb(o),G=jb(o),U=qb(l),q=jb(l),u={a:E,A:C,b:S,B:_,c:null,d:u4,e:u4,f:m4,g:_4,G:L4,H:d4,I:p4,j:g4,L:f4,m:y4,M:v4,p:A,q:L,Q:Q4,s:J4,S:x4,u:b4,U:w4,V:T4,w:E4,W:C4,x:null,X:null,y:S4,Y:A4,Z:N4,"%":Z4},d={a:N,A:I,b:R,B:M,c:null,d:I4,e:I4,f:P4,g:H4,G:X4,H:R4,I:M4,j:D4,L:O4,m:B4,M:$4,p:D,q:O,Q:Q4,s:J4,S:F4,u:z4,U:G4,V:q4,w:j4,W:W4,x:null,X:null,y:Y4,Y:V4,Z:K4,"%":Z4},j={a:y,A:v,b:x,B:b,c:w,d:e4,e:e4,f:o4,g:Zb,G:Kb,H:n4,I:n4,j:r4,L:s4,m:t4,M:i4,p:m,q:Jb,Q:c4,s:h4,S:a4,u:Yb,U:Hb,V:Vb,w:Wb,W:Xb,x:k,X:T,y:Zb,Y:Kb,Z:Qb,"%":l4};function p(l,c){return function(t){var e,r,n,i=[],a=-1,s=0,o=l.length;for(t instanceof Date||(t=new Date(+t));++a<o;)37===l.charCodeAt(a)&&(i.push(l.slice(s,a)),null!=(r=t5[e=l.charAt(++a)])?e=l.charAt(++a):r="e"===e?" ":"0",(n=c[e])&&(e=n(t,r)),i.push(e),s=a+1);return i.push(l.slice(s,a)),i.join("")}}function g(i,a){return function(t){var e,r,n=Fb(1900,void 0,1);if(f(n,i,t+="",0)!=t.length)return null;if("Q"in n)return new Date(n.Q);if("s"in n)return new Date(1e3*n.s+("L"in n?n.L:0));if(!a||"Z"in n||(n.Z=0),"p"in n&&(n.H=n.H%12+12*n.p),void 0===n.m&&(n.m="q"in n?n.q:0),"V"in n){if(n.V<1||53<n.V)return null;"w"in n||(n.w=1),"Z"in n?(e=4<(r=(e=$b(Fb(n.y,0,1))).getUTCDay())||0===r?yb.ceil(e):yb(e),e=Jx.offset(e,7*(n.V-1)),n.y=e.getUTCFullYear(),n.m=e.getUTCMonth(),n.d=e.getUTCDate()+(n.w+6)%7):(e=4<(r=(e=Bb(Fb(n.y,0,1))).getDay())||0===r?hb.ceil(e):hb(e),e=Qx.offset(e,7*(n.V-1)),n.y=e.getFullYear(),n.m=e.getMonth(),n.d=e.getDate()+(n.w+6)%7)}else("W"in n||"U"in n)&&("w"in n||(n.w="u"in n?n.u%7:"W"in n?1:0),r="Z"in n?$b(Fb(n.y,0,1)).getUTCDay():Bb(Fb(n.y,0,1)).getDay(),n.m=0,n.d="W"in n?(n.w+6)%7+7*n.W-(r+5)%7:n.w+7*n.U-(r+6)%7);return("Z"in n?(n.H+=n.Z/100|0,n.M+=n.Z%100,$b):Bb)(n)}}function f(t,e,r,n){for(var i,a,s=0,o=e.length,l=r.length;s<o;){if(l<=n)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(a=j[i in t5?e.charAt(s++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function m(t,e,r){return(e=c.exec(e.slice(r)))?(t.p=h.get(e[0].toLowerCase()),r+e[0].length):-1}function y(t,e,r){return(e=$.exec(e.slice(r)))?(t.w=F.get(e[0].toLowerCase()),r+e[0].length):-1}function v(t,e,r){return(e=P.exec(e.slice(r)))?(t.w=B.get(e[0].toLowerCase()),r+e[0].length):-1}function x(t,e,r){return(e=U.exec(e.slice(r)))?(t.m=q.get(e[0].toLowerCase()),r+e[0].length):-1}function b(t,e,r){return(e=z.exec(e.slice(r)))?(t.m=G.get(e[0].toLowerCase()),r+e[0].length):-1}function w(t,e,r){return f(t,n,e,r)}function k(t,e,r){return f(t,i,e,r)}function T(t,e,r){return f(t,a,e,r)}function E(t){return s[t.getDay()]}function C(t){return r[t.getDay()]}function S(t){return l[t.getMonth()]}function _(t){return o[t.getMonth()]}function A(t){return e[+(12<=t.getHours())]}function L(t){return 1+~~(t.getMonth()/3)}function N(t){return s[t.getUTCDay()]}function I(t){return r[t.getUTCDay()]}function R(t){return l[t.getUTCMonth()]}function M(t){return o[t.getUTCMonth()]}function D(t){return e[+(12<=t.getUTCHours())]}function O(t){return 1+~~(t.getUTCMonth()/3)}return u.x=p(i,u),u.X=p(a,u),u.c=p(n,u),d.x=p(i,d),d.X=p(a,d),d.c=p(n,d),me(p,"newFormat"),me(g,"newParse"),me(f,"parseSpecifier"),me(m,"parsePeriod"),me(y,"parseShortWeekday"),me(v,"parseWeekday"),me(x,"parseShortMonth"),me(b,"parseMonth"),me(w,"parseLocaleDateTime"),me(k,"parseLocaleDate"),me(T,"parseLocaleTime"),me(E,"formatShortWeekday"),me(C,"formatWeekday"),me(S,"formatShortMonth"),me(_,"formatMonth"),me(A,"formatPeriod"),me(L,"formatQuarter"),me(N,"formatUTCShortWeekday"),me(I,"formatUTCWeekday"),me(R,"formatUTCShortMonth"),me(M,"formatUTCMonth"),me(D,"formatUTCPeriod"),me(O,"formatUTCQuarter"),{format:me(function(t){var e=p(t+="",u);return e.toString=function(){return t},e},"format"),parse:me(function(t){var e=g(t+="",!1);return e.toString=function(){return t},e},"parse"),utcFormat:me(function(t){var e=p(t+="",d);return e.toString=function(){return t},e},"utcFormat"),utcParse:me(function(t){var e=g(t+="",!0);return e.toString=function(){return t},e},"utcParse")}}function Gb(t,e,r){var n=t<0?"-":"",i=(t=(n?-t:t)+"").length;return n+(i<r?new Array(r-i+1).join(e)+t:t)}function Ub(t){return t.replace(n5,"\\$&")}function qb(t){return new RegExp("^(?:"+t.map(Ub).join("|")+")","i")}function jb(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function Wb(t,e,r){return(e=e5.exec(e.slice(r,r+1)))?(t.w=+e[0],r+e[0].length):-1}function Yb(t,e,r){return(e=e5.exec(e.slice(r,r+1)))?(t.u=+e[0],r+e[0].length):-1}function Hb(t,e,r){return(e=e5.exec(e.slice(r,r+2)))?(t.U=+e[0],r+e[0].length):-1}function Vb(t,e,r){return(e=e5.exec(e.slice(r,r+2)))?(t.V=+e[0],r+e[0].length):-1}function Xb(t,e,r){return(e=e5.exec(e.slice(r,r+2)))?(t.W=+e[0],r+e[0].length):-1}function Kb(t,e,r){return(e=e5.exec(e.slice(r,r+4)))?(t.y=+e[0],r+e[0].length):-1}function Zb(t,e,r){return(e=e5.exec(e.slice(r,r+2)))?(t.y=+e[0]+(68<+e[0]?1900:2e3),r+e[0].length):-1}function Qb(t,e,r){return(e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6)))?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),r+e[0].length):-1}function Jb(t,e,r){return(e=e5.exec(e.slice(r,r+1)))?(t.q=3*e[0]-3,r+e[0].length):-1}function t4(t,e,r){return(e=e5.exec(e.slice(r,r+2)))?(t.m=e[0]-1,r+e[0].length):-1}function e4(t,e,r){return(e=e5.exec(e.slice(r,r+2)))?(t.d=+e[0],r+e[0].length):-1}function r4(t,e,r){return(e=e5.exec(e.slice(r,r+3)))?(t.m=0,t.d=+e[0],r+e[0].length):-1}function n4(t,e,r){return(e=e5.exec(e.slice(r,r+2)))?(t.H=+e[0],r+e[0].length):-1}function i4(t,e,r){return(e=e5.exec(e.slice(r,r+2)))?(t.M=+e[0],r+e[0].length):-1}function a4(t,e,r){return(e=e5.exec(e.slice(r,r+2)))?(t.S=+e[0],r+e[0].length):-1}function s4(t,e,r){return(e=e5.exec(e.slice(r,r+3)))?(t.L=+e[0],r+e[0].length):-1}function o4(t,e,r){return(e=e5.exec(e.slice(r,r+6)))?(t.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function l4(t,e,r){return(e=r5.exec(e.slice(r,r+1)))?r+e[0].length:-1}function c4(t,e,r){return(e=e5.exec(e.slice(r)))?(t.Q=+e[0],r+e[0].length):-1}function h4(t,e,r){return(e=e5.exec(e.slice(r)))?(t.s=+e[0],r+e[0].length):-1}function u4(t,e){return Gb(t.getDate(),e,2)}function d4(t,e){return Gb(t.getHours(),e,2)}function p4(t,e){return Gb(t.getHours()%12||12,e,2)}function g4(t,e){return Gb(1+Qx.count(Cb(t),t),e,3)}function f4(t,e){return Gb(t.getMilliseconds(),e,3)}function m4(t,e){return f4(t,e)+"000"}function y4(t,e){return Gb(t.getMonth()+1,e,2)}function v4(t,e){return Gb(t.getMinutes(),e,2)}function x4(t,e){return Gb(t.getSeconds(),e,2)}function b4(t){return 0===(t=t.getDay())?7:t}function w4(t,e){return Gb(cb.count(Cb(t)-1,t),e,2)}function k4(t){var e=t.getDay();return 4<=e||0===e?pb(t):pb.ceil(t)}function T4(t,e){return t=k4(t),Gb(pb.count(Cb(t),t)+(4===Cb(t).getDay()),e,2)}function E4(t){return t.getDay()}function C4(t,e){return Gb(hb.count(Cb(t)-1,t),e,2)}function S4(t,e){return Gb(t.getFullYear()%100,e,2)}function _4(t,e){return Gb((t=k4(t)).getFullYear()%100,e,2)}function A4(t,e){return Gb(t.getFullYear()%1e4,e,4)}function L4(t,e){var r=t.getDay();return Gb((t=4<=r||0===r?pb(t):pb.ceil(t)).getFullYear()%1e4,e,4)}function N4(t){return(0<(t=t.getTimezoneOffset())?"-":(t*=-1,"+"))+Gb(t/60|0,"0",2)+Gb(t%60,"0",2)}function I4(t,e){return Gb(t.getUTCDate(),e,2)}function R4(t,e){return Gb(t.getUTCHours(),e,2)}function M4(t,e){return Gb(t.getUTCHours()%12||12,e,2)}function D4(t,e){return Gb(1+Jx.count(Sb(t),t),e,3)}function O4(t,e){return Gb(t.getUTCMilliseconds(),e,3)}function P4(t,e){return O4(t,e)+"000"}function B4(t,e){return Gb(t.getUTCMonth()+1,e,2)}function $4(t,e){return Gb(t.getUTCMinutes(),e,2)}function F4(t,e){return Gb(t.getUTCSeconds(),e,2)}function z4(t){return 0===(t=t.getUTCDay())?7:t}function G4(t,e){return Gb(mb.count(Sb(t)-1,t),e,2)}function U4(t){var e=t.getUTCDay();return 4<=e||0===e?bb(t):bb.ceil(t)}function q4(t,e){return t=U4(t),Gb(bb.count(Sb(t),t)+(4===Sb(t).getUTCDay()),e,2)}function j4(t){return t.getUTCDay()}function W4(t,e){return Gb(yb.count(Sb(t)-1,t),e,2)}function Y4(t,e){return Gb(t.getUTCFullYear()%100,e,2)}function H4(t,e){return Gb((t=U4(t)).getUTCFullYear()%100,e,2)}function V4(t,e){return Gb(t.getUTCFullYear()%1e4,e,4)}function X4(t,e){var r=t.getUTCDay();return Gb((t=4<=r||0===r?bb(t):bb.ceil(t)).getUTCFullYear()%1e4,e,4)}function K4(){return"+0000"}function Z4(){return"%"}function Q4(t){return+t}function J4(t){return Math.floor(+t/1e3)}var t5,e5,r5,n5,i5=b(()=>{Pb(),me(Bb,"localDate"),me($b,"utcDate"),me(Fb,"newDate"),me(zb,"formatLocale"),t5={"-":"",_:" ",0:"0"},e5=/^\s*\d+/,r5=/^%/,n5=/[\\^$*+?|[\]().{}]/g,me(Gb,"pad"),me(Ub,"requote"),me(qb,"formatRe"),me(jb,"formatLookup"),me(Wb,"parseWeekdayNumberSunday"),me(Yb,"parseWeekdayNumberMonday"),me(Hb,"parseWeekNumberSunday"),me(Vb,"parseWeekNumberISO"),me(Xb,"parseWeekNumberMonday"),me(Kb,"parseFullYear"),me(Zb,"parseYear"),me(Qb,"parseZone"),me(Jb,"parseQuarter"),me(t4,"parseMonthNumber"),me(e4,"parseDayOfMonth"),me(r4,"parseDayOfYear"),me(n4,"parseHour24"),me(i4,"parseMinutes"),me(a4,"parseSeconds"),me(s4,"parseMilliseconds"),me(o4,"parseMicroseconds"),me(l4,"parseLiteralPercent"),me(c4,"parseUnixTimestamp"),me(h4,"parseUnixTimestampSeconds"),me(u4,"formatDayOfMonth"),me(d4,"formatHour24"),me(p4,"formatHour12"),me(g4,"formatDayOfYear"),me(f4,"formatMilliseconds"),me(m4,"formatMicroseconds"),me(y4,"formatMonthNumber"),me(v4,"formatMinutes"),me(x4,"formatSeconds"),me(b4,"formatWeekdayNumberMonday"),me(w4,"formatWeekNumberSunday"),me(k4,"dISO"),me(T4,"formatWeekNumberISO"),me(E4,"formatWeekdayNumberSunday"),me(C4,"formatWeekNumberMonday"),me(S4,"formatYear"),me(_4,"formatYearISO"),me(A4,"formatFullYear"),me(L4,"formatFullYearISO"),me(N4,"formatZone"),me(I4,"formatUTCDayOfMonth"),me(R4,"formatUTCHour24"),me(M4,"formatUTCHour12"),me(D4,"formatUTCDayOfYear"),me(O4,"formatUTCMilliseconds"),me(P4,"formatUTCMicroseconds"),me(B4,"formatUTCMonthNumber"),me($4,"formatUTCMinutes"),me(F4,"formatUTCSeconds"),me(z4,"formatUTCWeekdayNumberMonday"),me(G4,"formatUTCWeekNumberSunday"),me(U4,"UTCdISO"),me(q4,"formatUTCWeekNumberISO"),me(j4,"formatUTCWeekdayNumberSunday"),me(W4,"formatUTCWeekNumberMonday"),me(Y4,"formatUTCYear"),me(H4,"formatUTCYearISO"),me(V4,"formatUTCFullYear"),me(X4,"formatUTCFullYearISO"),me(K4,"formatUTCZone"),me(Z4,"formatLiteralPercent"),me(Q4,"formatUnixTimestamp"),me(J4,"formatUnixTimestampSeconds")});function a5(t){return s5=zb(t),o5=s5.format,s5}var s5,o5,l5=b(()=>{i5(),a5({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),me(a5,"defaultLocale")}),c5=b(()=>{l5()});function h5(t){return new Date(t)}function u5(t){return t instanceof Date?+t:+new Date(+t)}function d5(r,n,e,i,a,s,o,l,c,h){var u=Mx(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),x=h("%b %d"),b=h("%B"),w=h("%Y");function k(t){return(c(t)<t?g:l(t)<t?f:o(t)<t?m:s(t)<t?y:i(t)<t?a(t)<t?v:x:e(t)<t?b:w)(t)}return me(k,"tickFormat"),u.invert=function(t){return new Date(d(t))},u.domain=function(t){return arguments.length?p(Array.from(t,u5)):p().map(h5)},u.ticks=function(t){var e=p();return r(e[0],e[e.length-1],t??10)},u.tickFormat=function(t,e){return null==e?k:h(e)},u.nice=function(t){var e=p();return(t=t&&"function"==typeof t.range?t:n(e[0],e[e.length-1],t??10))?p(Gx(e,t)):u},u.copy=function(){return Ix(u,d5(r,n,e,i,a,s,o,l,c,h))},u}function p5(){return fx.apply(d5(Mb,Db,Cb,Tb,cb,Qx,Kx,Vx,Hx,o5).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var g5=b(()=>{Pb(),c5(),Ox(),mx(),Ux(),me(h5,"date"),me(u5,"number"),me(d5,"calendar"),me(p5,"time")}),f5=b(()=>{wx(),zx(),xx(),g5()});function m5(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(6*n,6*++n);return r}var y5,v5=b(()=>{me(m5,"default")}),x5=b(()=>{v5(),y5=m5("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),b5=b(()=>{x5()});function w5(t){return me(function(){return t},"constant")}var k5=b(()=>{me(w5,"default")});function T5(t){return 1<t?0:t<-1?M5:Math.acos(t)}function E5(t){return 1<=t?D5:t<=-1?-D5:Math.asin(t)}var C5,S5,_5,A5,L5,N5,I5,R5,M5,D5,O5,P5=b(()=>{C5=Math.abs,S5=Math.atan2,_5=Math.cos,A5=Math.max,L5=Math.min,N5=Math.sin,I5=Math.sqrt,R5=1e-12,D5=(M5=Math.PI)/2,O5=2*M5,me(T5,"acos"),me(E5,"asin")});function B5(r){let n=3;return r.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);n=e}return r},()=>new m2(n)}var $5=b(()=>{v2(),me(B5,"withPath")});function F5(t){return t.innerRadius}function z5(t){return t.outerRadius}function G5(t){return t.startAngle}function U5(t){return t.endAngle}function q5(t){return t&&t.padAngle}function j5(t,e,r,n,i,a,s,o){var l=(o-=a)*(r-=t)-(s-=i)*(n-=e);if(!(l*l<R5))return[t+(l=(s*(e-a)-o*(t-i))/l)*r,e+l*n]}function W5(t,e,r,n,i,a,s){var o=(s=(s?a:-a)/I5((l=t-r)*l+(o=e-n)*o))*o,s=-s*l,l=t+o,t=e+s,e=r+o,r=n+s,n=(l+e)/2,c=(t+r)/2,h=e-l,u=r-t,d=h*h+u*u,e=((l=l*r-e*t)*u-h*(r=(u<0?-1:1)*I5(A5(0,(a=i-a)*a*d-l*l))))/d,t=(-l*h-u*r)/d,p=(l*u+h*r)/d,l=(-l*h+u*r)/d;return(r=p-n)*r+(d=l-c)*d<(h=e-n)*h+(u=t-c)*u&&(e=p,t=l),{cx:e,cy:t,x01:-o,y01:-s,x11:e*(i/a-1),y11:t*(i/a-1)}}function Y5(){var A=F5,L=z5,N=w5(0),I=null,R=G5,M=U5,D=q5,O=null,P=B5(e);function e(){var t,e,r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k=+A.apply(this,arguments),T=+L.apply(this,arguments),E=R.apply(this,arguments)-D5,C=M.apply(this,arguments)-D5,S=C5(C-E),_=E<C;if(O=O||(t=P()),T<k&&(e=T,T=k,k=e),R5<T?O5-R5<S?(O.moveTo(T*_5(E),T*N5(E)),O.arc(0,0,T,E,C,!_),R5<k&&(O.moveTo(k*_5(C),k*N5(C)),O.arc(0,0,k,C,E,_))):(n=e=E,i=r=C,s=a=S,h=D.apply(this,arguments)/2,d=R5<h&&(I?+I.apply(this,arguments):I5(k*k+T*T)),w=b=o=L5(C5(T-k)/2,+N.apply(this,arguments)),R5<d&&(u=E5(d/k*N5(h)),d=E5(d/T*N5(h)),(a-=2*u)>R5?(n+=u*=_?1:-1,i-=u):(a=0,n=i=(E+C)/2),(s-=2*d)>R5?(e+=d*=_?1:-1,r-=d):(s=0,e=r=(E+C)/2)),h=T*_5(e),u=T*N5(e),d=k*_5(i),E=k*N5(i),R5<o&&(p=T*_5(r),g=T*N5(r),f=k*_5(n),m=k*N5(n),S<M5)&&((C=j5(h,u,f,m,p,g,d,E))?(S=h-C[0],x=u-C[1],y=p-C[0],v=g-C[1],S=1/N5(T5((S*y+x*v)/(I5(S*S+x*x)*I5(y*y+v*v)))/2),x=I5(C[0]*C[0]+C[1]*C[1]),b=L5(o,(k-x)/(S-1)),w=L5(o,(T-x)/(1+S))):b=w=0),R5<s?R5<w?(l=W5(f,m,h,u,T,w,_),c=W5(p,g,d,E,T,w,_),O.moveTo(l.cx+l.x01,l.cy+l.y01),w<o?O.arc(l.cx,l.cy,w,S5(l.y01,l.x01),S5(c.y01,c.x01),!_):(O.arc(l.cx,l.cy,w,S5(l.y01,l.x01),S5(l.y11,l.x11),!_),O.arc(0,0,T,S5(l.cy+l.y11,l.cx+l.x11),S5(c.cy+c.y11,c.cx+c.x11),!_),O.arc(c.cx,c.cy,w,S5(c.y11,c.x11),S5(c.y01,c.x01),!_))):(O.moveTo(h,u),O.arc(0,0,T,e,r,!_)):O.moveTo(h,u),R5<k&&R5<a?R5<b?(l=W5(d,E,p,g,k,-b,_),c=W5(h,u,f,m,k,-b,_),O.lineTo(l.cx+l.x01,l.cy+l.y01),b<o?O.arc(l.cx,l.cy,b,S5(l.y01,l.x01),S5(c.y01,c.x01),!_):(O.arc(l.cx,l.cy,b,S5(l.y01,l.x01),S5(l.y11,l.x11),!_),O.arc(0,0,k,S5(l.cy+l.y11,l.cx+l.x11),S5(c.cy+c.y11,c.cx+c.x11),_),O.arc(c.cx,c.cy,b,S5(c.y11,c.x11),S5(c.y01,c.x01),!_))):O.arc(0,0,k,i,n,_):O.lineTo(d,E)):O.moveTo(0,0),O.closePath(),t)return O=null,t+""||null}return me(e,"arc"),e.centroid=function(){var t=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,e=(+R.apply(this,arguments)+ +M.apply(this,arguments))/2-M5/2;return[_5(e)*t,N5(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:w5(+t),e):A},e.outerRadius=function(t){return arguments.length?(L="function"==typeof t?t:w5(+t),e):L},e.cornerRadius=function(t){return arguments.length?(N="function"==typeof t?t:w5(+t),e):N},e.padRadius=function(t){return arguments.length?(I=null==t?null:"function"==typeof t?t:w5(+t),e):I},e.startAngle=function(t){return arguments.length?(R="function"==typeof t?t:w5(+t),e):R},e.endAngle=function(t){return arguments.length?(M="function"==typeof t?t:w5(+t),e):M},e.padAngle=function(t){return arguments.length?(D="function"==typeof t?t:w5(+t),e):D},e.context=function(t){return arguments.length?(O=t??null,e):O},e}var H5=b(()=>{k5(),P5(),$5(),me(F5,"arcInnerRadius"),me(z5,"arcOuterRadius"),me(G5,"arcStartAngle"),me(U5,"arcEndAngle"),me(q5,"arcPadAngle"),me(j5,"intersect"),me(W5,"cornerTangents"),me(Y5,"default")});function V5(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var X5=b(()=>{Array.prototype.slice,me(V5,"default")});function K5(t){this._context=t}function Z5(t){return new K5(t)}var Q5=b(()=>{me(K5,"Linear"),K5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}},"point")},me(Z5,"default")});function J5(t){return t[0]}function t3(t){return t[1]}var e3=b(()=>{me(J5,"x"),me(t3,"y")});function r3(s,o){var l=w5(!0),c=null,h=Z5,u=null,d=B5(e);function e(t){var e,r,n,i=(t=V5(t)).length,a=!1;for(null==c&&(u=h(n=d())),e=0;e<=i;++e)!(e<i&&l(r=t[e],e,t))===a&&((a=!a)?u.lineStart():u.lineEnd()),a&&u.point(+s(r,e,t),+o(r,e,t));if(n)return u=null,n+""||null}return s="function"==typeof s?s:void 0===s?J5:w5(s),o="function"==typeof o?o:void 0===o?t3:w5(o),me(e,"line"),e.x=function(t){return arguments.length?(s="function"==typeof t?t:w5(+t),e):s},e.y=function(t){return arguments.length?(o="function"==typeof t?t:w5(+t),e):o},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:w5(!!t),e):l},e.curve=function(t){return arguments.length?(h=t,null!=c&&(u=h(c)),e):h},e.context=function(t){return arguments.length?(null==t?c=u=null:u=h(c=t),e):c},e}var n3=b(()=>{X5(),k5(),Q5(),$5(),e3(),me(r3,"default")});function i3(t,e){return e<t?-1:t<e?1:t<=e?0:NaN}var a3=b(()=>{me(i3,"default")});function s3(t){return t}var o3=b(()=>{me(s3,"default")});function l3(){var p=s3,g=i3,f=null,m=w5(0),y=w5(O5),v=w5(0);function e(r){for(var t,e,n,i=(r=V5(r)).length,a=0,s=new Array(i),o=new Array(i),l=+m.apply(this,arguments),c=Math.min(O5,Math.max(-O5,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/i,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d<i;++d)0<(n=o[s[d]=d]=+p(r[d],d,r))&&(a+=n);for(null!=g?s.sort(function(t,e){return g(o[t],o[e])}):null!=f&&s.sort(function(t,e){return f(r[t],r[e])}),d=0,t=a?(c-i*u)/a:0;d<i;++d,l=e)e=s[d],n=o[e],o[e]={data:r[e],index:d,value:n,startAngle:l,endAngle:e=l+(0<n?n*t:0)+u,padAngle:h};return o}return me(e,"pie"),e.value=function(t){return arguments.length?(p="function"==typeof t?t:w5(+t),e):p},e.sortValues=function(t){return arguments.length?(g=t,f=null,e):g},e.sort=function(t){return arguments.length?(f=t,g=null,e):f},e.startAngle=function(t){return arguments.length?(m="function"==typeof t?t:w5(+t),e):m},e.endAngle=function(t){return arguments.length?(y="function"==typeof t?t:w5(+t),e):y},e.padAngle=function(t){return arguments.length?(v="function"==typeof t?t:w5(+t),e):v},e}var c3=b(()=>{X5(),k5(),a3(),o3(),P5(),me(l3,"default")});function h3(t){return new d3(t,!0)}function u3(t){return new d3(t,!1)}var d3,p3=b(()=>{d3=class{static{me(this,"Bump")}constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}},me(h3,"bumpX"),me(u3,"bumpY")});function g3(){}var f3=b(()=>{me(g3,"default")});function m3(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function y3(t){this._context=t}function v3(t){return new y3(t)}var x3=b(()=>{me(m3,"point"),me(y3,"Basis"),y3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 3:m3(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:m3(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(v3,"default")});function b3(t){this._context=t}function w3(t){return new b3(t)}var k3=b(()=>{f3(),x3(),me(b3,"BasisClosed"),b3.prototype={areaStart:g3,areaEnd:g3,lineStart:me(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:m3(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(w3,"default")});function T3(t){this._context=t}function E3(t){return new T3(t)}var C3=b(()=>{x3(),me(T3,"BasisOpen"),T3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:m3(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(E3,"default")});function S3(t,e){this._basis=new y3(t),this._beta=e}var _3,A3=b(()=>{x3(),me(S3,"Bundle"),S3.prototype={lineStart:me(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length-1;if(0<r)for(var n,i=t[0],a=e[0],s=t[r]-i,o=e[r]-a,l=-1;++l<=r;)this._basis.point(this._beta*t[l]+(1-this._beta)*(i+(n=l/r)*s),this._beta*e[l]+(1-this._beta)*(a+n*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:me(function(t,e){this._x.push(+t),this._y.push(+e)},"point")},_3=me(function e(r){function t(t){return 1===r?new y3(t):new S3(t,r)}return me(t,"bundle"),t.beta=function(t){return e(+t)},t},"custom")(.85)});function L3(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function N3(t,e){this._context=t,this._k=(1-e)/6}var I3,R3=b(()=>{me(L3,"point"),me(N3,"Cardinal"),N3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:L3(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:L3(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},I3=me(function e(r){function t(t){return new N3(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function M3(t,e){this._context=t,this._k=(1-e)/6}var D3,O3=b(()=>{f3(),R3(),me(M3,"CardinalClosed"),M3.prototype={areaStart:g3,areaEnd:g3,lineStart:me(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:L3(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},D3=me(function e(r){function t(t){return new M3(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function P3(t,e){this._context=t,this._k=(1-e)/6}var B3,$3=b(()=>{R3(),me(P3,"CardinalOpen"),P3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:L3(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},B3=me(function e(r){function t(t){return new P3(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function F3(t,e,r){var n,i,a=t._x1,s=t._y1,o=t._x2,l=t._y2;R5<t._l01_a&&(a=(a*(n=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a)-t._x0*t._l12_2a+t._x2*t._l01_2a)/(i=3*t._l01_a*(t._l01_a+t._l12_a)),s=(s*n-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),R5<t._l23_a&&(o=(o*(n=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a)+t._x1*t._l23_2a-e*t._l12_2a)/(i=3*t._l23_a*(t._l23_a+t._l12_a)),l=(l*n+t._y1*t._l23_2a-r*t._l12_2a)/i),t._context.bezierCurveTo(a,s,o,l,t._x2,t._y2)}function z3(t,e){this._context=t,this._alpha=e}var G3,U3=b(()=>{P5(),R3(),me(F3,"point"),me(z3,"CatmullRom"),z3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:F3(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},G3=me(function e(r){function t(t){return r?new z3(t,r):new N3(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function q3(t,e){this._context=t,this._alpha=e}var j3,W3=b(()=>{O3(),f3(),U3(),me(q3,"CatmullRomClosed"),q3.prototype={areaStart:g3,areaEnd:g3,lineStart:me(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:me(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:F3(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},j3=me(function e(r){function t(t){return r?new q3(t,r):new M3(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function Y3(t,e){this._context=t,this._alpha=e}var H3,V3=b(()=>{$3(),U3(),me(Y3,"CatmullRomOpen"),Y3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:F3(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},H3=me(function e(r){function t(t){return r?new Y3(t,r):new P3(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function X3(t){this._context=t}function K3(t){return new X3(t)}var Z3=b(()=>{f3(),me(X3,"LinearClosed"),X3.prototype={areaStart:g3,areaEnd:g3,lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){this._point&&this._context.closePath()},"lineEnd"),point:me(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")},me(K3,"default")});function Q3(t){return t<0?-1:1}function J3(t,e,r){var n=t._x1-t._x0,e=e-t._x1,i=(t._y1-t._y0)/(n||e<0&&-0),t=(i*e+(r=(r-t._y1)/(e||n<0&&-0))*n)/(n+e);return(Q3(i)+Q3(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(t))||0}function tw(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function ew(t,e,r){var n=t._x0,i=t._x1,a=t._y1,s=(i-n)/3;t._context.bezierCurveTo(n+s,t._y0+s*e,i-s,a-s*r,i,a)}function rw(t){this._context=t}function nw(t){this._context=new iw(t)}function iw(t){this._context=t}function aw(t){return new rw(t)}function sw(t){return new nw(t)}var ow=b(()=>{me(Q3,"sign"),me(J3,"slope3"),me(tw,"slope2"),me(ew,"point"),me(rw,"MonotoneX"),rw.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ew(this,this._t0,tw(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ew(this,tw(this,r=J3(this,t,e)),r);break;default:ew(this,this._t0,r=J3(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")},me(nw,"MonotoneY"),(nw.prototype=Object.create(rw.prototype)).point=function(t,e){rw.prototype.point.call(this,e,t)},me(iw,"ReflectContext"),iw.prototype={moveTo:me(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:me(function(){this._context.closePath()},"closePath"),lineTo:me(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:me(function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)},"bezierCurveTo")},me(aw,"monotoneX"),me(sw,"monotoneY")});function lw(t){this._context=t}function cw(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(a[i[0]=0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,a[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/a[e-1],a[e]-=r,s[e]-=r*s[e-1];for(i[n-1]=s[n-1]/a[n-1],e=n-2;0<=e;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function hw(t){return new lw(t)}var uw=b(()=>{me(lw,"Natural"),lw.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var n=cw(t),i=cw(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:me(function(t,e){this._x.push(+t),this._y.push(+e)},"point")},me(cw,"controlPoints"),me(hw,"default")});function dw(t,e){this._context=t,this._t=e}function pw(t){return new dw(t,.5)}function gw(t){return new dw(t,0)}function fw(t){return new dw(t,1)}var mw=b(()=>{me(dw,"Step"),dw.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:me(function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var r;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(r=this._x*(1-this._t)+t*this._t,this._context.lineTo(r,this._y),this._context.lineTo(r,e))}this._x=t,this._y=e},"point")},me(pw,"default"),me(gw,"stepBefore"),me(fw,"stepAfter")}),yw=b(()=>{H5(),n3(),c3(),k3(),C3(),x3(),p3(),A3(),O3(),$3(),R3(),W3(),V3(),U3(),Z3(),Q5(),ow(),uw(),mw()}),vw=b(()=>{}),xw=b(()=>{});function bw(t,e,r){this.k=t,this.x=e,this.y=r}function ww(t){for(;!t.__zoom;)if(!(t=t.parentNode))return kw;return t.__zoom}var kw,Tw,Ew,Cw,Sw,_w,Aw,Lw,Nw,Iw,Rw,Mw,Dw,Ow,Pw,Bw,$w,Fw,zw,Gw,Uw,qw,jw,Ww,Yw,Hw,Vw,Xw,Kw,Zw,Qw,Jw,t6=b(()=>{me(bw,"Transform"),bw.prototype={constructor:bw,scale:me(function(t){return 1===t?this:new bw(this.k*t,this.x,this.y)},"scale"),translate:me(function(t,e){return 0===t&0===e?this:new bw(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:me(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:me(function(t){return t*this.k+this.x},"applyX"),applyY:me(function(t){return t*this.k+this.y},"applyY"),invert:me(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:me(function(t){return(t-this.x)/this.k},"invertX"),invertY:me(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:me(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:me(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:me(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},kw=new bw(1,0,0),ww.prototype=bw.prototype,me(ww,"transform")}),e6=b(()=>{}),r6=b(()=>{Zy(),vw(),xw(),t6(),e6()}),n6=b(()=>{r6(),t6()}),i6=b(()=>{nd(),yd(),l2(),x2(),C1(),b2(),w2(),Ad(),bg(),k2(),Wy(),T2(),C2(),uv(),dv(),dx(),Cf(),v2(),px(),E2(),gx(),f5(),b5(),xg(),yw(),Pb(),c5(),Xf(),Zy(),n6()}),a6=WBt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}),s6=WBt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var a=a6();function s(t){return-1<a.relativeFirstCharacters.indexOf(t[0])}function o(t){return t.replace(a.ctrlCharactersRegex,"").replace(a.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function l(t){return URL.canParse(t)}function c(t){try{return decodeURIComponent(t)}catch{return t}}function e(t){if(!t)return a.BLANK_URL;for(var e,r,n,i=c(t.trim());(e=(i=c(i=o(i).replace(a.htmlCtrlEntityRegex,"").replace(a.ctrlCharactersRegex,"").replace(a.whitespaceEscapeCharsRegex,"").trim())).match(a.ctrlCharactersRegex)||i.match(a.htmlEntitiesRegex)||i.match(a.htmlCtrlEntityRegex)||i.match(a.whitespaceEscapeCharsRegex))&&0<e.length;);return(t=i)?!s(t)&&(n=(r=t.trimStart()).match(a.urlSchemeRegex))?(n=n[0].toLowerCase().trim(),a.invalidProtocolRegex.test(n)?a.BLANK_URL:(r=r.replace(/\\/g,"/"),"mailto:"===n||n.includes("://")||"http:"!==n&&"https:"!==n?r:l(r)?((n=new URL(r)).protocol=n.protocol.toLowerCase(),n.hostname=n.hostname.toLowerCase(),n.toString()):a.BLANK_URL)):t:a.BLANK_URL}me(s,"isRelativeUrlWithoutProtocol"),me(o,"decodeHtmlCharacters"),me(l,"isValidUrl"),me(c,"decodeURI"),me(e,"sanitizeUrl"),t.sanitizeUrl=e}),o6=b(()=>{Tw=q(s6(),1),Oc(),Ew=me((t,e)=>{var r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(var n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),Cw=me((t,e)=>{e={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"},Ew(t,e).lower()},"drawBackgroundRect"),Sw=me((t,e)=>{var r=e.text.replace(nc," "),n=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),e.class&&t.attr("class",e.class),t.append("tspan"));return n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),_w=me((t,e,r,n)=>{(t=t.append("image")).attr("x",e),t.attr("y",r),e=(0,Tw.sanitizeUrl)(n),t.attr("xlink:href",e)},"drawImage"),Aw=me((t,e,r,n)=>{(t=t.append("use")).attr("x",e),t.attr("y",r),e=(0,Tw.sanitizeUrl)(n),t.attr("xlink:href","#"+e)},"drawEmbeddedImage"),Lw=me(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Nw=me(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),l6=b(()=>{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),s)}function l(t,e,r,n,i,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;t<u.length;t++){var d=t*l-l*(u.length-1)/2,p=e.append("text").attr("x",r+i/2).attr("y",n).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",l).style("font-weight",h).style("font-family",c);p.append("tspan").attr("dy",d).text(u[t]).attr("alignment-baseline","mathematical"),g(p,s)}}function r(t,e,r,n,i,a,s,o){(a=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),l(t,e,r,n,i,0,s,o),g(a,s)}function g(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}Oc(),o6(),Iw=q(s6(),1),Rw=me(function(t,e){return Ew(t,e)},"drawRect"),Mw=me(function(t,e,r,n,i,a){(t=t.append("image")).attr("width",e),t.attr("height",r),t.attr("x",n),t.attr("y",i),e=a.startsWith("data:image/png;base64")?a:(0,Iw.sanitizeUrl)(a),t.attr("xlink:href",e)},"drawImage"),Dw=me((t,e,r)=>{let n=t.append("g"),i=0;for(var a of e){var s,o=a.textColor||"#444444",l=a.lineColor||"#444444",c=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,l=(0===i?((s=n.append("line")).attr("x1",a.startPoint.x),s.attr("y1",a.startPoint.y),s.attr("x2",a.endPoint.x),s.attr("y2",a.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)"),i=-1):((s=n.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)")),r.messageFont());Yw(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:o},l),a.techn&&""!==a.techn.text&&(l=r.messageFont(),Yw(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:o,"font-style":"italic"},l))}},"drawRels"),Ow=me(function(t,e,r){let n=t.append("g"),i=e.bgColor||"none",a=e.borderColor||"#444444",s=e.fontColor||"black",o=e.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(Rw(n,t={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,Yw(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&((l=r.boundaryFont()).fontColor=s,Yw(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},l)),e.descr&&""!==e.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,Yw(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},"drawBoundary"),Pw=me(function(t,e,r){let n=e.bgColor||r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor||r[e.typeC4Shape.text+"_border_color"],a=e.fontColor||"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}var o=t.append("g"),l=(o.attr("class","person-man"),Lw());switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},Rw(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}switch(t=Ww(r,e.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",t.fontFamily).attr("font-size",t.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":Mw(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let c=r[e.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,Yw(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},c),(c=r[e.typeC4Shape.text+"Font"]()).fontColor=a,e.techn&&""!==e.techn?.text?Yw(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},c):e.type&&""!==e.type.text&&Yw(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},c),e.descr&&""!==e.descr.text&&((c=r.personFont()).fontColor=a,Yw(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},c)),e.height},"drawC4Shape"),Bw=me(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),$w=me(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Fw=me(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),zw=me(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),Gw=me(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),Uw=me(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),qw=me(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),jw=me(function(t){(t=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4)).append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),t.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),Ww=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),Yw=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},Hw={drawRect:Rw,drawBoundary:Ow,drawC4Shape:Pw,drawRels:Dw,drawImage:Mw,insertArrowHead:zw,insertArrowEnd:Gw,insertArrowFilledHead:Uw,insertDynamicNumber:qw,insertArrowCrossHead:jw,insertDatabaseIcon:Bw,insertComputerIcon:$w,insertClockIcon:Fw}}),c6=b(()=>{Vw="object"==typeof global&&global&&global.Object===Object&&global,Xw=Vw}),h6=b(()=>{c6(),Kw="object"==typeof self&&self&&self.Object===Object&&self,Kw=Xw||Kw||Function("return this")(),Zw=Kw}),u6=b(()=>{h6(),Qw=Zw.Symbol,Jw=Qw});function d6(t){var e=g6.call(t,m6),r=t[m6];try{var n=!(t[m6]=void 0)}catch{}var i=f6.call(t);return n&&(e?t[m6]=r:delete t[m6]),i}var p6,g6,f6,m6,y6,v6=b(()=>{u6(),p6=Object.prototype,g6=p6.hasOwnProperty,f6=p6.toString,m6=Jw?Jw.toStringTag:void 0,me(d6,"getRawTag"),y6=d6});function x6(t){return w6.call(t)}var b6,w6,k6,T6=b(()=>{b6=Object.prototype,w6=b6.toString,me(x6,"objectToString"),k6=x6});function E6(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(C6&&C6 in Object(t)?y6:k6)(t)}var C6,S6,_6=b(()=>{u6(),v6(),T6(),C6=Jw?Jw.toStringTag:void 0,me(E6,"baseGetTag"),S6=E6});function A6(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var L6,N6=b(()=>{me(A6,"isObject"),L6=A6});function I6(t){return!!L6(t)&&("[object Function]"==(t=S6(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var R6,M6,D6,O6=b(()=>{_6(),N6(),me(I6,"isFunction"),R6=I6}),P6=b(()=>{h6(),M6=Zw["__core-js_shared__"],D6=M6});function B6(t){return!!$6&&$6 in t}var $6,F6,z6=b(()=>{var t;P6(),t=/[^.]+$/.exec(D6&&D6.keys&&D6.keys.IE_PROTO||""),$6=t?"Symbol(src)_1."+t:"",me(B6,"isMasked"),F6=B6});function G6(t){if(null!=t){try{return q6.call(t)}catch{}try{return t+""}catch{}}return""}var U6,q6,j6,W6=b(()=>{U6=Function.prototype,q6=U6.toString,me(G6,"toSource"),j6=G6});function Y6(t){return!(!L6(t)||F6(t))&&(R6(t)?Z6:V6).test(j6(t))}var H6,V6,X6,K6,Z6,Q6,J6=b(()=>{O6(),z6(),N6(),W6(),H6=/[\\^$.*+?()[\]{}|]/g,V6=/^\[object .+?Constructor\]$/,X6=Function.prototype,K6=Object.prototype,X6=X6.toString,K6=K6.hasOwnProperty,Z6=RegExp("^"+X6.call(K6).replace(H6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me(Y6,"baseIsNative"),Q6=Y6});function tk(t,e){return t?.[e]}var ek,rk=b(()=>{me(tk,"getValue"),ek=tk});function nk(t,e){return t=ek(t,e),Q6(t)?t:void 0}var ik,ak,sk,ok=b(()=>{J6(),rk(),me(nk,"getNative"),ik=nk}),lk=b(()=>{ok(),ak=ik(Object,"create"),sk=ak});function ck(){this.__data__=sk?sk(null):{},this.size=0}var hk,uk=b(()=>{lk(),me(ck,"hashClear"),hk=ck});function dk(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}var pk,gk=b(()=>{me(dk,"hashDelete"),pk=dk});function fk(t){var e,r=this.__data__;return sk?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:yk.call(r,t)?r[t]:void 0}var mk,yk,vk,xk=b(()=>{lk(),mk=Object.prototype,yk=mk.hasOwnProperty,me(fk,"hashGet"),vk=fk});function bk(t){var e=this.__data__;return sk?void 0!==e[t]:kk.call(e,t)}var wk,kk,Tk,Ek=b(()=>{lk(),wk=Object.prototype,kk=wk.hasOwnProperty,me(bk,"hashHas"),Tk=bk});function Ck(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=sk&&void 0===e?"__lodash_hash_undefined__":e,this}var Sk,_k=b(()=>{lk(),me(Ck,"hashSet"),Sk=Ck});function Ak(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var Lk,Nk=b(()=>{uk(),gk(),xk(),Ek(),_k(),me(Ak,"Hash"),Ak.prototype.clear=hk,Ak.prototype.delete=pk,Ak.prototype.get=vk,Ak.prototype.has=Tk,Ak.prototype.set=Sk,Lk=Ak});function Ik(){this.__data__=[],this.size=0}var Rk,Mk=b(()=>{me(Ik,"listCacheClear"),Rk=Ik});function Dk(t,e){return t===e||t!=t&&e!=e}var Ok,Pk=b(()=>{me(Dk,"eq"),Ok=Dk});function Bk(t,e){for(var r=t.length;r--;)if(Ok(t[r][0],e))return r;return-1}var $k,Fk=b(()=>{Pk(),me(Bk,"assocIndexOf"),$k=Bk});function zk(t){var e=this.__data__;return!((t=$k(e,t))<0||(t==e.length-1?e.pop():Uk.call(e,t,1),--this.size,0))}var Gk,Uk,qk,jk=b(()=>{Fk(),Gk=Array.prototype,Uk=Gk.splice,me(zk,"listCacheDelete"),qk=zk});function Wk(t){var e=this.__data__;return(t=$k(e,t))<0?void 0:e[t][1]}var Yk,Hk=b(()=>{Fk(),me(Wk,"listCacheGet"),Yk=Wk});function Vk(t){return-1<$k(this.__data__,t)}var Xk,Kk=b(()=>{Fk(),me(Vk,"listCacheHas"),Xk=Vk});function Zk(t,e){var r=this.__data__,n=$k(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Qk,Jk=b(()=>{Fk(),me(Zk,"listCacheSet"),Qk=Zk});function tT(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var eT,rT,nT,iT=b(()=>{Mk(),jk(),Hk(),Kk(),Jk(),me(tT,"ListCache"),tT.prototype.clear=Rk,tT.prototype.delete=qk,tT.prototype.get=Yk,tT.prototype.has=Xk,tT.prototype.set=Qk,eT=tT}),aT=b(()=>{ok(),h6(),rT=ik(Zw,"Map"),nT=rT});function sT(){this.size=0,this.__data__={hash:new Lk,map:new(nT||eT),string:new Lk}}var oT,lT=b(()=>{Nk(),iT(),aT(),me(sT,"mapCacheClear"),oT=sT});function cT(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var hT,uT=b(()=>{me(cT,"isKeyable"),hT=cT});function dT(t,e){return t=t.__data__,hT(e)?t["string"==typeof e?"string":"hash"]:t.map}var pT,gT=b(()=>{uT(),me(dT,"getMapData"),pT=dT});function fT(t){return t=pT(this,t).delete(t),this.size-=t?1:0,t}var mT,yT=b(()=>{gT(),me(fT,"mapCacheDelete"),mT=fT});function vT(t){return pT(this,t).get(t)}var xT,bT=b(()=>{gT(),me(vT,"mapCacheGet"),xT=vT});function wT(t){return pT(this,t).has(t)}var kT,TT=b(()=>{gT(),me(wT,"mapCacheHas"),kT=wT});function ET(t,e){var r=pT(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var CT,ST=b(()=>{gT(),me(ET,"mapCacheSet"),CT=ET});function _T(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var AT,LT=b(()=>{lT(),yT(),bT(),TT(),ST(),me(_T,"MapCache"),_T.prototype.clear=oT,_T.prototype.delete=mT,_T.prototype.get=xT,_T.prototype.has=kT,_T.prototype.set=CT,AT=_T});function NT(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(IT);var a=me(function(){var t=arguments,e=i?i.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=n.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(NT.Cache||AT),a}var IT,RT,MT=b(()=>{LT(),IT="Expected a function",me(NT,"memoize"),NT.Cache=AT,RT=NT});function DT(){this.__data__=new eT,this.size=0}var OT,PT=b(()=>{iT(),me(DT,"stackClear"),OT=DT});function BT(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}var $T,FT=b(()=>{me(BT,"stackDelete"),$T=BT});function zT(t){return this.__data__.get(t)}var GT,UT=b(()=>{me(zT,"stackGet"),GT=zT});function qT(t){return this.__data__.has(t)}var jT,WT=b(()=>{me(qT,"stackHas"),jT=qT});function YT(t,e){var r=this.__data__;if(r instanceof eT){var n=r.__data__;if(!nT||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new AT(n)}return r.set(t,e),this.size=r.size,this}var HT,VT=b(()=>{iT(),aT(),LT(),me(YT,"stackSet"),HT=YT});function XT(t){t=this.__data__=new eT(t),this.size=t.size}var KT,ZT,QT,JT=b(()=>{iT(),PT(),FT(),UT(),WT(),VT(),me(XT,"Stack"),XT.prototype.clear=OT,XT.prototype.delete=$T,XT.prototype.get=GT,XT.prototype.has=jT,XT.prototype.set=HT,KT=XT}),t7=b(()=>{ok(),ZT=(()=>{try{var t=ik(Object,"defineProperty");return t({},"",{}),t}catch{}})(),QT=ZT});function e7(t,e,r){"__proto__"==e&&QT?QT(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var r7,n7=b(()=>{t7(),me(e7,"baseAssignValue"),r7=e7});function i7(t,e,r){(void 0===r||Ok(t[e],r))&&(void 0!==r||e in t)||r7(t,e,r)}var a7,s7=b(()=>{n7(),Pk(),me(i7,"assignMergeValue"),a7=i7});function o7(l){return function(t,e,r){for(var n=-1,i=Object(t),a=r(t),s=a.length;s--;){var o=a[l?s:++n];if(!1===e(i[o],o,i))break}return t}}var l7,c7,h7,u7=b(()=>{me(o7,"createBaseFor"),l7=o7}),d7=b(()=>{u7(),c7=l7(),h7=c7});function p7(t,e){return e?t.slice():(e=t.length,e=m7?m7(e):new t.constructor(e),t.copy(e),e)}var g7,f7,m7,y7,v7,x7,b7=b(()=>{h6(),g7="object"==typeof exports&&exports&&!exports.nodeType&&exports,f7=(f7=g7&&"object"==typeof module&&module&&!module.nodeType&&module)&&f7.exports===g7?Zw.Buffer:void 0,m7=f7?f7.allocUnsafe:void 0,me(p7,"cloneBuffer"),y7=p7}),w7=b(()=>{h6(),v7=Zw.Uint8Array,x7=v7});function k7(t){var e=new t.constructor(t.byteLength);return new x7(e).set(new x7(t)),e}var T7,E7=b(()=>{w7(),me(k7,"cloneArrayBuffer"),T7=k7});function C7(t,e){return e=e?T7(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var S7,_7=b(()=>{E7(),me(C7,"cloneTypedArray"),S7=C7});function A7(t,e){var r=-1,n=t.length;for(e=e||Array(n);++r<n;)e[r]=t[r];return e}var L7,N7,I7,R7=b(()=>{me(A7,"copyArray"),L7=A7}),M7=b(()=>{function e(){}N6(),N7=Object.create,me(e,"object"),I7=function(t){return L6(t)?N7?N7(t):(e.prototype=t,t=new e,e.prototype=void 0,t):{}}});function D7(e,r){return function(t){return e(r(t))}}var O7,P7,B7,$7=b(()=>{me(D7,"overArg"),O7=D7}),F7=b(()=>{$7(),P7=O7(Object.getPrototypeOf,Object),B7=P7});function z7(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||G7)}var G7,U7,q7=b(()=>{G7=Object.prototype,me(z7,"isPrototype"),U7=z7});function j7(t){return"function"!=typeof t.constructor||U7(t)?{}:I7(B7(t))}var W7,Y7=b(()=>{M7(),F7(),q7(),me(j7,"initCloneObject"),W7=j7});function H7(t){return null!=t&&"object"==typeof t}var V7,X7=b(()=>{me(H7,"isObjectLike"),V7=H7});function K7(t){return V7(t)&&"[object Arguments]"==S6(t)}var Z7,Q7,J7,t8,e8,r8,n8,i8=b(()=>{_6(),X7(),me(K7,"baseIsArguments"),Z7=K7}),a8=b(()=>{i8(),X7(),t8=Object.prototype,Q7=t8.hasOwnProperty,J7=t8.propertyIsEnumerable,t8=Z7(function(){return arguments}())?Z7:function(t){return V7(t)&&Q7.call(t,"callee")&&!J7.call(t,"callee")},e8=t8}),s8=b(()=>{r8=Array.isArray,n8=r8});function o8(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}var l8,c8=b(()=>{me(o8,"isLength"),l8=o8});function h8(t){return null!=t&&l8(t.length)&&!R6(t)}var u8,d8=b(()=>{O6(),c8(),me(h8,"isArrayLike"),u8=h8});function p8(t){return V7(t)&&u8(t)}var g8,f8=b(()=>{d8(),X7(),me(p8,"isArrayLikeObject"),g8=p8});function m8(){return!1}var y8,v8,x8,b8,w8=b(()=>{me(m8,"stubFalse"),y8=m8}),k8=b(()=>{h6(),w8(),x8="object"==typeof exports&&exports&&!exports.nodeType&&exports,v8=(v8=x8&&"object"==typeof module&&module&&!module.nodeType&&module)&&v8.exports===x8?Zw.Buffer:void 0,x8=v8?v8.isBuffer:void 0,b8=x8||y8});function T8(t){return!(!V7(t)||"[object Object]"!=S6(t))&&(null===(t=B7(t))||"function"==typeof(t=_8.call(t,"constructor")&&t.constructor)&&t instanceof t&&S8.call(t)==A8)}var E8,C8,S8,_8,A8,L8,N8=b(()=>{_6(),F7(),X7(),E8=Function.prototype,C8=Object.prototype,S8=E8.toString,_8=C8.hasOwnProperty,A8=S8.call(Object),me(T8,"isPlainObject"),L8=T8});function I8(t){return V7(t)&&l8(t.length)&&!!R8[S6(t)]}var R8,M8,D8=b(()=>{_6(),c8(),X7(),(R8={})["[object Float32Array]"]=R8["[object Float64Array]"]=R8["[object Int8Array]"]=R8["[object Int16Array]"]=R8["[object Int32Array]"]=R8["[object Uint8Array]"]=R8["[object Uint8ClampedArray]"]=R8["[object Uint16Array]"]=R8["[object Uint32Array]"]=!0,R8["[object Arguments]"]=R8["[object Array]"]=R8["[object ArrayBuffer]"]=R8["[object Boolean]"]=R8["[object DataView]"]=R8["[object Date]"]=R8["[object Error]"]=R8["[object Function]"]=R8["[object Map]"]=R8["[object Number]"]=R8["[object Object]"]=R8["[object RegExp]"]=R8["[object Set]"]=R8["[object String]"]=R8["[object WeakMap]"]=!1,me(I8,"baseIsTypedArray"),M8=I8});function O8(e){return function(t){return e(t)}}var P8,B8,$8,F8,z8,G8,U8,q8=b(()=>{me(O8,"baseUnary"),P8=O8}),j8=b(()=>{c6(),F8="object"==typeof exports&&exports&&!exports.nodeType&&exports,B8=F8&&"object"==typeof module&&module&&!module.nodeType&&module,F8=B8&&B8.exports===F8,$8=F8&&Xw.process,F8=(()=>{try{return B8&&B8.require&&B8.require("util").types||$8&&$8.binding&&$8.binding("util")}catch{}})(),z8=F8}),W8=b(()=>{D8(),q8(),j8(),G8=(G8=z8&&z8.isTypedArray)?P8(G8):M8,U8=G8});function Y8(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var H8,V8=b(()=>{me(Y8,"safeGet"),H8=Y8});function X8(t,e,r){var n=t[e];Z8.call(t,e)&&Ok(n,r)&&(void 0!==r||e in t)||r7(t,e,r)}var K8,Z8,Q8,J8=b(()=>{n7(),Pk(),K8=Object.prototype,Z8=K8.hasOwnProperty,me(X8,"assignValue"),Q8=X8});function tE(t,e,r,n){var i=!r;r=r||{};for(var a=-1,s=e.length;++a<s;){var o=e[a],l=n?n(r[o],t[o],o,r,t):void 0;void 0===l&&(l=t[o]),(i?r7:Q8)(r,o,l)}return r}var eE,rE=b(()=>{J8(),n7(),me(tE,"copyObject"),eE=tE});function nE(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var iE,aE=b(()=>{me(nE,"baseTimes"),iE=nE});function sE(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&oE.test(t))&&-1<t&&t%1==0&&t<e}var oE,lE,cE=b(()=>{oE=/^(?:0|[1-9]\d*)$/,me(sE,"isIndex"),lE=sE});function hE(t,e){var r,n=n8(t),i=!n&&e8(t),a=!n&&!i&&b8(t),s=!n&&!i&&!a&&U8(t),o=n||i||a||s,l=o?iE(t.length,String):[],c=l.length;for(r in t)!e&&!dE.call(t,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||lE(r,c))||l.push(r);return l}var uE,dE,pE,gE=b(()=>{aE(),a8(),s8(),k8(),cE(),W8(),uE=Object.prototype,dE=uE.hasOwnProperty,me(hE,"arrayLikeKeys"),pE=hE});function fE(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var mE,yE=b(()=>{me(fE,"nativeKeysIn"),mE=fE});function vE(t){if(!L6(t))return mE(t);var e,r=U7(t),n=[];for(e in t)("constructor"!=e||!r&&bE.call(t,e))&&n.push(e);return n}var xE,bE,wE,kE=b(()=>{N6(),q7(),yE(),xE=Object.prototype,bE=xE.hasOwnProperty,me(vE,"baseKeysIn"),wE=vE});function TE(t){return u8(t)?pE(t,!0):wE(t)}var EE,CE=b(()=>{gE(),kE(),d8(),me(TE,"keysIn"),EE=TE});function SE(t){return eE(t,EE(t))}var _E,AE=b(()=>{rE(),CE(),me(SE,"toPlainObject"),_E=SE});function LE(t,e,r,n,i,a,s){var o,l,c,h=H8(t,r),u=H8(e,r),d=s.get(u);d||((e=void 0===(d=a?a(h,u,r+"",t,e,s):void 0))&&(l=!(o=n8(u))&&b8(u),c=!o&&!l&&U8(u),d=u,o||l||c?d=n8(h)?h:g8(h)?L7(h):l?y7(u,!(e=!1)):c?S7(u,!(e=!1)):[]:L8(u)||e8(u)?e8(d=h)?d=_E(h):L6(h)&&!R6(h)||(d=W7(u)):e=!1),e&&(s.set(u,d),i(d,u,n,a,s),s.delete(u))),a7(t,r,d)}var NE,IE=b(()=>{s7(),b7(),_7(),R7(),Y7(),a8(),s8(),f8(),k8(),O6(),N6(),N8(),W8(),V8(),AE(),me(LE,"baseMergeDeep"),NE=LE});function RE(n,i,a,s,o){n!==i&&h7(i,function(t,e){var r;o=o||new KT,L6(t)?NE(n,i,e,a,RE,s,o):(r=s?s(H8(n,e),t,e+"",n,i,o):void 0,a7(n,e,void 0===r?t:r))},EE)}var ME,DE=b(()=>{JT(),s7(),d7(),IE(),N6(),CE(),V8(),me(RE,"baseMerge"),ME=RE});function OE(t){return t}var PE,BE=b(()=>{me(OE,"identity"),PE=OE});function $E(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var FE,zE=b(()=>{me($E,"apply"),FE=$E});function GE(a,s,o){return s=UE(void 0===s?a.length-1:s,0),function(){for(var t=arguments,e=-1,r=UE(t.length-s,0),n=Array(r);++e<r;)n[e]=t[s+e];for(var e=-1,i=Array(s+1);++e<s;)i[e]=t[e];return i[s]=o(n),FE(a,this,i)}}var UE,qE,jE=b(()=>{zE(),UE=Math.max,me(GE,"overRest"),qE=GE});function WE(t){return function(){return t}}var YE,HE,VE=b(()=>{me(WE,"constant"),YE=WE}),XE=b(()=>{VE(),t7(),BE(),HE=QT?function(t,e){return QT(t,"toString",{configurable:!0,enumerable:!1,value:YE(e),writable:!0})}:PE});function KE(r){var n=0,i=0;return function(){var t=ZE(),e=16-(t-i);if(i=t,0<e){if(800<=++n)return arguments[0]}else n=0;return r.apply(void 0,arguments)}}var ZE,QE,JE,tC,eC=b(()=>{ZE=Date.now,me(KE,"shortOut"),QE=KE}),rC=b(()=>{XE(),eC(),JE=QE(HE),tC=JE});function nC(t,e){return tC(qE(t,e,PE),t+"")}var iC,aC=b(()=>{BE(),jE(),rC(),me(nC,"baseRest"),iC=nC});function sC(t,e,r){var n;return!!L6(r)&&!!("number"==(n=typeof e)?u8(r)&&lE(e,r.length):"string"==n&&e in r)&&Ok(r[e],t)}var oC,lC=b(()=>{Pk(),d8(),cE(),N6(),me(sC,"isIterateeCall"),oC=sC});function cC(o){return iC(function(t,e){var r=-1,n=e.length,i=1<n?e[n-1]:void 0,a=2<n?e[2]:void 0,i=3<o.length&&"function"==typeof i?(n--,i):void 0;for(a&&oC(e[0],e[1],a)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var s=e[r];s&&o(t,s,r,i)}return t})}var hC,uC,dC,pC=b(()=>{aC(),lC(),me(cC,"createAssigner"),hC=cC}),gC=b(()=>{DE(),pC(),uC=hC(function(t,e,r){ME(t,e,r)}),dC=uC});function fC(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),IC[t]??e):e}function mC(t,e){if(t=t.trim())return"loose"!==e.securityLevel?(0,LC.sanitizeUrl)(t):t}function yC(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function vC(t){let e,r=0;t.forEach(t=>{r+=yC(t,e),e=t});var n=r/2;return FC(t,n)}function xC(t){return 1===t.length?t[0]:vC(t)}function bC(t,e,r){var r=structuredClone(r),n=(D.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),n=FC(r,n),t=10+.5*t,i=Math.atan2(r[0].y-n.y,r[0].x-n.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(i+Math.PI)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i+Math.PI)*t+(r[0].y+n.y)/2):"end_right"===e?(a.x=Math.sin(i-Math.PI)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i-Math.PI)*t+(r[0].y+n.y)/2-5):"end_left"===e?(a.x=Math.sin(i)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2-5):(a.x=Math.sin(i)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2),a}function wC(t){let e="",r="";for(var n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function kC(e){let r="",n="0123456789abcdef",i=n.length;for(let t=0;t<e;t++)r+=n.charAt(Math.floor(Math.random()*i));return r}function TC(t,e){return VC(t,e).height}function EC(t,e){return VC(t,e).width}function CC(t){return"str"in t}function SC(t,e){return dC({},t,e)}function _C(t){return t??null}function AC(t,e){var r=Math.round(t.x),t=Math.round(t.y);return(e=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString())).includes(r.toString())||e.includes(t.toString())}var LC,NC,IC,RC,MC,DC,OC,PC,BC,$C,FC,zC,GC,UC,qC,jC,WC,YC,HC,VC,XC,KC,ZC,QC,JC,tS,eS,rS,nS,iS=b(()=>{LC=q(s6(),1),i6(),Oc(),en(),t(),sh(),mr(),MT(),gC(),ih(),NC="",IC={curveBasis:v3,curveBasisClosed:w3,curveBasisOpen:E3,curveBumpX:h3,curveBumpY:u3,curveBundle:_3,curveCardinalClosed:D3,curveCardinalOpen:B3,curveCardinal:I3,curveCatmullRomClosed:j3,curveCatmullRomOpen:H3,curveCatmullRom:G3,curveLinear:Z5,curveLinearClosed:K3,curveMonotoneX:aw,curveMonotoneY:sw,curveNatural:hw,curveStep:pw,curveStepAfter:fw,curveStepBefore:gw},RC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,MC=me(function(t,e){var r,n=DC(t,/(?:init\b)|(?:initialize\b)/),i={};if(i=Array.isArray(n)?(r=n.map(t=>t.args),Ye(r),At(i,[...r])):n.args)return r=qc(t,e),void 0!==i[n="config"]&&(i[r="flowchart-v2"===r?"flowchart":r]=i[n],delete i[n]),i},"detectInit"),DC=me(function(t,e=null){try{var r=new RegExp(`[%]{2}(?![{]${RC.source})(?=[}][%]{2}).* +`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),D.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:`+t);for(var n,i,a,s=[];null!==(n=Fc.exec(t));)n.index===Fc.lastIndex&&Fc.lastIndex++,(n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e))&&(i=n[1]||n[2],a=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null,s.push({type:i,args:a}));return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(r){return D.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),OC=me(function(t){return t.replace(Fc,"")},"removeDirectives"),PC=me(function(t,e){for(var[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray"),me(fC,"interpolateToCurve"),me(mC,"formatUrl"),BC=me((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let t=0;t<n;t++)if(!(a=a[r[t]]))return void D.error(`Function name: ${e} not found in window`);a[i](...t)},"runFunc"),me(yC,"distance"),me(vC,"traverseEdge"),me(xC,"calcLabelPosition"),$C=me((t,e=2)=>(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),FC=me((t,e)=>{let r,n=e;for(var i of t){if(r){var a=yC(i,r);if(0===a)return r;if(a<n)n-=a;else{if((a=n/a)<=0)return r;if(1<=a)return{x:i.x,y:i.y};if(0<a&&a<1)return{x:$C((1-a)*r.x+a*i.x,5),y:$C((1-a)*r.y+a*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),zC=me((t,e,r)=>{D.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());var r=FC(e,25),t=t?10:5,n=Math.atan2(e[0].y-r.y,e[0].x-r.x),i={x:0,y:0};return i.x=Math.sin(n)*t+(e[0].x+r.x)/2,i.y=-Math.cos(n)*t+(e[0].y+r.y)/2,i},"calcCardinalityPosition"),me(bC,"calcTerminalLabelPosition"),me(wC,"getStylesFromArray"),GC=0,UC=me(()=>(GC++,"id-"+Math.random().toString(36).substr(2,12)+"-"+GC),"generateId"),me(kC,"makeRandomHex"),qC=me(t=>kC(t.length),"random"),jC=me(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),WC=me(function(t,e){var r=e.text.replace(L.lineBreakRegex," "),[,n]=JC(e.fontSize);return(t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.style("text-anchor",e.anchor),t.style("font-family",e.fontFamily),t.style("font-size",n),t.style("font-weight",e.fontWeight),t.attr("fill",e.fill),void 0!==e.class&&t.attr("class",e.class),(n=t.append("tspan")).attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),t},"drawSimpleText"),YC=RT((t,s,o)=>{if(!t||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},o),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,n,i=EC(t+" ",o),a=EC(h,o);h=s<i?({hyphenatedStrings:r,remainingWord:n}=HC(t,s,"-",o),c.push(h,...r),n):s<=a+i?(c.push(h),t):[h,t].filter(Boolean).join(" "),e+1===l.length&&c.push(h)}),c.filter(t=>""!==t).join(o.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),HC=RT((t,n,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...t],o=[],l="";return s.forEach((t,e)=>{var r,t=""+l+t;l=EC(t,a)>=n?(e+=1,e=s.length===e,r=t+i,o.push(e?t:r),""):t}),{hyphenatedStrings:o,remainingWord:l}},(t,e,r="-",n)=>""+t+e+r+n.fontSize+n.fontWeight+n.fontFamily),me(TC,"calculateTextHeight"),me(EC,"calculateTextWidth"),VC=RT((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};var[,i]=JC(e),e=["sans-serif",r],a=t.split(L.lineBreakRegex),s=[];if(!(r=H("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of e){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=jC();if(u.text=c||NC,0===(u=((u=WC(l,u).style("font-size",i).style("font-weight",n).style("font-family",o))._groups||u)[0][0].getBBox()).width&&0===u.height)throw new Error("svg element not in render tree");h.width=Math.round(Math.max(h.width,u.width)),u=Math.round(u.height),h.height+=u,h.lineHeight=Math.round(Math.max(h.lineHeight,u))}s.push(h)}return l.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]},(t,e)=>""+t+e.fontSize+e.fontWeight+e.fontFamily),XC=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{me(this,"InitIDGenerator")}},ZC=me(function(t){return KC=KC||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),KC.innerHTML=t,unescape(KC.textContent)},"entityDecode"),me(CC,"isDetailedError"),QC=me((t,e,r,n)=>{var i;n&&(i=t.node()?.getBBox())&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),JC=me(t=>{var e;return"number"==typeof t?[t,t+"px"]:(e=parseInt(t??"",10),Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t])},"parseFontSize"),me(SC,"cleanAndMerge"),tS={assignWithDepth:At,wrapLabel:YC,calculateTextHeight:TC,calculateTextWidth:EC,calculateTextDimensions:VC,cleanAndMerge:SC,detectInit:MC,detectDirective:DC,isSubstringInArray:PC,interpolateToCurve:fC,calcLabelPosition:xC,calcCardinalityPosition:zC,calcTerminalLabelPosition:bC,formatUrl:mC,getStylesFromArray:wC,generateId:UC,random:qC,runFunc:BC,entityDecode:ZC,insertTitle:QC,isLabelCoordinateInPath:AC,parseFontSize:JC,InitIDGenerator:XC},eS=me(function(t){let e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){return t=t.substring(1,t.length-1),/^\+?\d+$/.test(t)?"fl°°"+t+"¶ß":"fl°"+t+"¶ß"})},"encodeEntities"),rS=me(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),nS=me((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||(n?n+"_":"")+t+`_${e}_`+r+(i?"_"+i:""),"getEdgeId"),me(_C,"handleUndefinedAttr"),me(AC,"isLabelCoordinateInPath")});function aS(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=YC(e[t].text,i,n),e[t].textLines=e[t].text.split(L.lineBreakRegex).length,e[t].width=i,e[t].height=TC(e[t].text,n);else{var a,s,r=e[t].text.split(L.lineBreakRegex);e[t].textLines=r.length,e[t].height=0,e[t].width=0;for(s of r)e[t].width=Math.max(EC(s,n),e[t].width),a=TC(s,n),e[t].height=e[t].height+a}}function sS(e,r,n,t,i){var a,s,o=new dS(i);o.data.widthLimit=n.data.widthLimit/Math.min(hS,t.length);for([a,s]of t.entries()){let t=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=t,t=s.image.Y+s.image.height);var l=s.wrap&&uS.wrap,c=fS(uS),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",aS("label",s,l,c,o.data.widthLimit),s.label.Y=t+8,t=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",aS("type",s,l,c=fS(uS),o.data.widthLimit),s.type.Y=t+5,t=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=fS(uS)).fontSize=c.fontSize-2,aS("descr",s,l,c,o.data.widthLimit),s.descr.Y=t+20,t=s.descr.Y+s.descr.height),c=0==a||a%hS==0?(l=n.data.startx+uS.diagramMarginX,n.data.stopy+uS.diagramMarginY+t):(l=o.data.stopx!==o.data.startx?o.data.stopx+uS.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,i.db.getC4ShapeArray(s.alias));0<(c=i.db.getC4ShapeKeys(s.alias)).length&&vS(o,e,l,c),r=s.alias,0<(l=i.db.getBoundaries(r)).length&&sS(e,0,o,l,i),"global"!==s.alias&&yS(e,s,o),n.data.stopy=Math.max(o.data.stopy+uS.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+uS.c4ShapeMargin,n.data.stopx),oS=Math.max(oS,n.data.stopx),lS=Math.max(lS,n.data.stopy)}}var oS,lS,cS,hS,uS,dS,pS,gS,fS,mS,yS,vS,xS,bS,wS,kS,TS,ES,CS,SS,_S=b(()=>{i6(),l6(),t(),oh(),Oc(),Eu(),Tu(),mr(),iS(),lh(),lS=oS=0,cS=4,hS=2,Hc.yy=wu,uS={},dS=class{static{me(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,pS(t.db.getConfig())}setData(t,e,r,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,r=e+t.width,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>cS)&&(e=this.nextData.startx+t.margin+uS.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},pS(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},pS=me(function(t){At(uS,t),t.fontFamily&&(uS.personFontFamily=uS.systemFontFamily=uS.messageFontFamily=t.fontFamily),t.fontSize&&(uS.personFontSize=uS.systemFontSize=uS.messageFontSize=t.fontSize),t.fontWeight&&(uS.personFontWeight=uS.systemFontWeight=uS.messageFontWeight=t.fontWeight)},"setConf"),gS=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),fS=me(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),mS=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),me(aS,"calcC4ShapeTextWH"),yS=me(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=uS.c4ShapeMargin-35;var r=e.wrap&&uS.wrap,n=fS(uS),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",EC(e.label.text,n));aS("label",e,r,n,i),Hw.drawBoundary(t,e,uS)},"drawBoundary"),vS=me(function(r,n,i,t){let a=0;for(var s of t){a=0;var o=i[s];switch((s=gS(uS,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=EC("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=uS.c4ShapePadding,a=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height);var s=o.wrap&&uS.wrap,l=uS.width-2*uS.c4ShapePadding,c=gS(uS,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",aS("label",o,s,c,l),o.label.Y=a+8,a=o.label.Y+o.label.height,o.type&&""!==o.type.text?(o.type.text="["+o.type.text+"]",aS("type",o,s,gS(uS,o.typeC4Shape.text),l),o.type.Y=a+5,a=o.type.Y+o.type.height):o.techn&&""!==o.techn.text&&(o.techn.text="["+o.techn.text+"]",aS("techn",o,s,gS(uS,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let t=a,e=o.label.width;o.descr&&""!==o.descr.text&&(aS("descr",o,s,gS(uS,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,e=Math.max(o.label.width,o.descr.width),t=a-5*o.descr.textLines),e+=uS.c4ShapePadding,o.width=Math.max(o.width||uS.width,e,uS.width),o.height=Math.max(o.height||uS.height,t,uS.height),o.margin=o.margin||uS.c4ShapeMargin,r.insert(o),Hw.drawC4Shape(n,o,uS)}r.bumpLastMargin(uS.c4ShapeMargin)},"drawC4ShapeArray"),xS=class{static{me(this,"Point")}constructor(t,e){this.x=t,this.y=e}},bS=me(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=t.height/t.width,d=null;return n==a&&r<i?d=new xS(r+t.width,o):n==a&&i<r?d=new xS(r,o):r==i&&n<a?d=new xS(s,n+t.height):r==i&&a<n&&(d=new xS(s,n)),i<r&&n<a?d=h<=u?new xS(r,o+h*t.width/2):new xS(s-l/c*t.height/2,n+t.height):r<i&&n<a?d=h<=u?new xS(r+t.width,o+h*t.width/2):new xS(s+l/c*t.height/2,n+t.height):r<i&&a<n?d=h<=u?new xS(r+t.width,o-h*t.width/2):new xS(s+t.height/2*l/c,n):i<r&&a<n&&(d=h<=u?new xS(r,o-t.width/2*h):new xS(s-t.height/2*l/c,n)),d},"getIntersectPoint"),wS=me(function(t,e){var r={x:0,y:0},n=(r.x=e.x+e.width/2,r.y=e.y+e.height/2,bS(t,r));return r.x=t.x+t.width/2,r.y=t.y+t.height/2,{startPoint:n,endPoint:t=bS(e,r)}},"getIntersectPoints"),kS=me(function(t,e,r,n){let i=0;for(var a of e){i+=1;var s=a.wrap&&uS.wrap,o=mS(uS);"C4Dynamic"===n.db.getC4Type()&&(a.label.text=i+": "+a.label.text);let t=EC(a.label.text,o);aS("label",a,s,o,t),a.techn&&""!==a.techn.text&&aS("techn",a,s,o,t=EC(a.techn.text,o)),a.descr&&""!==a.descr.text&&aS("descr",a,s,o,t=EC(a.descr.text,o)),s=r(a.from),o=r(a.to),s=wS(s,o),a.startPoint=s.startPoint,a.endPoint=s.endPoint}Hw.drawRels(t,e,uS)},"drawRels"),me(sS,"drawInsideBoundary"),TS=me(function(t,e,r,n){uS=O().c4;let i=O().securityLevel,a;"sandbox"===i&&(a=H("#i"+e));var s=H("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o=n.db,o=(n.db.setWrap(uS.wrap),cS=o.getC4ShapeInRow(),hS=o.getC4BoundaryInRow(),D.debug("C:"+JSON.stringify(uS,null,2)),"sandbox"===i?s.select(`[id="${e}"]`):H(`[id="${e}"]`)),s=(Hw.insertComputerIcon(o),Hw.insertDatabaseIcon(o),Hw.insertClockIcon(o),(s=new dS(n)).setData(uS.diagramMarginX,uS.diagramMarginX,uS.diagramMarginY,uS.diagramMarginY),s.data.widthLimit=screen.availWidth,oS=uS.diagramMarginX,lS=uS.diagramMarginY,e=n.db.getTitle(),sS(o,0,s,n.db.getBoundaries(""),n),Hw.insertArrowHead(o),Hw.insertArrowEnd(o),Hw.insertArrowCrossHead(o),Hw.insertArrowFilledHead(o),kS(o,n.db.getRels(),n.db.getC4Shape,n),s.data.stopx=oS,s.data.stopy=lS,(n=s.data).stopy-n.starty+2*uS.diagramMarginY),l=n.stopx-n.startx+2*uS.diagramMarginX,e=(e&&o.append("text").text(e).attr("x",(n.stopx-n.startx)/2-4*uS.diagramMarginX).attr("y",n.starty+uS.diagramMarginY),Zc(o,s,l,uS.useMaxWidth),e?60:0);o.attr("viewBox",n.startx-uS.diagramMarginX+" -"+(uS.diagramMarginY+e)+" "+l+" "+(s+e)),D.debug("models:",n)},"draw"),ES={drawPersonOrSystemArray:vS,drawBoundary:yS,setConf:pS,draw:TS}}),AS=b(()=>{CS=me(t=>`.person { + stroke: ${t.personBorder}; + fill: ${t.personBkg}; + } +`,"getStyles"),SS=CS}),LS={};KBt(LS,{diagram:()=>NS});var NS,IS=b(()=>{oh(),Eu(),_S(),AS(),NS={parser:Vc,db:wu,renderer:ES,styles:SS,init:me(({c4:t,wrap:e})=>{ES.setConf(t),wu.setWrap(e)},"init")}});function RS(t){return"u"<typeof t||null===t}function MS(t){return"object"==typeof t&&null!==t}function DS(t){return Array.isArray(t)?t:RS(t)?[]:[t]}function OS(t,e){var r,n,i,a;if(e)for(r=0,n=(a=Object.keys(e)).length;r<n;r+=1)t[i=a[r]]=e[i];return t}function PS(t,e){for(var r="",n=0;n<e;n+=1)r+=t;return r}function BS(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}function $S(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=` + +`+t.mark.snippet),n+" "+r):n}function FS(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=$S(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}function zS(t,e,r,n,i){var a="",s="";return(i=Math.floor(i/2)-1)<n-e&&(e=n-i+(a=" ... ").length),i<r-n&&(r=n+i-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:n-e+a.length}}function GS(t,e){return BA.repeat(" ",e-t.length)+t}function US(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],s=-1;r=n.exec(t.buffer);)a.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);for(var o,l="",c=Math.min(t.line+e.linesAfter,a.length).toString().length,h=e.maxLength-(e.indent+c+3),u=1;u<=e.linesBefore&&!(s-u<0);u++)o=zS(t.buffer,i[s-u],a[s-u],t.position-(i[s]-i[s-u]),h),l=BA.repeat(" ",e.indent)+GS((t.line-u+1).toString(),c)+" | "+o.str+` +`+l;for(o=zS(t.buffer,i[s],a[s],t.position,h),l=(l+=BA.repeat(" ",e.indent)+GS((t.line+1).toString(),c)+" | "+o.str+` +`)+BA.repeat("-",e.indent+c+3+o.pos)+`^ +`,u=1;u<=e.linesAfter&&!(a.length<=s+u);u++)o=zS(t.buffer,i[s+u],a[s+u],t.position-(i[s]-i[s+u]),h),l+=BA.repeat(" ",e.indent)+GS((t.line+u+1).toString(),c)+" | "+o.str+` +`;return l.replace(/\n$/,"")}function qS(t){var r={};return null!==t&&Object.keys(t).forEach(function(e){t[e].forEach(function(t){r[String(t)]=e})}),r}function jS(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===zA.indexOf(t))throw new $A('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(t){return t},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=qS(t.styleAliases||null),-1===GA.indexOf(this.kind))throw new $A('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function WS(t,e){var i=[];return t[e].forEach(function(r){var n=i.length;i.forEach(function(t,e){t.tag===r.tag&&t.kind===r.kind&&t.multi===r.multi&&(n=e)}),i[n]=r}),i}function YS(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(me(n,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(n);return r}function HS(t){return this.extend(t)}function VS(t){var e;return null===t||1===(e=t.length)&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function XS(){return null}function KS(t){return null===t}function ZS(t){var e;return null!==t&&(4===(e=t.length)&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t))}function QS(t){return"true"===t||"True"===t||"TRUE"===t}function JS(t){return"[object Boolean]"===Object.prototype.toString.call(t)}function t_(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function e_(t){return 48<=t&&t<=55}function r_(t){return 48<=t&&t<=57}function n_(t){if(null===t)return!1;var e,r=t.length,n=0,i=!1;if(!r)return!1;if("0"===(e="-"!==(e=t[n])&&"+"!==e?e:t[++n])){if(n+1===r)return!0;if("b"===(e=t[++n])){for(n++;n<r;n++)if("_"!==(e=t[n])){if("0"!==e&&"1"!==e)return!1;i=!0}return i&&"_"!==e}if("x"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!t_(t.charCodeAt(n)))return!1;i=!0}return i&&"_"!==e}if("o"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!e_(t.charCodeAt(n)))return!1;i=!0}return i&&"_"!==e}}if("_"===e)return!1;for(;n<r;n++)if("_"!==(e=t[n])){if(!r_(t.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===e)}function i_(t){var e,r=1;if("-"!==(e=(t=-1!==t.indexOf("_")?t.replace(/_/g,""):t)[0])&&"+"!==e||("-"===e&&(r=-1),e=(t=t.slice(1))[0]),"0"===t)return 0;if("0"===e){if("b"===t[1])return r*parseInt(t.slice(2),2);if("x"===t[1])return r*parseInt(t.slice(2),16);if("o"===t[1])return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function a_(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!BA.isNegativeZero(t)}function s_(t){return!(null===t||!qA.test(t)||"_"===t[t.length-1])}function o_(t){var e="-"===(t=t.replace(/_/g,"").toLowerCase())[0]?-1:1;return".inf"===(t=0<="+-".indexOf(t[0])?t.slice(1):t)?1==e?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:e*parseFloat(t,10)}function l_(t,e){if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(BA.isNegativeZero(t))return"-0.0";return e=t.toString(10),jA.test(e)?e.replace("e",".e"):e}function c_(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||BA.isNegativeZero(t))}function h_(t){return null!==t&&(null!==YA.exec(t)||null!==HA.exec(t))}function u_(t){var e,r,n,i,a,s=0,o=null,l=YA.exec(t);if(null===(l=null===l?HA.exec(t):l))throw new Error("Date resolve error");if(t=+l[1],e=+l[2]-1,r=+l[3],!l[4])return new Date(Date.UTC(t,e,r));if(n=+l[4],i=+l[5],a=+l[6],l[7]){for(s=l[7].slice(0,3);s.length<3;)s+="0";s=+s}return l[9]&&(o=6e4*(60*+l[10]+ +(l[11]||0)),"-"===l[9])&&(o=-o),l=new Date(Date.UTC(t,e,r,n,i,a,s)),o&&l.setTime(l.getTime()-o),l}function d_(t){return t.toISOString()}function p_(t){return"<<"===t||null===t}function g_(t){if(null===t)return!1;for(var e,r=0,n=t.length,i=KA,a=0;a<n;a++)if(!(64<(e=i.indexOf(t.charAt(a))))){if(e<0)return!1;r+=6}return r%8==0}function f_(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,n=KA,i=0,a=[],s=0;s<r;s++)s%4==0&&s&&(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(e.charAt(s));return 0==(t=r%4*6)?(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)):18==t?(a.push(i>>10&255),a.push(i>>2&255)):12==t&&a.push(i>>4&255),new Uint8Array(a)}function m_(t){for(var e,r="",n=0,i=t.length,a=KA,s=0;s<i;s++)s%3==0&&s&&(r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+t[s];return 0==(e=i%3)?r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]:2==e?r=(r=(r=(r+=a[n>>10&63])+a[n>>4&63])+a[n<<2&63])+a[64]:1==e&&(r=(r=(r=(r+=a[n>>2&63])+a[n<<4&63])+a[64])+a[64]),r}function y_(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function v_(t){if(null!==t)for(var e,r,n,i=[],a=t,s=0,o=a.length;s<o;s+=1){if(e=a[s],n=!1,"[object Object]"!==JA.call(e))return!1;for(r in e)if(QA.call(e,r)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==i.indexOf(r))return!1;i.push(r)}return!0}function x_(t){return null!==t?t:[]}function b_(t){if(null!==t)for(var e,r,n=t,i=new Array(n.length),a=0,s=n.length;a<s;a+=1){if(e=n[a],"[object Object]"!==e9.call(e)||1!==(r=Object.keys(e)).length)return!1;i[a]=[r[0],e[r[0]]]}return!0}function w_(t){if(null===t)return[];for(var e,r,n=t,i=new Array(n.length),a=0,s=n.length;a<s;a+=1)e=n[a],r=Object.keys(e),i[a]=[r[0],e[r[0]]];return i}function k_(t){if(null!==t){var e,r=t;for(e in r)if(n9.call(r,e)&&null!==r[e])return!1}return!0}function T_(t){return null!==t?t:{}}function E_(t){return Object.prototype.toString.call(t)}function C_(t){return 10===t||13===t}function S_(t){return 9===t||32===t}function __(t){return 9===t||32===t||10===t||13===t}function A_(t){return 44===t||91===t||93===t||123===t||125===t}function L_(t){return 48<=t&&t<=57?t-48:97<=(t|=32)&&t<=102?t-97+10:-1}function N_(t){return 120===t?2:117===t?4:85===t?8:0}function I_(t){return 48<=t&&t<=57?t-48:-1}function R_(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?` +`:118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"
":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function M_(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function D_(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||a9,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function O_(t,e){return(t={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart}).snippet=FA(t),new $A(e,t)}function P_(t,e){throw O_(t,e)}function B_(t,e){t.onWarning&&t.onWarning.call(null,O_(t,e))}function $_(t,e,r,n){var i,a,s,o;if(e<r){if(o=t.input.slice(e,r),n)for(i=0,a=o.length;i<a;i+=1)9===(s=o.charCodeAt(i))||32<=s&&s<=1114111||P_(t,"expected valid JSON character");else g9.test(o)&&P_(t,"the stream contains non-printable characters");t.result+=o}}function F_(t,e,r,n){var i,a,s,o;for(BA.isObject(r)||P_(t,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(i=Object.keys(r)).length;s<o;s+=1)a=i[s],s9.call(e,a)||(e[a]=r[a],n[a]=!0)}function z_(t,e,r,n,i,a,s,o,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&P_(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===E_(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===E_(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)F_(t,e,a[c],r);else F_(t,e,a,r);else t.json||s9.call(r,i)||!s9.call(e,i)||(t.line=s||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,P_(t,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[i]=a,delete r[i];return e}function G_(t){var e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):P_(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function U_(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);0!==i;){for(;S_(i);)9===i&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&35===i)for(;10!==(i=t.input.charCodeAt(++t.position))&&13!==i&&0!==i;);if(!C_(i))break;for(G_(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position)}return-1!==r&&0!==n&&t.lineIndent<r&&B_(t,"deficient indentation"),n}function q_(t){var e=t.position,r=t.input.charCodeAt(e);return!(45!==r&&46!==r||r!==t.input.charCodeAt(e+1)||r!==t.input.charCodeAt(e+2)||0!==(r=t.input.charCodeAt(e+=3))&&!__(r))}function j_(t,e){1===e?t.result+=" ":1<e&&(t.result+=BA.repeat(` +`,e-1))}function W_(t,e,r){var n,i,a,s,o,l,c,h=t.kind,u=t.result,d=t.input.charCodeAt(t.position);if(__(d)||A_(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d||(63===d||45===d)&&(__(n=t.input.charCodeAt(t.position+1))||r&&A_(n)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,s=!1;0!==d;){if(58===d){if(__(n=t.input.charCodeAt(t.position+1))||r&&A_(n))break}else if(35===d){if(__(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&q_(t)||r&&A_(d))break;if(C_(d)){if(o=t.line,l=t.lineStart,c=t.lineIndent,U_(t,!1,-1),e<=t.lineIndent){s=!0,d=t.input.charCodeAt(t.position);continue}t.position=a,t.line=o,t.lineStart=l,t.lineIndent=c;break}}s&&($_(t,i,a,!1),j_(t,t.line-o),i=a=t.position,s=!1),S_(d)||(a=t.position+1),d=t.input.charCodeAt(++t.position)}return $_(t,i,a,!1),!!t.result||(t.kind=h,t.result=u,!1)}function Y_(t,e){var r,n,i=t.input.charCodeAt(t.position);if(39!==i)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(i=t.input.charCodeAt(t.position));)if(39===i){if($_(t,r,t.position,!0),39!==(i=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,n=t.position}else C_(i)?($_(t,r,n,!0),j_(t,U_(t,!1,e)),r=n=t.position):t.position===t.lineStart&&q_(t)?P_(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);P_(t,"unexpected end of the stream within a single quoted scalar")}function H_(t,e){var r,n,i,a,s,o=t.input.charCodeAt(t.position);if(34!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return $_(t,r,t.position,!0),t.position++,!0;if(92===o){if($_(t,r,t.position,!0),C_(o=t.input.charCodeAt(++t.position)))U_(t,!1,e);else if(o<256&&x9[o])t.result+=b9[o],t.position++;else if(0<(s=N_(o))){for(i=s,a=0;0<i;i--)0<=(s=L_(o=t.input.charCodeAt(++t.position)))?a=(a<<4)+s:P_(t,"expected hexadecimal character");t.result+=M_(a),t.position++}else P_(t,"unknown escape sequence");r=n=t.position}else C_(o)?($_(t,r,n,!0),j_(t,U_(t,!1,e)),r=n=t.position):t.position===t.lineStart&&q_(t)?P_(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}P_(t,"unexpected end of the stream within a double quoted scalar")}function V_(t,e){var r,n,i,a,s,o,l,c,h,u,d,p=!0,g=t.tag,f=t.anchor,m=Object.create(null),y=t.input.charCodeAt(t.position);if(91===y)c=!(s=93),a=[];else{if(123!==y)return!1;s=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),y=t.input.charCodeAt(++t.position);0!==y;){if(U_(t,!0,e),(y=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=g,t.anchor=f,t.kind=c?"mapping":"sequence",t.result=a,!0;p?44===y&&P_(t,"expected the node content, but found ','"):P_(t,"missed comma between flow collection entries"),d=null,o=l=!1,63===y&&__(t.input.charCodeAt(t.position+1))&&(o=l=!0,t.position++,U_(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,eA(t,e,o9,!1,!0),u=t.tag,h=t.result,U_(t,!0,e),y=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==y||(o=!0,y=t.input.charCodeAt(++t.position),U_(t,!0,e),eA(t,e,o9,!1,!0),d=t.result),c?z_(t,a,m,u,h,d,r,n,i):o?a.push(z_(t,null,m,u,h,d,r,n,i)):a.push(h),U_(t,!0,e),44===(y=t.input.charCodeAt(t.position))?(p=!0,y=t.input.charCodeAt(++t.position)):p=!1}P_(t,"unexpected end of the stream within a flow collection")}function X_(t,e){var r,n,i,a=u9,s=!1,o=!1,l=e,c=0,h=!1,u=t.input.charCodeAt(t.position);if(124===u)n=!1;else{if(62!==u)return!1;n=!0}for(t.kind="scalar",t.result="";0!==u;)if(43===(u=t.input.charCodeAt(++t.position))||45===u)u9===a?a=43===u?p9:d9:P_(t,"repeat of a chomping mode identifier");else{if(!(0<=(i=I_(u))))break;0===i?P_(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?P_(t,"repeat of an indentation width identifier"):(l=e+i-1,o=!0)}if(S_(u)){for(;S_(u=t.input.charCodeAt(++t.position)););if(35===u)for(;!C_(u=t.input.charCodeAt(++t.position))&&0!==u;);}for(;0!==u;){for(G_(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!o||t.lineIndent<l)&&32===u;)t.lineIndent++,u=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>l&&(l=t.lineIndent),C_(u))c++;else{if(t.lineIndent<l){a===p9?t.result+=BA.repeat(` +`,s?1+c:c):a===u9&&s&&(t.result+=` +`);break}for(n?S_(u)?(h=!0,t.result+=BA.repeat(` +`,s?1+c:c)):h?(h=!1,t.result+=BA.repeat(` +`,c+1)):0===c?s&&(t.result+=" "):t.result+=BA.repeat(` +`,c):t.result+=BA.repeat(` +`,s?1+c:c),o=s=!0,c=0,r=t.position;!C_(u)&&0!==u;)u=t.input.charCodeAt(++t.position);$_(t,r,t.position,!1)}}return!0}function K_(t,e){var r,n,i=t.tag,a=t.anchor,s=[],o=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),n=t.input.charCodeAt(t.position);0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,P_(t,"tab characters must not be used in indentation")),45===n)&&__(t.input.charCodeAt(t.position+1));)if(o=!0,t.position++,U_(t,!0,-1)&&t.lineIndent<=e)s.push(null),n=t.input.charCodeAt(t.position);else if(r=t.line,eA(t,e,c9,!1,!0),s.push(t.result),U_(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==n)P_(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!o&&(t.tag=i,t.anchor=a,t.kind="sequence",t.result=s,!0)}function Z_(t,e,r){var n,i,a,s,o,l,c,h=t.tag,u=t.anchor,d={},p=Object.create(null),g=null,f=null,m=null,y=!1,v=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),c=t.input.charCodeAt(t.position);0!==c;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,P_(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),a=t.line,63!==c&&58!==c||!__(n)){if(s=t.line,o=t.lineStart,l=t.position,!eA(t,r,l9,!1,!0))break;if(t.line===a){for(c=t.input.charCodeAt(t.position);S_(c);)c=t.input.charCodeAt(++t.position);if(58===c)__(c=t.input.charCodeAt(++t.position))||P_(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(z_(t,d,p,g,f,null,s,o,l),g=f=m=null),i=y=!(v=!0),g=t.tag,f=t.result;else{if(!v)return t.tag=h,t.anchor=u,!0;P_(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=h,t.anchor=u,!0;P_(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(z_(t,d,p,g,f,null,s,o,l),g=f=m=null),i=y=v=!0):y?i=!(y=!1):P_(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=n;if((t.line===a||t.lineIndent>e)&&(y&&(s=t.line,o=t.lineStart,l=t.position),eA(t,e,h9,!0,i)&&(y?f=t.result:m=t.result),y||(z_(t,d,p,g,f,m,s,o,l),g=f=m=null),U_(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)P_(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&z_(t,d,p,g,f,null,s,o,l),v&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),v}function Q_(t){var e,r,n,i=!1,a=!1,s=t.input.charCodeAt(t.position);if(33!==s)return!1;if(null!==t.tag&&P_(t,"duplication of a tag property"),60===(s=t.input.charCodeAt(++t.position))?(i=!0,s=t.input.charCodeAt(++t.position)):33===s?(a=!0,r="!!",s=t.input.charCodeAt(++t.position)):r="!",e=t.position,i){for(;0!==(s=t.input.charCodeAt(++t.position))&&62!==s;);t.position<t.length?(n=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):P_(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!__(s);)33===s&&(a?P_(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),y9.test(r)||P_(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),m9.test(n)&&P_(t,"tag suffix cannot contain flow indicator characters")}n&&!v9.test(n)&&P_(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{P_(t,"tag name is malformed: "+n)}return i?t.tag=n:s9.call(t.tagMap,r)?t.tag=t.tagMap[r]+n:"!"===r?t.tag="!"+n:"!!"===r?t.tag="tag:yaml.org,2002:"+n:P_(t,'undeclared tag handle "'+r+'"'),!0}function J_(t){var e,r=t.input.charCodeAt(t.position);if(38!==r)return!1;for(null!==t.anchor&&P_(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!__(r)&&!A_(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&P_(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function tA(t){var e,r=t.input.charCodeAt(t.position);if(42!==r)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!__(r)&&!A_(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&P_(t,"name of an alias node must contain at least one character"),e=t.input.slice(e,t.position),s9.call(t.anchorMap,e)||P_(t,'unidentified alias "'+e+'"'),t.result=t.anchorMap[e],U_(t,!0,-1),!0}function eA(t,e,r,n,i){var a,s,o,l,c,h,u,d=1,p=!1,g=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=o=h9===r||c9===r,n&&U_(t,!0,-1)&&(p=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;Q_(t)||J_(t);)U_(t,!0,-1)?(p=!0,o=a,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):o=!1;if(o=o&&(p||i),1!==d&&h9!==r||(n=o9===r||l9===r?e:e+1,i=t.position-t.lineStart,1===d?o&&(K_(t,i)||Z_(t,i,n))||V_(t,n)?g=!0:(s&&X_(t,n)||Y_(t,n)||H_(t,n)?g=!0:tA(t)?(g=!0,null===t.tag&&null===t.anchor||P_(t,"alias node should not have any properties")):W_(t,n,o9===r)&&(g=!0,null===t.tag)&&(t.tag="?"),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===d&&(g=o&&K_(t,i))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&P_(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l<c;l+=1)if((u=t.implicitTypes[l]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(s9.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,l=0,c=(h=t.typeMap.multi[t.kind||"fallback"]).length;l<c;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||P_(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&P_(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):P_(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function rA(t){var e,r,n,i,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(U_(t,!0,-1),i=t.input.charCodeAt(t.position),!(0<t.lineIndent||37!==i));){for(s=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!__(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&P_(t,"directive name must not be less than one character in length");0!==i;){for(;S_(i);)i=t.input.charCodeAt(++t.position);if(35===i){for(;0!==(i=t.input.charCodeAt(++t.position))&&!C_(i););break}if(C_(i))break;for(e=t.position;0!==i&&!__(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&G_(t),s9.call(k9,r)?k9[r](t,r,n):B_(t,'unknown document directive "'+r+'"')}U_(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,U_(t,!0,-1)):s&&P_(t,"directives end mark is expected"),eA(t,t.lineIndent-1,h9,!1,!0),U_(t,!0,-1),t.checkLineBreaks&&f9.test(t.input.slice(a,t.position))&&B_(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&q_(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,U_(t,!0,-1)):t.position<t.length-1&&P_(t,"end of the stream or a document separator is expected")}function nA(t,e){e=e||{};var r=new D_(t=0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+=` +`),65279===t.charCodeAt(0))?t.slice(1):t,e);for(-1!==(e=t.indexOf("\0"))&&(r.position=e,P_(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)rA(r);return r.documents}function iA(t,e,r){null!==e&&"object"==typeof e&&"u"<typeof r&&(r=e,e=null);var n=nA(t,r);if("function"!=typeof e)return n;for(var i=0,a=n.length;i<a;i+=1)e(n[i])}function aA(t,e){if(0!==(t=nA(t,e)).length){if(1===t.length)return t[0];throw new $A("expected a single document in the stream, but found more")}}function sA(t,e){var r,n,i,a,s,o,l;if(null===e)return{};for(r={},i=0,a=(n=Object.keys(e)).length;i<a;i+=1)s=n[i],o=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=t.compiledTypeMap.fallback[s])&&C9.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}function oA(t){var e,r,n=t.toString(16).toUpperCase();if(t<=255)e="x",r=2;else if(t<=65535)e="u",r=4;else{if(!(t<=4294967295))throw new $A("code point within a string may not be greater than 0xFFFFFFFF");e="U",r=8}return"\\"+e+BA.repeat("0",r-n.length)+n}function lA(t){this.schema=t.schema||a9,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=BA.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=sA(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?I9:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function cA(t,e){for(var r,n,i=BA.repeat(" ",e),a=0,s="",o=t.length;a<o;)a=-1===(r=t.indexOf(` +`,a))?(n=t.slice(a),o):(n=t.slice(a,r+1),r+1),n.length&&n!==` +`&&(s+=i),s+=n;return s}function hA(t,e){return` +`+BA.repeat(" ",t.indent*e)}function uA(t,e){for(var r=0,n=t.implicitTypes.length;r<n;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function dA(t){return 32===t||9===t}function pA(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==S9||65536<=t&&t<=1114111}function gA(t){return pA(t)&&t!==S9&&13!==t&&t!==_9}function fA(t,e,r){var n=gA(t),i=n&&!dA(t);return(r?n:n&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!i)||gA(e)&&!dA(e)&&35===t||58===e&&i}function mA(t){return pA(t)&&t!==S9&&!dA(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function yA(t){return!dA(t)&&58!==t}function vA(t,e){var r=t.charCodeAt(e);return 55296<=r&&r<=56319&&e+1<t.length&&56320<=(t=t.charCodeAt(e+1))&&t<=57343?1024*(r-55296)+t-56320+65536:r}function xA(t){return/^\n* /.test(t)}function bA(t,e,r,n,i,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==n,g=-1,f=mA(vA(t,0))&&yA(vA(t,t.length-1));if(e||s)for(l=0;l<t.length;65536<=c?l+=2:l++){if(!pA(c=vA(t,l)))return P9;f=f&&fA(c,h,o),h=c}else{for(l=0;l<t.length;65536<=c?l+=2:l++){if((c=vA(t,l))===_9)u=!0,p&&(d=d||n<l-g-1&&" "!==t[g+1],g=l);else if(!pA(c))return P9;f=f&&fA(c,h,o),h=c}d=d||p&&n<l-g-1&&" "!==t[g+1]}return u||d?9<r&&xA(t)?P9:s?a===I9?P9:M9:d?O9:D9:!f||s||i(t)?a===I9?P9:M9:R9}function wA(i,a,s,o,l){i.dump=(()=>{if(0===a.length)return i.quotingType===I9?'""':"''";if(!i.noCompatMode&&(-1!==L9.indexOf(a)||N9.test(a)))return i.quotingType===I9?'"'+a+'"':"'"+a+"'";var t=i.indent*Math.max(1,s),e=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-t),r=o||-1<i.flowLevel&&s>=i.flowLevel;function n(t){return uA(i,t)}switch(me(n,"testAmbiguity"),bA(a,r,i.indent,e,n,i.quotingType,i.forceQuotes&&!o,l)){case R9:return a;case M9:return"'"+a.replace(/'/g,"''")+"'";case D9:return"|"+kA(a,i.indent)+TA(cA(a,t));case O9:return">"+kA(a,i.indent)+TA(cA(EA(a,e),t));case P9:return'"'+SA(a)+'"';default:throw new $A("impossible error: invalid scalar style")}})()}function kA(t,e){var e=xA(t)?String(e):"",r=t[t.length-1]===` +`;return e+(!r||t[t.length-2]!==` +`&&t!==` +`?r?"":"-":"+")+` +`}function TA(t){return t[t.length-1]===` +`?t.slice(0,-1):t}function EA(t,e){for(var r,n=/(\n+)([^\n]*)/g,i=(r=-1!==(r=t.indexOf(` +`))?r:t.length,n.lastIndex=r,CA(t.slice(0,r),e)),a=t[0]===` +`||" "===t[0];o=n.exec(t);){var s=o[1],o=o[2],l=" "===o[0];i+=s+(a||l||""===o?"":` +`)+CA(o,e),a=l}return i}function CA(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,s=0,o="";n=i.exec(t);)e<(n=n.index)-a&&(o+=` +`+t.slice(a,r=a<s?s:n),a=r+1),s=n;return o+=` +`,t.length-a>e&&a<s?o+=t.slice(a,s)+` +`+t.slice(s+1):o+=t.slice(a),o.slice(1)}function SA(t){for(var e,r,n="",i=0;i<t.length;65536<=e?i+=2:i++)e=vA(t,i),!(r=A9[e])&&pA(e)?(n+=t[i],65536<=e&&(n+=t[i+1])):n+=r||oA(e);return n}function _A(t,e,r){for(var n,i="",a=t.tag,s=0,o=r.length;s<o;s+=1)n=r[s],t.replacer&&(n=t.replacer.call(r,String(s),n)),(RA(t,e,n,!1,!1)||"u"<typeof n&&RA(t,e,null,!1,!1))&&(""!==i&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=a,t.dump="["+i+"]"}function AA(t,e,r,n){for(var i,a="",s=t.tag,o=0,l=r.length;o<l;o+=1)i=r[o],t.replacer&&(i=t.replacer.call(r,String(o),i)),(RA(t,e+1,i,!0,!0,!1,!0)||"u"<typeof i&&RA(t,e+1,null,!0,!0,!1,!0))&&(n&&""===a||(a+=hA(t,e)),t.dump&&_9===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=s,t.dump=a||"[]"}function LA(t,e,r){for(var n,i,a,s="",o=t.tag,l=Object.keys(r),c=0,h=l.length;c<h;c+=1)(a="")!==s&&(a+=", "),t.condenseFlow&&(a+='"'),i=r[n=l[c]],t.replacer&&(i=t.replacer.call(r,n,i)),RA(t,e,n,!1,!1)&&(1024<t.dump.length&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),RA(t,e,i,!1,!1))&&(s+=a+=t.dump);t.tag=o,t.dump="{"+s+"}"}function NA(t,e,r,n){var i,a,s,o,l,c="",h=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new $A("sortKeys must be a boolean or a function");for(i=0,a=u.length;i<a;i+=1)l="",n&&""===c||(l+=hA(t,e)),s=r[o=u[i]],t.replacer&&(s=t.replacer.call(r,o,s)),RA(t,e+1,o,!0,!0,!0)&&((o=null!==t.tag&&"?"!==t.tag||t.dump&&1024<t.dump.length)&&(t.dump&&_9===t.dump.charCodeAt(0)?l+="?":l+="? "),l+=t.dump,o&&(l+=hA(t,e)),RA(t,e+1,s,!0,o))&&(t.dump&&_9===t.dump.charCodeAt(0)?l+=":":l+=": ",c+=l+=t.dump);t.tag=h,t.dump=c||"{}"}function IA(t,e,r){for(var n,i,a,s=r?t.explicitTypes:t.implicitTypes,o=0,l=s.length;o<l;o+=1)if(((i=s[o]).instanceOf||i.predicate)&&(!i.instanceOf||"object"==typeof e&&e instanceof i.instanceOf)&&(!i.predicate||i.predicate(e))){if(r?i.multi&&i.representName?t.tag=i.representName(e):t.tag=i.tag:t.tag="?",i.represent){if(a=t.styleMap[i.tag]||i.defaultStyle,"[object Function]"===E9.call(i.represent))n=i.represent(e,a);else{if(!C9.call(i.represent,a))throw new $A("!<"+i.tag+'> tag resolver accepts not "'+a+'" style');n=i.represent[a](e,a)}t.dump=n}return!0}return!1}function RA(t,e,r,n,i,a,s){t.tag=null,t.dump=r,IA(t,r,!1)||IA(t,r,!0);var o,l,c=E9.call(t.dump),h=n,u=(n=n&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0<e)&&(i=!1),l&&t.usedDuplicates[o])t.dump="*ref_"+o;else{if(u&&l&&!t.usedDuplicates[o]&&(t.usedDuplicates[o]=!0),"[object Object]"===c)n&&0!==Object.keys(t.dump).length?(NA(t,e,t.dump,i),l&&(t.dump="&ref_"+o+t.dump)):(LA(t,e,t.dump),l&&(t.dump="&ref_"+o+" "+t.dump));else if("[object Array]"===c)n&&0!==t.dump.length?(t.noArrayIndent&&!s&&0<e?AA(t,e-1,t.dump,i):AA(t,e,t.dump,i),l&&(t.dump="&ref_"+o+t.dump)):(_A(t,e,t.dump),l&&(t.dump="&ref_"+o+" "+t.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(t.skipInvalid)return!1;throw new $A("unacceptable kind of an object to dump "+c)}"?"!==t.tag&&wA(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(r=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),r="!"===t.tag[0]?"!"+r:"tag:yaml.org,2002:"===r.slice(0,18)?"!!"+r.slice(18):"!<"+r+">",t.dump=r+" "+t.dump)}return!0}function MA(t,e){var r,n,i=[],a=[];for(DA(t,i,a),r=0,n=a.length;r<n;r+=1)e.duplicates.push(i[a[r]]);e.usedDuplicates=new Array(n)}function DA(t,e,r){var n,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=e.indexOf(t)))-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)DA(t[i],e,r);else for(i=0,a=(n=Object.keys(t)).length;i<a;i+=1)DA(t[n[i]],e,r)}function OA(t,e){return(e=new lA(e=e||{})).noRefs||MA(t,e),e.replacer&&(t=e.replacer.call({"":t},"",t)),RA(e,0,t,!0,!0)?e.dump+` +`:""}function PA(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var BA,$A,FA,zA,GA,UA,qA,jA,WA,YA,HA,VA,XA,KA,ZA,QA,JA,t9,e9,r9,n9,i9,a9,s9,o9,l9,c9,h9,u9,d9,p9,g9,f9,m9,y9,v9,x9,b9,w9,k9,T9,E9,C9,S9,_9,A9,L9,N9,I9,R9,M9,D9,O9,P9,B9,$9,F9=b(()=>{for(me(RS,"isNothing"),me(MS,"isObject"),me(DS,"toArray"),me(OS,"extend"),me(PS,"repeat"),me(BS,"isNegativeZero"),BA={isNothing:RS,isObject:MS,toArray:DS,repeat:PS,isNegativeZero:BS,extend:OS},me($S,"formatError"),me(FS,"YAMLException$1"),((FS.prototype=Object.create(Error.prototype)).constructor=FS).prototype.toString=me(function(t){return this.name+": "+$S(this,t)},"toString"),$A=FS,me(zS,"getLine"),me(GS,"padStart"),me(US,"makeSnippet"),FA=US,zA=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],GA=["scalar","sequence","mapping"],me(qS,"compileStyleAliases"),me(jS,"Type$1"),UA=jS,me(WS,"compileList"),me(YS,"compileMap"),me(HS,"Schema$1"),HS.prototype.extend=me(function(t){var e=[],r=[];if(t instanceof UA)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new $A("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}return e.forEach(function(t){if(!(t instanceof UA))throw new $A("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new $A("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new $A("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof UA))throw new $A("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create(HS.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=WS(t,"implicit"),t.compiledExplicit=WS(t,"explicit"),t.compiledTypeMap=YS(t.compiledImplicit,t.compiledExplicit),t},"extend"),WA=HS,T9=new UA("tag:yaml.org,2002:str",{kind:"scalar",construct:me(function(t){return null!==t?t:""},"construct")}),VA=new UA("tag:yaml.org,2002:seq",{kind:"sequence",construct:me(function(t){return null!==t?t:[]},"construct")}),XA=new UA("tag:yaml.org,2002:map",{kind:"mapping",construct:me(function(t){return null!==t?t:{}},"construct")}),WA=new WA({explicit:[T9,VA,XA]}),me(VS,"resolveYamlNull"),me(XS,"constructYamlNull"),me(KS,"isNull"),T9=new UA("tag:yaml.org,2002:null",{kind:"scalar",resolve:VS,construct:XS,predicate:KS,represent:{canonical:me(function(){return"~"},"canonical"),lowercase:me(function(){return"null"},"lowercase"),uppercase:me(function(){return"NULL"},"uppercase"),camelcase:me(function(){return"Null"},"camelcase"),empty:me(function(){return""},"empty")},defaultStyle:"lowercase"}),me(ZS,"resolveYamlBoolean"),me(QS,"constructYamlBoolean"),me(JS,"isBoolean"),VA=new UA("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ZS,construct:QS,predicate:JS,represent:{lowercase:me(function(t){return t?"true":"false"},"lowercase"),uppercase:me(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:me(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),me(t_,"isHexCode"),me(e_,"isOctCode"),me(r_,"isDecCode"),me(n_,"resolveYamlInteger"),me(i_,"constructYamlInteger"),me(a_,"isInteger"),XA=new UA("tag:yaml.org,2002:int",{kind:"scalar",resolve:n_,construct:i_,predicate:a_,represent:{binary:me(function(t){return 0<=t?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:me(function(t){return 0<=t?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:me(function(t){return t.toString(10)},"decimal"),hexadecimal:me(function(t){return 0<=t?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),qA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),me(s_,"resolveYamlFloat"),me(o_,"constructYamlFloat"),jA=/^[-+]?[0-9]+e/,me(l_,"representYamlFloat"),me(c_,"isFloat"),ZA=new UA("tag:yaml.org,2002:float",{kind:"scalar",resolve:s_,construct:o_,predicate:c_,represent:l_,defaultStyle:"lowercase"}),WA=WA.extend({implicit:[T9,VA,XA,ZA]}),T9=WA,YA=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),HA=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),me(h_,"resolveYamlTimestamp"),me(u_,"constructYamlTimestamp"),me(d_,"representYamlTimestamp"),VA=new UA("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:h_,construct:u_,instanceOf:Date,represent:d_}),me(p_,"resolveYamlMerge"),XA=new UA("tag:yaml.org,2002:merge",{kind:"scalar",resolve:p_}),KA=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`,me(g_,"resolveYamlBinary"),me(f_,"constructYamlBinary"),me(m_,"representYamlBinary"),me(y_,"isBinary"),ZA=new UA("tag:yaml.org,2002:binary",{kind:"scalar",resolve:g_,construct:f_,predicate:y_,represent:m_}),QA=Object.prototype.hasOwnProperty,JA=Object.prototype.toString,me(v_,"resolveYamlOmap"),me(x_,"constructYamlOmap"),t9=new UA("tag:yaml.org,2002:omap",{kind:"sequence",resolve:v_,construct:x_}),e9=Object.prototype.toString,me(b_,"resolveYamlPairs"),me(w_,"constructYamlPairs"),r9=new UA("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:b_,construct:w_}),n9=Object.prototype.hasOwnProperty,me(k_,"resolveYamlSet"),me(T_,"constructYamlSet"),i9=new UA("tag:yaml.org,2002:set",{kind:"mapping",resolve:k_,construct:T_}),a9=T9.extend({implicit:[VA,XA],explicit:[ZA,t9,r9,i9]}),s9=Object.prototype.hasOwnProperty,h9=4,u9=o9=1,d9=l9=2,p9=c9=3,g9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f9=/[\x85\u2028\u2029]/,m9=/[,\[\]\{\}]/,y9=/^(?:!|!!|![a-z\-]+!)$/i,v9=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,me(E_,"_class"),me(C_,"is_EOL"),me(S_,"is_WHITE_SPACE"),me(__,"is_WS_OR_EOL"),me(A_,"is_FLOW_INDICATOR"),me(L_,"fromHexCode"),me(N_,"escapedHexLen"),me(I_,"fromDecimalCode"),me(R_,"simpleEscapeSequence"),me(M_,"charFromCodepoint"),x9=new Array(256),b9=new Array(256),w9=0;w9<256;w9++)x9[w9]=R_(w9)?1:0,b9[w9]=R_(w9);me(D_,"State$1"),me(O_,"generateError"),me(P_,"throwError"),me(B_,"throwWarning"),k9={YAML:me(function(t,e,r){var n,i;null!==t.version&&P_(t,"duplication of %YAML directive"),1!==r.length&&P_(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&P_(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&P_(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=i<2,1!==i&&2!==i&&B_(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:me(function(t,e,r){var n;2!==r.length&&P_(t,"TAG directive accepts exactly two arguments"),n=r[1],y9.test(r=r[0])||P_(t,"ill-formed tag handle (first argument) of the TAG directive"),s9.call(t.tagMap,r)&&P_(t,'there is a previously declared suffix for "'+r+'" tag handle'),v9.test(n)||P_(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{P_(t,"tag prefix is malformed: "+n)}t.tagMap[r]=n},"handleTagDirective")},me($_,"captureSegment"),me(F_,"mergeMappings"),me(z_,"storeMappingPair"),me(G_,"readLineBreak"),me(U_,"skipSeparationSpace"),me(q_,"testDocumentSeparator"),me(j_,"writeFoldedLines"),me(W_,"readPlainScalar"),me(Y_,"readSingleQuotedScalar"),me(H_,"readDoubleQuotedScalar"),me(V_,"readFlowCollection"),me(X_,"readBlockScalar"),me(K_,"readBlockSequence"),me(Z_,"readBlockMapping"),me(Q_,"readTagProperty"),me(J_,"readAnchorProperty"),me(tA,"readAlias"),me(eA,"composeNode"),me(rA,"readDocument"),me(nA,"loadDocuments"),me(iA,"loadAll$1"),me(aA,"load$1"),T9={loadAll:iA,load:aA},E9=Object.prototype.toString,C9=Object.prototype.hasOwnProperty,S9=65279,_9=10,A9={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},L9=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N9=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,me(sA,"compileStyleMap"),me(oA,"encodeHex"),I9=2,me(lA,"State"),me(cA,"indentString"),me(hA,"generateNextLine"),me(uA,"testImplicitResolving"),me(dA,"isWhitespace"),me(pA,"isPrintable"),me(gA,"isNsCharOrWhitespace"),me(fA,"isPlainSafe"),me(mA,"isPlainSafeFirst"),me(yA,"isPlainSafeLast"),me(vA,"codePointAt"),me(xA,"needIndentIndicator"),R9=1,M9=2,D9=3,O9=4,P9=5,me(bA,"chooseScalarStyle"),me(wA,"writeScalar"),me(kA,"blockHeader"),me(TA,"dropEndingNewline"),me(EA,"foldString"),me(CA,"foldLine"),me(SA,"escapeString"),me(_A,"writeFlowSequence"),me(AA,"writeBlockSequence"),me(LA,"writeFlowMapping"),me(NA,"writeBlockMapping"),me(IA,"detectType"),me(RA,"writeNode"),me(MA,"getDuplicateReferences"),me(DA,"inspectNode"),me(OA,"dump$1"),me(PA,"renamed"),B9=WA,$9=T9.load,PA("safeLoad","load"),PA("safeLoadAll","loadAll"),PA("safeDump","dump")});function z9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function G9(t){Z9=t}function U9(t,e=""){let n="string"==typeof t?t:t.source,i={replace:me((t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(J9.caret,"$1"),n=n.replace(t,r),i},"replace"),getRegex:me(()=>new RegExp(n,e),"getRegex")};return i}function q9(t,e){if(e){if(J9.escapeTest.test(t))return t.replace(J9.escapeReplace,EL)}else if(J9.escapeTestNoEncode.test(t))return t.replace(J9.escapeReplaceNoEncode,EL);return t}function j9(t){try{t=encodeURI(t).replace(J9.percentDecode,"%")}catch{return null}return t}function W9(t,e){let r=t.replace(J9.findPipe,(t,e,r)=>{let n=!1,i=e;for(;0<=--i&&"\\"===r[i];)n=!n;return n?"|":" |"}),n=r.split(J9.splitPipe),i=0;if(n[0].trim()||n.shift(),0<n.length&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(J9.slashPipe,"|");return n}function Y9(t,e,r){var n=t.length;if(0===n)return"";let i=0;for(;i<n;){var a=t.charAt(n-i-1);if((a!==e||r)&&(a===e||!r))break;i++}return t.slice(0,n-i)}function H9(e,r){if(-1===e.indexOf(r[1]))return-1;let n=0;for(let t=0;t<e.length;t++)if("\\"===e[t])t++;else if(e[t]===r[0])n++;else if(e[t]===r[1]&&--n<0)return t;return 0<n?-2:-1}function V9(t,e,r,n,i){var a=e.href,e=e.title||null,i=t[1].replace(i.other.outputLinkReplace,"$1"),t=(n.state.inLink=!0,{type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:a,title:e,text:i,tokens:n.inlineTokens(i)});return n.state.inLink=!1,t}function X9(t,e,r){if(null===(t=t.match(r.other.indentCodeCompensation)))return e;let n=t[1];return e.split(` +`).map(t=>{var e=t.match(r.other.beginningSpace);return null!==e&&([e]=e,e.length>=n.length)?t.slice(n.length):t}).join(` +`)}function K9(t,e){return RL.parse(t,e)}var Z9,Q9,J9,tL,eL,rL,nL,iL,aL,sL,oL,lL,cL,hL,uL,dL,pL,gL,fL,mL,yL,vL,xL,bL,wL,kL,TL,EL,CL,SL,_L,AL,LL,NL,IL,RL,ML=b(()=>{me(z9,"_getDefaults"),Z9=z9(),me(G9,"changeDefaults"),Q9={exec:me(()=>null,"exec")},me(U9,"edit"),J9={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:me(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},aL=/^(?:[ \t]*(?:\n|$))+/,sL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,rL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hL=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,nL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,iL=/(?:[*+-]|\d{1,9}[.)])/,xL=U9(gL=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,iL).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),gL=U9(gL).replace(/bull/g,iL).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),yL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uL=/^[^\n]+/,fL=/(?!\s*\])(?:\\.|[^\[\]\\])+/,eL=U9(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fL).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),iL=U9(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,iL).getRegex(),vL="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",pL=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bL=U9("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",pL).replace("tag",vL).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),dL=U9(yL).replace("hr",hL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vL).getRegex(),tL={blockquote:U9(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",dL).getRegex(),code:sL,def:eL,fences:rL,heading:nL,hr:hL,html:bL,lheading:xL,list:iL,newline:aL,paragraph:dL,table:Q9,text:uL},sL=U9("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vL).getRegex(),eL={...tL,lheading:gL,table:sL,paragraph:U9(yL).replace("hr",hL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sL).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vL).getRegex()},rL={...tL,html:U9(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pL).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Q9,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:U9(yL).replace("hr",hL).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",xL).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},nL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,iL=/^( {2,}|\\)\n(?!\s*$)/,aL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,dL=/[\p{P}\p{S}]/u,uL=/[\s\p{P}\p{S}]/u,gL=/[^\s\p{P}\p{S}]/u,sL=U9(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,uL).getRegex(),vL=/(?!~)[\p{P}\p{S}]/u,yL=/(?!~)[\s\p{P}\p{S}]/u,hL=/(?:[^\s\p{P}\p{S}]|~)/u,xL=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,IL=U9(oL=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,dL).getRegex(),oL=U9(oL,"u").replace(/punct/g,vL).getRegex(),lL=U9(cL="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,gL).replace(/punctSpace/g,uL).replace(/punct/g,dL).getRegex(),cL=U9(cL,"gu").replace(/notPunctSpace/g,hL).replace(/punctSpace/g,yL).replace(/punct/g,vL).getRegex(),hL=U9("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gL).replace(/punctSpace/g,uL).replace(/punct/g,dL).getRegex(),yL=U9(/\\(punct)/,"gu").replace(/punct/g,dL).getRegex(),vL=U9(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),gL=U9(pL).replace("(?:--\x3e|$)","--\x3e").getRegex(),uL=U9("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",gL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dL=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pL=U9(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",dL).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gL=U9(/^!?\[(label)\]\[(ref)\]/).replace("label",dL).replace("ref",fL).getRegex(),fL=U9(/^!?\[(ref)\](?:\[\])?/).replace("ref",fL).getRegex(),mL=U9("reflink|nolink(?!\\()","g").replace("reflink",gL).replace("nolink",fL).getRegex(),vL={...yL={_backpedal:Q9,anyPunctuation:yL,autolink:vL,blockSkip:xL,br:iL,code:bL,del:Q9,emStrongLDelim:IL,emStrongRDelimAst:lL,emStrongRDelimUnd:hL,escape:nL,link:pL,nolink:fL,punctuation:sL,reflink:gL,reflinkSearch:mL,tag:uL,text:aL,url:Q9},link:U9(/^!?\[(label)\]\((.*?)\)/).replace("label",dL).getRegex(),reflink:U9(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dL).getRegex()},xL={...yL,emStrongRDelimAst:cL,emStrongLDelim:oL,url:U9(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},bL={...xL,br:U9(iL).replace("{2,}","*").getRegex(),text:U9(xL.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wL={normal:tL,gfm:eL,pedantic:rL},kL={normal:yL,gfm:xL,breaks:bL,pedantic:vL},TL={"&":"&","<":"<",">":">",'"':""","'":"'"},EL=me(t=>TL[t],"getEscapeReplacement"),me(q9,"escape2"),me(j9,"cleanUrl"),me(W9,"splitCells"),me(Y9,"rtrim"),me(H9,"findClosingBracket"),me(V9,"outputLink"),me(X9,"indentCodeCompensation"),CL=class{static{me(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||Z9}space(t){if((t=this.rules.block.newline.exec(t))&&0<t[0].length)return{type:"space",raw:t[0]}}code(t){var e;if(t=this.rules.block.code.exec(t))return e=t[0].replace(this.rules.other.codeRemoveIndent,""),{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Y9(e,` +`)}}fences(t){var e,r;if(t=this.rules.block.fences.exec(t))return r=X9(e=t[0],t[3]||"",this.rules),{type:"code",raw:e,lang:t[2]&&t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:r}}heading(e){var r;if(e=this.rules.block.heading.exec(e)){let t=e[2].trim();return this.rules.other.endingHash.test(t)&&(r=Y9(t,"#"),!this.options.pedantic&&r&&!this.rules.other.endingSpaceChar.test(r)||(t=r.trim())),{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){if(t=this.rules.block.hr.exec(t))return{type:"hr",raw:Y9(t[0],` +`)}}blockquote(t){if(t=this.rules.block.blockquote.exec(t)){let n=Y9(t[0],` +`).split(` +`),i="",a="",s=[];for(;0<n.length;){let t=!1,e=[],r;for(r=0;r<n.length;r++)if(this.rules.other.blockquoteStart.test(n[r]))e.push(n[r]),t=!0;else{if(t)break;e.push(n[r])}n=n.slice(r);var o,l=(c=e.join(` +`)).replace(this.rules.other.blockquoteSetextReplace,` + $1`).replace(this.rules.other.blockquoteSetextReplace2,""),c=(i=i?i+` +`+c:c,a=a?a+` +`+l:l,this.lexer.state.top);if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=c,0===n.length)break;if("code"===(l=s.at(-1))?.type)break;if("blockquote"===l?.type){var h=(c=l).raw+` +`+n.join(` +`),h=this.blockquote(h);s[s.length-1]=h,i=i.substring(0,i.length-c.raw.length)+h.raw,a=a.substring(0,a.length-c.text.length)+h.text;break}"list"===l?.type&&(h=(c=l).raw+` +`+n.join(` +`),o=this.list(h),s[s.length-1]=o,i=i.substring(0,i.length-l.raw.length)+o.raw,a=a.substring(0,a.length-c.raw.length)+o.raw,n=h.substring(s.at(-1).raw.length).split(` +`))}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(d){let p=this.rules.block.list.exec(d);if(p){let t=p[1].trim(),e=1<t.length,c={type:"list",raw:"",ordered:e,start:e?+t.slice(0,-1):"",loose:!1,items:[]},h=(t=e?"\\d{1,9}\\"+t.slice(-1):"\\"+t,this.options.pedantic&&(t=e?t:"[*+-]"),this.rules.other.listItemRegex(t)),u=!1;for(;d;){let t=!1,e="",r="";if(!(p=h.exec(d))||this.rules.block.hr.test(d))break;e=p[0],d=d.substring(e.length);let n=p[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),i=d.split(` +`,1)[0],a=!n.trim(),s=0;if(this.options.pedantic?(s=2,r=n.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(this.rules.other.nonSpaceChar))?1:s,r=n.slice(s),s+=p[1].length),a&&this.rules.other.blankLine.test(i)&&(e+=i+` +`,d=d.substring(i.length+1),t=!0),!t)for(var g=this.rules.other.nextBulletRegex(s),f=this.rules.other.hrRegex(s),m=this.rules.other.fencesBeginRegex(s),y=this.rules.other.headingBeginRegex(s),v=this.rules.other.htmlBeginRegex(s);d;){var x,b=d.split(` +`,1)[0];if(i=b,x=this.options.pedantic?i=i.replace(this.rules.other.listReplaceNesting," "):i.replace(this.rules.other.tabCharGlobal," "),m.test(i)||y.test(i)||v.test(i)||g.test(i)||f.test(i))break;if(x.search(this.rules.other.nonSpaceChar)>=s||!i.trim())r+=` +`+x.slice(s);else{if(a||4<=n.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||m.test(n)||y.test(n)||f.test(n))break;r+=` +`+i}a||i.trim()||(a=!0),e+=b+` +`,d=d.substring(b.length+1),n=x.slice(s)}c.loose||(u?c.loose=!0:this.rules.other.doubleBlankLine.test(e)&&(u=!0));let o=null,l;this.options.gfm&&(o=this.rules.other.listIsTask.exec(r))&&(l="[ ] "!==o[0],r=r.replace(this.rules.other.listReplaceTask,"")),c.items.push({type:"list_item",raw:e,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=e}var r,n=c.items.at(-1);if(n){n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd(),c.raw=c.raw.trimEnd();for(let t=0;t<c.items.length;t++)this.lexer.state.top=!1,c.items[t].tokens=this.lexer.blockTokens(c.items[t].text,[]),c.loose||(r=0<(r=c.items[t].tokens.filter(t=>"space"===t.type)).length&&r.some(t=>this.rules.other.anyLine.test(t.raw)),c.loose=r);if(c.loose)for(let t=0;t<c.items.length;t++)c.items[t].loose=!0;return c}}}html(t){if(t=this.rules.block.html.exec(t))return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(t){var e,r,n;if(t=this.rules.block.def.exec(t))return e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]&&t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:e,raw:t[0],href:r,title:n}}table(i){if((i=this.rules.block.table.exec(i))&&this.rules.other.tableDelimiter.test(i[2])){let e=W9(i[1]),t=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(` +`):[],n={type:"table",raw:i[0],header:[],align:[],rows:[]};if(e.length===t.length){for(var a of t)this.rules.other.tableAlignRight.test(a)?n.align.push("right"):this.rules.other.tableAlignCenter.test(a)?n.align.push("center"):this.rules.other.tableAlignLeft.test(a)?n.align.push("left"):n.align.push(null);for(let t=0;t<e.length;t++)n.header.push({text:e[t],tokens:this.lexer.inline(e[t]),header:!0,align:n.align[t]});for(var s of r)n.rows.push(W9(s,n.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}}lheading(t){if(t=this.rules.block.lheading.exec(t))return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(t){var e;if(t=this.rules.block.paragraph.exec(t))return e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(t){if(t=this.rules.block.text.exec(t))return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(t){if(t=this.rules.inline.escape.exec(t))return{type:"escape",raw:t[0],text:t[1]}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var n,i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;var a=Y9(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else{if(-2===(a=H9(r[2],"()")))return;-1<a&&(n=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]="")}let t=r[2],e="";return this.options.pedantic?(a=this.rules.other.pedanticHrefTitle.exec(t))&&(t=a[1],e=a[3]):e=r[3]?r[3].slice(1,-1):"",t=t.trim(),V9(r,{href:(t=this.rules.other.startAngleBracket.test(t)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?t.slice(1):t.slice(1,-1):t)&&t.replace(this.rules.inline.anyPunctuation,"$1"),title:e&&e.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,e){var r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t))return(t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?V9(r,t,r[0],this.lexer,this.rules):{type:"text",raw:e=r[0].charAt(0),text:e}}emStrong(s,o,t=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!l[1]&&!l[2]||!t||this.rules.inline.punctuation.exec(t))){let t=[...l[0]].length-1,e,r,n=t,i=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+t);null!=(l=a.exec(o));){var c,h;if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...e].length,l[3]||l[4])n+=r;else if((l[5]||l[6])&&t%3&&!((t+r)%3))i+=r;else if(!(0<(n-=r)))return r=Math.min(r,r+n+i),c=[...l[0]][0].length,c=s.slice(0,t+l.index+c+r),Math.min(t,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(n){if(n=this.rules.inline.code.exec(n)){let t=n[2].replace(this.rules.other.newLineCharGlobal," "),e=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return e&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:n[0],text:t}}}br(t){if(t=this.rules.inline.br.exec(t))return{type:"br",raw:t[0]}}del(t){if(t=this.rules.inline.del.exec(t))return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let t,e;return e="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var r,n;if(r=this.rules.inline.url.exec(t)){let t,e;if("@"===r[2])t=r[0],e="mailto:"+t;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);t=r[0],e="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){var e;if(t=this.rules.inline.text.exec(t))return e=this.lexer.state.inRawBlock,{type:"text",raw:t[0],text:t[0],escaped:e}}},SL=class r{static{me(this,"__Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Z9,this.options.tokenizer=this.options.tokenizer||new CL,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},t={other:J9,block:wL.normal,inline:kL.normal},this.options.pedantic?(t.block=wL.pedantic,t.inline=kL.pedantic):this.options.gfm&&(t.block=wL.gfm,this.options.breaks?t.inline=kL.breaks:t.inline=kL.gfm),this.tokenizer.rules=t}static get rules(){return{block:wL,inline:kL}}static lex(t,e){return new r(e).lex(t)}static lexInline(t,e){return new r(e).inlineTokens(t)}lex(t){t=t.replace(J9.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){var e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,r=[],n=!1){for(this.options.pedantic&&(i=i.replace(J9.tabCharGlobal," ").replace(J9.spaceLine,""));i;){let e;if(!this.options.extensions?.block?.some(t=>!!(e=t.call({lexer:this},i,r))&&(i=i.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.space(i)){i=i.substring(e.raw.length);var t=r.at(-1);1===e.raw.length&&void 0!==t?t.raw+=` +`:r.push(e)}else if(e=this.tokenizer.code(i))i=i.substring(e.raw.length),"paragraph"===(t=r.at(-1))?.type||"text"===t?.type?(t.raw+=` +`+e.raw,t.text+=` +`+e.text,this.inlineQueue.at(-1).src=t.text):r.push(e);else if(e=this.tokenizer.fences(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.heading(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.hr(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.blockquote(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.list(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.html(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.def(i)){i=i.substring(e.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=` +`+e.raw,a.text+=` +`+e.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title})}else if(e=this.tokenizer.table(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.lheading(i))i=i.substring(e.raw.length),r.push(e);else{let t=i;if(this.options.extensions?.startBlock){let e=1/0,r=i.slice(1),n;this.options.extensions.startBlock.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(t=i.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(t)))a=r.at(-1),n&&"paragraph"===a?.type?(a.raw+=` +`+e.raw,a.text+=` +`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(e),n=t.length!==i.length,i=i.substring(e.raw.length);else if(e=this.tokenizer.text(i)){i=i.substring(e.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=` +`+e.raw,s.text+=` +`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(e)}else if(i){if(s="Infinite loop on byte: "+i.charCodeAt(0),this.options.silent){console.error(s);break}throw new Error(s)}}}return this.state.top=!0,r}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(i,r=[]){let t=i,e=null;if(this.tokens.links){var n=Object.keys(this.tokens.links);if(0<n.length)for(;null!=(e=this.tokenizer.rules.inline.reflinkSearch.exec(t));)n.includes(e[0].slice(e[0].lastIndexOf("[")+1,-1))&&(t=t.slice(0,e.index)+"["+"a".repeat(e[0].length-2)+"]"+t.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(e=this.tokenizer.rules.inline.anyPunctuation.exec(t));)t=t.slice(0,e.index)+"++"+t.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(e=this.tokenizer.rules.inline.blockSkip.exec(t));)t=t.slice(0,e.index)+"["+"a".repeat(e[0].length-2)+"]"+t.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,s="";for(;i;){a||(s=""),a=!1;let e;if(!this.options.extensions?.inline?.some(t=>!!(e=t.call({lexer:this},i,r))&&(i=i.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.escape(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.tag(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.link(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(e.raw.length);var o=r.at(-1);"text"===e.type&&"text"===o?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e)}else if(e=this.tokenizer.emStrong(i,t,s))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.codespan(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.br(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.del(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.autolink(i))i=i.substring(e.raw.length),r.push(e);else if(!this.state.inLink&&(e=this.tokenizer.url(i)))i=i.substring(e.raw.length),r.push(e);else{let t=i;if(this.options.extensions?.startInline){let e=1/0,r=i.slice(1),n;this.options.extensions.startInline.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(t=i.substring(0,e+1))}if(e=this.tokenizer.inlineText(t))i=i.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(s=e.raw.slice(-1)),a=!0,"text"===(o=r.at(-1))?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e);else if(i){var l="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}}return r}},_L=class{static{me(this,"_Renderer")}options;parser;constructor(t){this.options=t||Z9}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(J9.notSpaceStart)?.[0],t=t.replace(J9.endingNewline,"")+` +`,e?'<pre><code class="language-'+q9(e)+'">'+(r?t:q9(t,!0))+`</code></pre> +`:"<pre><code>"+(r?t:q9(t,!0))+`</code></pre> +`}blockquote({tokens:t}){return`<blockquote> +${this.parser.parse(t)}</blockquote> +`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}> +`}hr(t){return`<hr> +`}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t<e.items.length;t++){var i=e.items[t];n+=this.listitem(i)}var a=t?"ol":"ul";return"<"+a+(t&&1!==r?' start="'+r+'"':"")+`> +`+n+"</"+a+`> +`}listitem(t){let e="",r;return t.task&&(r=this.checkbox({checked:!!t.checked}),t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&0<t.tokens[0].tokens.length&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+q9(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "),`<li>${e+=this.parser.parse(t.tokens,!!t.loose)}</li> +`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p> +`}table(e){let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let n="";for(let t=0;t<e.rows.length;t++){var i=e.rows[t];r="";for(let t=0;t<i.length;t++)r+=this.tablecell(i[t]);n+=this.tablerow({text:r})}return`<table> +<thead> +`+t+`</thead> +`+(n=n&&`<tbody>${n}</tbody>`)+`</table> +`}tablerow({text:t}){return`<tr> +${t}</tr> +`}tablecell(t){var e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}> +`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${q9(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),n=j9(t);if(null===n)return r;let i='<a href="'+(t=n)+'"';return e&&(i+=' title="'+q9(e)+'"'),i+=">"+r+"</a>"}image({href:t,title:e,text:r,tokens:n}){if(n&&(r=this.parser.parseInline(n,this.parser.textRenderer)),null===(n=j9(t)))return q9(r);let i=`<img src="${t=n}" alt="${r}"`;return e&&(i+=` title="${q9(e)}"`),i+=">"}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:q9(t.text)}},AL=class{static{me(this,"_TextRenderer")}strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},LL=class n{static{me(this,"__Parser")}options;renderer;textRenderer;constructor(t){this.options=t||Z9,this.options.renderer=this.options.renderer||new _L,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new AL}static parse(t,e){return new n(e).parse(t)}static parseInline(t,e){return new n(e).parseInline(t)}parse(n,i=!0){let a="";for(let r=0;r<n.length;r++){var t=n[r];if(this.options.extensions?.renderers?.[t.type]){var e=t,s=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==s||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){a+=s||"";continue}}var o=t;switch(o.type){case"space":a+=this.renderer.space(o);continue;case"hr":a+=this.renderer.hr(o);continue;case"heading":a+=this.renderer.heading(o);continue;case"code":a+=this.renderer.code(o);continue;case"table":a+=this.renderer.table(o);continue;case"blockquote":a+=this.renderer.blockquote(o);continue;case"list":a+=this.renderer.list(o);continue;case"html":a+=this.renderer.html(o);continue;case"paragraph":a+=this.renderer.paragraph(o);continue;case"text":{let t=o,e=this.renderer.text(t);for(;r+1<n.length&&"text"===n[r+1].type;)t=n[++r],e+=` +`+this.renderer.text(t);a+=i?this.renderer.paragraph({type:"paragraph",raw:e,text:e,tokens:[{type:"text",raw:e,text:e,escaped:!0}]}):e;continue}default:var l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}return a}parseInline(e,r=this.renderer){let n="";for(let t=0;t<e.length;t++){var i=e[t];if(this.options.extensions?.renderers?.[i.type]){var a=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}var s=i;switch(s.type){case"escape":n+=r.text(s);break;case"html":n+=r.html(s);break;case"link":n+=r.link(s);break;case"image":n+=r.image(s);break;case"strong":n+=r.strong(s);break;case"em":n+=r.em(s);break;case"codespan":n+=r.codespan(s);break;case"br":n+=r.br(s);break;case"del":n+=r.del(s);break;case"text":n+=r.text(s);break;default:var o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}return n}},NL=class{static{me(this,"_Hooks")}options;block;constructor(t){this.options=t||Z9}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?SL.lex:SL.lexInline}provideParser(){return this.block?LL.parse:LL.parseInline}},IL=class{static{me(this,"Marked")}defaults=z9();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=LL;Renderer=_L;TextRenderer=AL;Lexer=SL;Tokenizer=CL;Hooks=NL;constructor(...t){this.use(...t)}walkTokens(t,r){let n=[];for(var i of t)switch(n=n.concat(r.call(this,i)),i.type){case"table":var e,a,s=i;for(e of s.header)n=n.concat(this.walkTokens(e.tokens,r));for(a of s.rows)for(var o of a)n=n.concat(this.walkTokens(o.tokens,r));break;case"list":s=i,n=n.concat(this.walkTokens(s.items,r));break;default:{let e=i;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(t=>{t=e[t].flat(1/0),n=n.concat(this.walkTokens(t,r))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,r)))}}return n}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{var t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=i.renderers[n.name];r?i.renderers[n.name]=function(...t){var e=n.renderer.apply(this,t);return!1===e?r.apply(this,t):e}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");var t=i[n.level];t?t.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&("block"===n.level?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:"inline"===n.level&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),t.extensions=i),e.renderer){let i=this.defaults.renderer||new _L(this.defaults);for(var a in e.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let t=a,r=e.renderer[t],n=i[t];i[t]=(...t)=>{var e=r.apply(i,t);return(!1===e?n.apply(i,t):e)||""}}}t.renderer=i}if(e.tokenizer){let i=this.defaults.tokenizer||new CL(this.defaults);for(var s in e.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let t=s,r=e.tokenizer[t],n=i[t];i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.tokenizer=i}if(e.hooks){let i=this.defaults.hooks||new NL;for(var o in e.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(!["options","block"].includes(o)){let t=o,r=e.hooks[t],n=i[t];NL.passThroughHooks.has(o)?i[t]=t=>this.defaults.async?Promise.resolve(r.call(i,t)).then(t=>n.call(i,t)):(t=r.call(i,t),n.call(i,t)):i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.hooks=i}if(e.walkTokens){let r=this.defaults.walkTokens,n=e.walkTokens;t.walkTokens=function(t){let e=[];return e.push(n.call(this,t)),e=r?e.concat(r.call(this,t)):e}}this.defaults={...this.defaults,...t}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return SL.lex(t,e??this.defaults)}parser(t,e){return LL.parse(t,e??this.defaults)}parseMarkdown(o){return me((r,t)=>{let e={...t},n={...this.defaults,...e},i=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===e.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("u"<typeof r||null===r)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));n.hooks&&((n.hooks.options=n).hooks.block=o);let a=n.hooks?n.hooks.provideLexer():o?SL.lex:SL.lexInline,s=n.hooks?n.hooks.provideParser():o?LL.parse:LL.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(t=>a(t,n)).then(t=>n.hooks?n.hooks.processAllTokens(t):t).then(t=>n.walkTokens?Promise.all(this.walkTokens(t,n.walkTokens)).then(()=>t):t).then(t=>s(t,n)).then(t=>n.hooks?n.hooks.postprocess(t):t).catch(i);try{n.hooks&&(r=n.hooks.preprocess(r));let t=a(r,n),e=(n.hooks&&(t=n.hooks.processAllTokens(t)),n.walkTokens&&this.walkTokens(t,n.walkTokens),s(t,n));return n.hooks?n.hooks.postprocess(e):e}catch(t){return i(t)}},"parse2")}onError(r,n){return t=>{var e;if(t.message+=` +Please report this to https://github.com/markedjs/marked.`,r)return e="<p>An error occurred:</p><pre>"+q9(t.message+"",!0)+"</pre>",n?Promise.resolve(e):e;if(n)return Promise.reject(t);throw t}}},RL=new IL,me(K9,"marked"),K9.options=K9.setOptions=function(t){return RL.setOptions(t),G9(K9.defaults=RL.defaults),K9},K9.getDefaults=z9,K9.defaults=Z9,K9.use=function(...t){return RL.use(...t),G9(K9.defaults=RL.defaults),K9},K9.walkTokens=function(t,e){return RL.walkTokens(t,e)},K9.parseInline=RL.parseInline,K9.Parser=LL,K9.parser=LL.parse,K9.Renderer=_L,K9.TextRenderer=AL,K9.Lexer=SL,K9.lexer=SL.lex,K9.Tokenizer=CL,K9.Hooks=NL,K9.parse=K9,SL.lex});function DL(t,{markdownAutoWrap:e}){return t=Bc(t.replace(/<br\/>/g,` +`).replace(/\n{2,}/g,` +`)),!1===e?t.replace(/ /g," "):t}function OL(t,e={}){let r=DL(t,e),n=K9.lexer(r),i=[[]],a=0;function s(e,r="normal"){"text"===e.type?e.text.split(` +`).forEach((t,e)=>{0!==e&&(a++,i.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&i[a].push({content:t,type:r})})}):"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{s(t,e.type)}):"html"===e.type&&i[a].push({content:e.text,type:"normal"})}return me(s,"processNode"),n.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?i[a].push({content:t.text,type:"normal"}):i[a].push({content:t.raw,type:"normal"})}),i}function PL(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(r).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(r).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(r).join("")}</p>`:"space"===t.type?"":"html"===t.type?""+t.text:"escape"===t.type?t.text:(D.warn("Unsupported markdown: "+t.type),t.raw)}return t=K9.lexer(t),me(r,"output"),t.map(r).join("")}var BL=b(()=>{ML(),nh(),t(),me(DL,"preprocessMarkdown"),me(OL,"markdownToLines"),me(PL,"markdownToHTML")});function $L(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function FL(t,e){return zL(t,[],$L(e.content),e.type)}function zL(t,e,r,n){var i,a,s;return 0===r.length?[{content:e.join(""),type:n},{content:"",type:n}]:([i,...a]=r,t([{content:(s=[...e,i]).join(""),type:n}])?zL(t,s,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}]))}function GL(t,e){if(t.some(({content:t})=>t.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return UL(t,e)}function UL(t,e,r=[],n=[]){if(0===t.length)return 0<n.length&&r.push(n),0<r.length?r:[];let i="";" "===t[0].content&&(i=" ",t.shift());var a=t.shift()??{content:" ",type:"normal"},s=[...n];return""!==i&&s.push({content:i,type:"normal"}),s.push(a),e(s)?UL(t,e,r,s):(0<n.length?(r.push(n),t.unshift(a)):a.content&&([s,n]=FL(e,a),r.push([s]),n.content)&&t.unshift(n),UL(t,e,r))}var qL=b(()=>{me($L,"splitTextToChars"),me(FL,"splitWordToFitWidth"),me(zL,"splitWordToFitWidthRecursion"),me(GL,"splitLineToFitWidth"),me(UL,"splitLineToFitWidthRecursion")});function jL(t,e){e&&t.attr("style",e)}async function WL(t,e,r,n,i=!1,a=ar()){(t=t.append("foreignObject")).attr("width",10*r+"px"),t.attr("height",10*r+"px");var s=t.append("xhtml:div"),a=Ec(e.label)?await _c(e.label.replace(L.lineBreakRegex,` +`),a):lc(e.label,a),o=e.isNode?"nodeLabel":"edgeLabel",l=s.append("span");return l.html(a),jL(l,e.labelStyle),l.attr("class",o+" "+n),jL(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg"),(a=s.node().getBoundingClientRect()).width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),a=s.node().getBoundingClientRect()),t.node()}function YL(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function HL(t,e,r){return KL(e=YL(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function VL(t,e,r){return KL(e=YL(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function XL(e,t,r,n=!1){let i=t.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1"),o=0;for(var l of r){var c,h=me(t=>HL(i,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:GL(l,h))KL(YL(s,o,1.1),c),o++}return(n?(t=s.node().getBBox(),a.attr("x",t.x-2).attr("y",t.y-2).attr("width",t.width+4).attr("height",t.height+4),i):s).node()}function KL(n,t){n.text(""),t.forEach((t,e)=>{var r=n.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===e?r.text(t.content):r.text(" "+t.content)})}async function ZL(t,i={}){let a=[],e=(t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,n)=>(a.push((async()=>{var t=r+":"+n;return await Mc(t)?await Dc(t,void 0,{class:"label-icon"}):`<i class='${lc(e,i).replace(":"," ")}'></i>`})()),e)),await Promise.all(a));return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>e.shift()??"")}var QL,JL=b(()=>{i6(),Oc(),t(),BL(),iS(),Pc(),qL(),rn(),me(jL,"applyStyle"),me(WL,"addHtmlSpan"),me(YL,"createTspan"),me(HL,"computeWidthOfText"),me(VL,"computeDimensionOfText"),me(XL,"createFormattedText"),me(KL,"updateTextContentAndStyles"),me(ZL,"replaceIconSubstring"),QL=me(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(D.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a?(n=PL(e,c),a=await ZL(rS(n),c),n=e.replace(/\\\\/g,"\\"),WL(t,{isNode:s,label:Ec(e)?n:a,labelStyle:r.replace("fill:","color:")},o,i,l,c)):(n=XL(o,t,OL(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),c),!!e&&l),s?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).attr("style",a)):(i=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),H(n).select("rect").attr("style",i.replace(/background:/g,"fill:")),o=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).select("text").attr("style",o)),n)),"createText")});function tN(t){return(t=t.map((t,e)=>(0===e?"M":"L")+t.x+","+t.y)).push("Z"),t.join(" ")}function eN(e,t,r,n,i,a){var s=[],o=r-e,l=2*Math.PI/(o/a),c=t+(n-t)/2;for(let t=0;t<=50;t++){var h=e+t/50*o,u=c+i*Math.sin(l*(h-e));s.push({x:h,y:u})}return s}function rN(e,r,n,i,t,a){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;t<i;t++){var c=o+t*l,h=e+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:-h,y:-c})}return s}var nN,iN,aN,sN,i=b(()=>{JL(),Tu(),i6(),tn(),Oc(),iS(),nN=me(async(t,e,r)=>{let n,i=e.useHtmlLabels||fc(O()?.htmlLabels),a=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),s=a.insert("g").attr("class","label").attr("style",_C(e.labelStyle)),o,l=(o=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],await QL(s,lc(rS(o),O()),{useHtmlLabels:i,width:e.width||O().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img})),c=l.getBBox(),h=(e?.padding??0)/2;if(i){var r=l.children[0],t=H(l),u=r.getElementsByTagName("img");if(u){let n=""===o.replace(/<img[^>]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=(O().fontSize?O():window.getComputedStyle(document.body)).fontSize,[t=We.fontSize]=JC(t),r.style.minWidth=t=5*t+"px",r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=r.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),iN=me(async(t,e,r)=>{let n=r.useHtmlLabels||fc(O()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await QL(i,lc(rS(e),O()),{useHtmlLabels:n,width:r.width||O()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return fc(O()?.flowchart?.htmlLabels)&&(e=a.children[0],l=H(a),s=e.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),aN=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),sN=me((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses"),me(tN,"createPathFromPoints"),me(eN,"generateFullSineWavePoints"),me(rN,"generateCirclePoints")});function oN(t,e){return t.intersect(e)}var lN,cN=b(()=>{me(oN,"intersectNode"),lN=oN});function hN(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x<i&&(a=-a),Math.abs(e*r*s/o));return{x:i+a,y:t+(e=n.y<t?-e:e)}}var uN,dN=b(()=>{me(hN,"intersectEllipse"),uN=hN});function pN(t,e,r){return uN(t,e,e,r)}var gN,fN=b(()=>{dN(),me(pN,"intersectCircle"),gN=pN});function mN(t,e,r,n){var i=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,o=i*r.x+a*r.y+s,l=i*n.x+a*n.y+s;if(!(0!=o&&0!=l&&0<o*l||(n=(o=n.y-r.y)*t.x+(l=r.x-n.x)*t.y+(r=n.x*r.y-r.x*n.y),t=o*e.x+l*e.y+r,Math.abs(n)<1e-6&&Math.abs(t)<1e-6&&0<n*t)||0==(e=i*l-o*a)))return n=Math.abs(e/2),{x:(t=a*r-l*s)<0?(t-n)/e:(t+n)/e,y:(t=o*s-i*r)<0?(t-n)/e:(t+n)/e}}function yN(t,e){return 0<t*e}var vN,xN=b(()=>{me(mN,"intersectLine"),me(yN,"sameSign"),vN=mN});function bN(e,r,n){let t=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=t-e.width/2-s,c=i-e.height/2-o;for(let t=0;t<r.length;t++){var h=r[t],u=r[t<r.length-1?t+1:0];(h=vN(e,n,{x:l+h.x,y:c+h.y},{x:l+u.x,y:c+u.y}))&&a.push(h)}return a.length?(1<a.length&&a.sort(function(t,e){var r=t.x-n.x,t=t.y-n.y,r=Math.sqrt(r*r+t*t),t=e.x-n.x,e=e.y-n.y;return r<(t=Math.sqrt(t*t+e*e))?-1:r===t?0:1}),a[0]):e}var wN,kN,TN,V,EN,CN,SN,_N,Q,AN,LN,NN=b(()=>{xN(),me(bN,"intersectPolygon"),wN=bN}),IN=b(()=>{kN=me((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),TN=kN}),RN=b(()=>{cN(),fN(),dN(),NN(),IN(),V={node:lN,circle:gN,ellipse:uN,polygon:wN,rect:TN}}),MN=b(()=>{Tu(),EN=me(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:O().handDrawnSeed}),"solidStateFill"),CN=me(t=>({stylesMap:t=SN([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),SN=me(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),_N=me(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),Q=me(t=>{let e=CN(t).stylesArray,r=[],n=[],i=[],a=[];return e.forEach(t=>{var e=t[0];_N(e)?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),AN=me((t,e)=>{var{themeVariables:r,handDrawnSeed:n}=O(),{nodeBorder:r,mainBkg:i}=r,t=CN(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:t.get("stroke")||r,seed:n,strokeWidth:t.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:LN(t.get("stroke-dasharray"))},e)},"userNodeOverrides"),LN=me(t=>{var e;return t?1===(t=t.trim().split(/\s+/).map(Number)).length?[e=isNaN(t[0])?0:t[0],e]:[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]:[0,0]},"getStrokeDashArray")});function DN(t,e,r){if(t&&t.length){var n,[i,a]=e,e=Math.PI/180*r,s=Math.cos(e),o=Math.sin(e);for(n of t){var[l,c]=n;n[0]=(l-i)*s-(c-a)*o+i,n[1]=(l-i)*o+(c-a)*s+a}}}function ON(t,e){return t[0]===e[0]&&t[1]===e[1]}function PN(t,r,n,e=1){var i=n,n=Math.max(r,.1),p=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,a=[0,0];if(i)for(var s of p)DN(s,a,i);if(r=((e,i)=>{var t,r=[];for(t of p){var n=[...t];ON(n[0],n[n.length-1])||n.push([n[0][0],n[0][1]]),2<n.length&&r.push(n)}var a,s=[],o=(e=Math.max(e,.1),[]);for(a of r)for(let t=0;t<a.length-1;t++){var l,c=a[t],h=a[t+1];c[1]!==h[1]&&(l=Math.min(c[1],h[1]),o.push({ymin:l,ymax:Math.max(c[1],h[1]),x:(l===c[1]?c:h)[0],islope:(h[0]-c[0])/(h[1]-c[1])}))}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),o.length){let r=[],n=o[0].ymin,t=0;for(;r.length||o.length;){if(o.length){let e=-1;for(let t=0;t<o.length&&!(o[t].ymin>n);t++)e=t;o.splice(0,e+1).forEach(t=>{r.push({s:n,edge:t})})}if((r=r.filter(t=>!(t.edge.ymax<=n))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==i||t%e==0)&&1<r.length)for(let t=0;t<r.length&&!((d=t+1)>=r.length);t+=2){var u=r[t].edge,d=r[d].edge;s.push([[Math.round(u.x),n],[Math.round(d.x),n]])}n+=i,r.forEach(t=>{t.edge.x=t.edge.x+i*t.edge.islope}),t++}}return s})(n,e),i){for(var o of p)DN(o,a,-i);{t=a,n=-i;let e=[];r.forEach(t=>e.push(...t)),DN(e,t,n)}}return r}function BN(t,e){let r,n=e.hachureAngle+90,i=e.hachureGap,a=(i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1)),1);return 1<=e.roughness&&.7<((null==(r=e.randomizer)?void 0:r.next())||Math.random())&&(a=i),PN(t,i,n,a||1)}function $N(t){var e=t[0],t=t[1];return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function FN(t,e){return t.type===e}function zN(t){let n=[],i=(t=>{for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:LI,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:NI,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:II,text:""},e})(t),a="BOD",s=0,o=i[s];for(;!FN(o,II);){let e=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return zN("M0,0"+t);s++,e=RI[o.text],a=o.text}else FN(o,NI)?e=RI[a]:(s++,e=RI[o.text],a=o.text);if(!(s+e<i.length))throw new Error("Path data ended short");for(let t=s;t<s+e;t++){var l=i[t];if(!FN(l,NI))throw new Error("Param not a number: "+a+","+l.text);r[r.length]=+l.text}if("number"!=typeof RI[a])throw new Error("Bad segment: "+a);var c={key:a,data:r};n.push(c),s+=e,o=i[s],"m"===(a="M"===a?"L":a)&&(a="l")}return n}function GN(t){let r=0,n=0,e=0,i=0,a=[];for(var{key:s,data:o}of t)switch(s){case"M":a.push({key:"M",data:[...o]}),[r,n]=o,[e,i]=o;break;case"m":r+=o[0],n+=o[1],a.push({key:"M",data:[r,n]}),e=r,i=n;break;case"L":a.push({key:"L",data:[...o]}),[r,n]=o;break;case"l":r+=o[0],n+=o[1],a.push({key:"L",data:[r,n]});break;case"C":a.push({key:"C",data:[...o]}),r=o[4],n=o[5];break;case"c":var l=o.map((t,e)=>e%2?t+n:t+r);a.push({key:"C",data:l}),r=l[4],n=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],n=o[3];break;case"q":l=o.map((t,e)=>e%2?t+n:t+r),a.push({key:"Q",data:l}),r=l[2],n=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],n=o[6];break;case"a":r+=o[5],n+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,n]});break;case"H":a.push({key:"H",data:[...o]}),r=o[0];break;case"h":r+=o[0],a.push({key:"H",data:[r]});break;case"V":a.push({key:"V",data:[...o]}),n=o[0];break;case"v":n+=o[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],n=o[3];break;case"s":var c=o.map((t,e)=>e%2?t+n:t+r);a.push({key:"S",data:c}),r=c[2],n=c[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],n=o[1];break;case"t":r+=o[0],n+=o[1],a.push({key:"T",data:[r,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=e,n=i}return a}function UN(t){let i=[],a="",s=0,o=0,e=0,r=0,l=0,c=0;for(var{key:n,data:h}of t){switch(n){case"M":i.push({key:"M",data:[...h]}),[s,o]=h,[e,r]=h;break;case"C":i.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":i.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],i.push({key:"L",data:[s,o]});break;case"V":o=h[0],i.push({key:"L",data:[s,o]});break;case"S":{let t=0,e;e="C"===a||"S"===a?(t=s+(s-l),o+(o-c)):(t=s,o),i.push({key:"C",data:[t,e,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[t,e]=h,r=0,n;n="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(n-o)/3,p=t+2*(r-t)/3,g=e+2*(n-e)/3;i.push({key:"C",data:[u,d,p,g,t,e]}),l=r,c=n,s=t,o=e;break}case"Q":var[u,d,p,g]=h,f=s+2*(u-s)/3,m=o+2*(d-o)/3;i.push({key:"C",data:[f,m,p+2*(u-p)/3,g+2*(d-g)/3,p,g]}),l=u,c=d,s=p,o=g;break;case"A":var f=Math.abs(h[0]),m=Math.abs(h[1]),y=h[2],v=h[3],x=h[4],b=h[5],w=h[6];0===f||0===m?(i.push({key:"C",data:[s,o,b,w,b,w]}),s=b,o=w):s===b&&o===w||(jN(s,o,b,w,f,m,y,v,x).forEach(function(t){i.push({key:"C",data:t})}),s=b,o=w);break;case"Z":i.push({key:"Z",data:[]}),s=e,o=r}a=n}return i}function qN(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function jN(t,e,r,n,i,a,s,o,l,c){let h=Math.PI*s/180,u=[],d=0,p=0,g=0,f=0;c?[d,p,g,f]=c:([t,e]=qN(t,e,-h),[r,n]=qN(r,n,-h),1<(m=(y=(t-r)/2)*y/(i*i)+(v=(e-n)/2)*v/(a*a))&&(i*=m=Math.sqrt(m),a*=m),m=i*i,x=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*i*v/a+(t+r)/2,f=o*-a*y/i+(e+n)/2,d=Math.asin(parseFloat(((e-f)/a).toFixed(9))),p=Math.asin(parseFloat(((n-f)/a).toFixed(9))),t<g&&(d=Math.PI-d),r<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(x=p,v=r,o=n,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=jN(r=g+i*Math.cos(p),n=f+a*Math.sin(p),v,o,i,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*i*(l=Math.tan(m/4)),i=[t,e],a=[t+x*v,e-(m=4/3*a*l)*y],l=[r+x*s,n-m*o],t=[r,n];if(a[0]=2*i[0]-a[0],a[1]=2*i[1]-a[1],c)return[a,l,t].concat(u);u=[a,l,t].concat(u);var b=[];for(let t=0;t<u.length;t+=3){var w=qN(u[t][0],u[t][1],h),k=qN(u[t+1][0],u[t+1][1],h),T=qN(u[t+2][0],u[t+2][1],h);b.push([w[0],w[1],k[0],k[1],T[0],T[1]])}return b}function WN(t,e,r,n,i){return{type:"path",ops:aI(t,e,r,n,i)}}function YN(e,t,r){var n=(e||[]).length;if(2<n){var i=[];for(let t=0;t<n-1;t++)i.push(...aI(e[t][0],e[t][1],e[t+1][0],e[t+1][1],r));return t&&i.push(...aI(e[n-1][0],e[n-1][1],e[0][0],e[0][1],r)),{type:"path",ops:i}}return 2===n?WN(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function HN(t,e,r,n,i){return YN([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],!0,i)}function VN(t,e){if(t.length){var r="number"==typeof t[0][0]?[t]:t,n=oI(r[0],1+.2*e.roughness,e),i=e.disableMultiStroke?[]:oI(r[0],1.5*(1+.22*e.roughness),eI(e));for(let t=1;t<r.length;t++)if((l=r[t]).length){var a,s,o=oI(l,1+.2*e.roughness,e),l=e.disableMultiStroke?[]:oI(l,1.5*(1+.22*e.roughness),eI(e));for(a of o)"move"!==a.op&&n.push(a);for(s of l)"move"!==s.op&&i.push(s)}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function XN(t,e,r){var n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),n=2*Math.PI/n,t=Math.abs(t/2),e=Math.abs(e/2),i=1-r.curveFitting;return{increment:n,rx:t+=iI(t*i,r),ry:e+=iI(e*i,r)}}function KN(t,e,r,n){let[i,a]=cI(n.increment,t,e,n.rx,n.ry,1,n.increment*nI(.1,nI(.4,1,r),r),r),s=lI(i,null,r);return r.disableMultiStroke||0===r.roughness||([t]=cI(n.increment,t,e,n.rx,n.ry,1.5,0,r),e=lI(t,null,r),s=s.concat(e)),{estimatedPoints:a,opset:{type:"path",ops:s}}}function ZN(t,e,r,n,i,a,s,o,l){r=Math.abs(r/2),n=Math.abs(n/2),r+=iI(.01*r,l),n+=iI(.01*n,l);let c=i,h=a;for(;c<0;)c+=2*Math.PI,h+=2*Math.PI;return h-c>2*Math.PI&&(c=0,h=2*Math.PI),i=2*Math.PI/l.curveStepCount,i=hI(a=Math.min(i/2,(h-c)/2),t,e,r,n,c,h,1,l),l.disableMultiStroke||(a=hI(a,t,e,r,n,c,h,1.5,l),i.push(...a)),s&&(o?i.push(...aI(t,e,t+r*Math.cos(c),e+n*Math.sin(c),l),...aI(t,e,t+r*Math.cos(h),e+n*Math.sin(h),l)):i.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+r*Math.cos(c),e+n*Math.sin(c)]})),{type:"path",ops:i}}function QN(t,e){let r=UN(GN(zN(t))),n=[],i=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...aI(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;n.push(...uI(l,c,h,u,d,p,a,e)),a=[d,p];break;case"Z":n.push(...aI(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function JN(t,e){var r,n=[];for(r of t)if(r.length){var i=e.maxRandomnessOffset||0,a=r.length;if(2<a){n.push({op:"move",data:[r[0][0]+iI(i,e),r[0][1]+iI(i,e)]});for(let t=1;t<a;t++)n.push({op:"lineTo",data:[r[t][0]+iI(i,e),r[t][1]+iI(i,e)]})}}return{type:"fillPath",ops:n}}function tI(t,r){return(t=>{let e=r.fillStyle||"hachure";if(!_I[e])switch(e){case"zigzag":_I[e]||(_I[e]=new kI(t));break;case"cross-hatch":_I[e]||(_I[e]=new TI(t));break;case"dots":_I[e]||(_I[e]=new EI(t));break;case"dashed":_I[e]||(_I[e]=new CI(t));break;case"zigzag-line":_I[e]||(_I[e]=new SI(t));break;default:e="hachure",_I[e]||(_I[e]=new wI(t))}return _I[e]})(MI).fillPolygons(t,r)}function eI(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function rI(t){return t.randomizer||(t.randomizer=new AI(t.seed||0)),t.randomizer.next()}function nI(t,e,r,n=1){return r.roughness*n*(rI(r)*(e-t)+t)}function iI(t,e,r=1){return nI(-t,t,e,r)}function aI(t,e,r,n,i,a=!1){var a=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=sI(t,e,r,n,i,!0,!1);return a?s:(a=sI(t,e,r,n,i,!0,!0),s.concat(a))}function sI(t,e,r,n,i,a,s){let o=Math.pow(t-r,2)+Math.pow(e-n,2),l=Math.sqrt(o),c,h=(c=l<200?1:500<l?.4:-.0016668*l+1.233334,i.maxRandomnessOffset||0),u=(h=h*h*100>o?l/10:h)/2,d=.2+.2*rI(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=iI(p,i,c),g=iI(g,i,c);var f=[],m=me(()=>iI(u,i,c),"M"),y=me(()=>iI(h,i,c),"k"),v=i.preserveVertices;return a&&f.push(s?{op:"move",data:[t+(v?0:m()),e+(v?0:m())]}:{op:"move",data:[t+(v?0:iI(h,i,c)),e+(v?0:iI(h,i,c))]}),f.push(s?{op:"bcurveTo",data:[p+t+(r-t)*d+m(),g+e+(n-e)*d+m(),p+t+2*(r-t)*d+m(),g+e+2*(n-e)*d+m(),r+(v?0:m()),n+(v?0:m())]}:{op:"bcurveTo",data:[p+t+(r-t)*d+y(),g+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),g+e+2*(n-e)*d+y(),r+(v?0:y()),n+(v?0:y())]}),f}function oI(e,r,n){if(!e.length)return[];var i=[];i.push([e[0][0]+iI(r,n),e[0][1]+iI(r,n)]),i.push([e[0][0]+iI(r,n),e[0][1]+iI(r,n)]);for(let t=1;t<e.length;t++)i.push([e[t][0]+iI(r,n),e[t][1]+iI(r,n)]),t===e.length-1&&i.push([e[t][0]+iI(r,n),e[t][1]+iI(r,n)]);return lI(i,null,n)}function lI(e,t,r){var n=e.length,i=[];if(3<n){var a,s=[],o=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+2<n;t++){var l=e[t];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[t+1][0]-o*e[t-1][0])/6,l[1]+(o*e[t+1][1]-o*e[t-1][1])/6],s[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],s[3]=[e[t+1][0],e[t+1][1]],i.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}t&&2===t.length&&(a=r.maxRandomnessOffset,i.push({op:"lineTo",data:[t[0]+iI(a,r),t[1]+iI(a,r)]}))}else 3===n?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===n&&i.push(...sI(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return i}function cI(e,r,n,i,a,s,t,o){var l=[],c=[];if(0===o.roughness){e/=4,c.push([r+i*Math.cos(-e),n+a*Math.sin(-e)]);for(let t=0;t<=2*Math.PI;t+=e){var h=[r+i*Math.cos(t),n+a*Math.sin(t)];l.push(h),c.push(h)}c.push([r+i*Math.cos(0),n+a*Math.sin(0)]),c.push([r+i*Math.cos(e),n+a*Math.sin(e)])}else{var u=iI(.5,o)-Math.PI/2,d=(c.push([iI(s,o)+r+.9*i*Math.cos(u-e),iI(s,o)+n+.9*a*Math.sin(u-e)]),2*Math.PI+u-.01);for(let t=u;t<d;t+=e){var p=[iI(s,o)+r+i*Math.cos(t),iI(s,o)+n+a*Math.sin(t)];l.push(p),c.push(p)}c.push([iI(s,o)+r+i*Math.cos(u+2*Math.PI+.5*t),iI(s,o)+n+a*Math.sin(u+2*Math.PI+.5*t)]),c.push([iI(s,o)+r+.98*i*Math.cos(u+t),iI(s,o)+n+.98*a*Math.sin(u+t)]),c.push([iI(s,o)+r+.9*i*Math.cos(u+.5*t),iI(s,o)+n+.9*a*Math.sin(u+.5*t)])}return[c,l]}function hI(e,r,n,i,a,s,o,l,c){var s=s+iI(.1,c),h=[];h.push([iI(l,c)+r+.9*i*Math.cos(s-e),iI(l,c)+n+.9*a*Math.sin(s-e)]);for(let t=s;t<=o;t+=e)h.push([iI(l,c)+r+i*Math.cos(t),iI(l,c)+n+a*Math.sin(t)]);return h.push([r+i*Math.cos(o),n+a*Math.sin(o)]),h.push([r+i*Math.cos(o),n+a*Math.sin(o)]),lI(h,null,c)}function uI(e,r,n,i,a,s,o,l){var c,h=[],u=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3],d=l.disableMultiStroke?1:2,p=l.preserveVertices;for(let t=0;t<d;t++)0===t?h.push({op:"move",data:[o[0],o[1]]}):h.push({op:"move",data:[o[0]+(p?0:iI(u[0],l)),o[1]+(p?0:iI(u[0],l))]}),c=p?[a,s]:[a+iI(u[t],l),s+iI(u[t],l)],h.push({op:"bcurveTo",data:[e+iI(u[t],l),r+iI(u[t],l),n+iI(u[t],l),i+iI(u[t],l),c[0],c[1]]});return h}function dI(t){return[...t]}function pI(e,t=0){var r=e.length;if(r<3)throw new Error("A curve must have at least three points.");var n=[];if(3===r)n.push(dI(e[0]),dI(e[1]),dI(e[2]),dI(e[2]));else{var i=[];i.push(e[0],e[0]);for(let t=1;t<e.length;t++)i.push(e[t]),t===e.length-1&&i.push(e[t]);var a=[],s=1-t;n.push(dI(i[0]));for(let t=1;t+2<i.length;t++){var o=i[t];a[0]=[o[0],o[1]],a[1]=[o[0]+(s*i[t+1][0]-s*i[t-1][0])/6,o[1]+(s*i[t+1][1]-s*i[t-1][1])/6],a[2]=[i[t+1][0]+(s*i[t][0]-s*i[t+2][0])/6,i[t+1][1]+(s*i[t][1]-s*i[t+2][1])/6],a[3]=[i[t+1][0],i[t+1][1]],n.push(a[1],a[2],a[3])}}return n}function gI(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function fI(t,e,r){var n=gI(e,r);return 0===n?gI(t,e):(n=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n,gI(t,mI(e,r,Math.max(0,Math.min(1,n)))))}function mI(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function yI(l,c,t,e){var r,n,i,a,s,o,e=e||[];return(()=>{let t=l[c+0],e=l[c+1],r=l[c+2],n=l[c+3],i=3*e[0]-2*t[0]-n[0],a=(i*=i,3*e[1]-2*t[1]-n[1]);a*=a;var s=3*r[0]-2*n[0]-t[0],o=(s*=s,3*r[1]-2*n[1]-t[1]);return o*=o,i<s&&(i=s),a<o&&(a=o),i+a})()<t?(r=l[c+0],(!e.length||(o=e[e.length-1],1<Math.sqrt(gI(o,r))))&&e.push(r),e.push(l[c+3])):(n=mI(o=l[c+0],r=l[c+1],.5),s=mI(r,r=l[c+2],.5),i=mI(r,r=l[c+3],.5),a=mI(n,s,.5),s=mI(s,i,.5),yI([o,n,a,o=mI(a,s,.5)],0,t,e),yI([o,s,i,r],0,t,e)),e}function vI(t,e){return xI(t,0,t.length,e)}function xI(e,r,n,t,i){let a=i||[],s=e[r],o=e[n-1],l=0,c=1;for(let t=r+1;t<n-1;++t){var h=fI(e[t],s,o);h>l&&(l=h,c=t)}return Math.sqrt(l)>t?(xI(e,r,c+1,t,a),xI(e,c,n,t,a)):(a.length||a.push(s),a.push(o)),a}function bI(e,r=.15,t){var n=[],i=(e.length-1)/3;for(let t=0;t<i;t++)yI(e,3*t,r,n);return t&&0<t?xI(n,0,n.length,t):n}var wI,kI,TI,EI,CI,SI,_I,AI,LI,NI,II,RI,MI,DI,OI,PI,BI,$I,FI,zI=b(()=>{me(DN,"t"),me(ON,"e"),me(PN,"s"),me(BN,"n"),wI=class{static{me(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=BN(t,e),{type:"fillSketch",ops:this.renderLines(t,e)}}renderLines(t,e){var r,n=[];for(r of t)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return n}},me($N,"a"),kI=class extends wI{static{me(this,"h")}fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);var n,i,t=BN(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([n,i]of t)$N([n,i])&&s.push([[n[0]-o,n[1]+l],[...i]],[[n[0]+o,n[1]-l],[...i]]);return{type:"fillSketch",ops:this.renderLines(s,e)}}},TI=class extends wI{static{me(this,"r")}fillPolygons(t,e){var r=this._fillPolygons(t,e),e=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),t=this._fillPolygons(t,e);return r.ops=r.ops.concat(t.ops),r}},EI=class{static{me(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){return t=BN(t,e=Object.assign({},e,{hachureAngle:0})),this.dotsOnLines(t,e)}dotsOnLines(t,e){let r=[],n=e.hachureGap,i=(n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1),e.fillWeight);i<0&&(i=e.strokeWidth/2);var a,s=n/4;for(a of t){var o=$N(a),l=o/n,c=Math.ceil(l)-1,h=o-c*n,u=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let t=0;t<c;t++){var p=d+h+t*n,g=u-s+2*Math.random()*s,p=p-s+2*Math.random()*s,g=this.helper.ellipse(g,p,i,i,e);r.push(...g.ops)}}return{type:"fillSketch",ops:r}}},CI=class{static{me(this,"c")}constructor(t){this.helper=t}fillPolygons(t,e){return t=BN(t,e),{type:"fillSketch",ops:this.dashedLine(t,e)}}dashedLine(t,c){let h=c.dashOffset<0?c.hachureGap<0?4*c.strokeWidth:c.hachureGap:c.dashOffset,u=c.dashGap<0?c.hachureGap<0?4*c.strokeWidth:c.hachureGap:c.dashGap,d=[];return t.forEach(t=>{let e=$N(t),r=Math.floor(e/(h+u)),n=(e+u-r*(h+u))/2,i=t[0],a=t[1];i[0]>a[0]&&(i=t[1],a=t[0]);var s=Math.atan((a[1]-i[1])/(a[0]-i[0]));for(let t=0;t<r;t++){var o=(l=t*(h+u))+h,l=[i[0]+l*Math.cos(s)+n*Math.cos(s),i[1]+l*Math.sin(s)+n*Math.sin(s)],o=[i[0]+o*Math.cos(s)+n*Math.cos(s),i[1]+o*Math.sin(s)+n*Math.sin(s)];d.push(...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],c))}}),d}},SI=class{static{me(this,"l")}constructor(t){this.helper=t}fillPolygons(t,e){var r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,n=e.zigzagOffset<0?r:e.zigzagOffset,t=BN(t,e=Object.assign({},e,{hachureGap:r+n}));return{type:"fillSketch",ops:this.zigzagLines(t,n,e)}}zigzagLines(t,c,h){let u=[];return t.forEach(t=>{let e=$N(t),r=Math.round(e/(2*c)),n=t[0],i=t[1];n[0]>i[0]&&(n=t[1],i=t[0]);var a=Math.atan((i[1]-n[1])/(i[0]-n[0]));for(let t=0;t<r;t++){var s=2*t*c,o=2*(t+1)*c,l=Math.sqrt(2*Math.pow(c,2)),s=[n[0]+s*Math.cos(a),n[1]+s*Math.sin(a)],o=[n[0]+o*Math.cos(a),n[1]+o*Math.sin(a)],l=[s[0]+l*Math.cos(a+Math.PI/4),s[1]+l*Math.sin(a+Math.PI/4)];u.push(...this.helper.doubleLineOps(s[0],s[1],l[0],l[1],h),...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],h))}}),u}},_I={},AI=class{static{me(this,"p")}constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},RI={A:7,a:7,C:6,c:6,H:NI=1,h:1,L:II=2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:LI=0,z:0},me(FN,"k"),me(zN,"b"),me(GN,"y"),me(UN,"m"),me(qN,"w"),me(jN,"x"),MI={randOffset:me(function(t,e){return iI(t,e)},"randOffset"),randOffsetWithRange:me(function(t,e,r){return nI(t,e,r)},"randOffsetWithRange"),ellipse:me(function(t,e,r,n,i){return KN(t,e,i,XN(r,n,i)).opset},"ellipse"),doubleLineOps:me(function(t,e,r,n,i){return aI(t,e,r,n,i,!0)},"doubleLineOps")},me(WN,"v"),me(YN,"S"),me(HN,"O"),me(VN,"L"),me(XN,"T"),me(KN,"D"),me(ZN,"A"),me(QN,"_"),me(JN,"I"),me(tI,"C"),me(eI,"z"),me(rI,"W"),me(nI,"E"),me(iI,"G"),me(aI,"$"),me(sI,"R"),me(oI,"j"),me(lI,"q"),me(cI,"F"),me(hI,"V"),me(uI,"Z"),me(dI,"Q"),me(pI,"H"),me(gI,"N"),me(fI,"B"),me(mI,"J"),me(yI,"K"),me(vI,"U"),me(xI,"X"),me(bI,"Y"),DI="none",OI=class{static{me(this,"et")}constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,n,i){return i=this._o(i),this._d("line",[WN(t,e,r,n,i)],i)}rectangle(t,e,r,n,i){var a=[],s=HN(t,e,r,n,i=this._o(i));return i.fill&&(r=[[t,e],[t+r,e],[t+r,e+n],[t,e+n]],"solid"===i.fillStyle?a.push(JN([r],i)):a.push(tI([r],i))),i.stroke!==DI&&a.push(s),this._d("rectangle",a,i)}ellipse(t,e,r,n,i){var a=[],n=KN(t,e,i=this._o(i),r=XN(r,n,i));return i.fill&&("solid"===i.fillStyle?((t=KN(t,e,i,r).opset).type="fillPath",a.push(t)):a.push(tI([n.estimatedPoints],i))),i.stroke!==DI&&a.push(n.opset),this._d("ellipse",a,i)}circle(t,e,r,n){return(t=this.ellipse(t,e,r,r,n)).shape="circle",t}linearPath(t,e){return e=this._o(e),this._d("linearPath",[YN(t,!1,e)],e)}arc(d,p,g,t,e,r,n=!1,i){var i=this._o(i),a=[],s=ZN(d,p,g,t,e,r,n,!0,i);return n&&i.fill&&("solid"===i.fillStyle?(n=Object.assign({},i),(n=ZN(d,p,g,t,e,r,n.disableMultiStroke=!0,!1,n)).type="fillPath",a.push(n)):a.push(((t,e,r,n)=>{var i=d,a=p,s=Math.abs(g/2),o=Math.abs(t/2);s+=iI(.01*s,n),o+=iI(.01*o,n);let l=e,c=r;for(;l<0;)l+=2*Math.PI,c+=2*Math.PI;c-l>2*Math.PI&&(l=0,c=2*Math.PI);var h=(c-l)/n.curveStepCount,u=[];for(let t=l;t<=c;t+=h)u.push([i+s*Math.cos(t),a+o*Math.sin(t)]);return u.push([i+s*Math.cos(c),a+o*Math.sin(c)]),u.push([i,a]),tI([u],n)})(t,e,r,i))),i.stroke!==DI&&a.push(s),this._d("arc",a,i)}curve(t,e){var r=this._o(e),e=[],n=VN(t,r);if(r.fill&&r.fill!==DI)if("solid"===r.fillStyle){var i=VN(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));e.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{var a,s=[];if((i=t).length)for(a of"number"==typeof i[0][0]?[i]:i)a.length<3?s.push(...a):3===a.length?s.push(...bI(pI([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...bI(pI(a),10,(1+r.roughness)/2));s.length&&e.push(tI([s],r))}return r.stroke!==DI&&e.push(n),this._d("curve",e,r)}polygon(t,e){var r=[],n=YN(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(JN([t],e)):r.push(tI([t],e))),e.stroke!==DI&&r.push(n),this._d("polygon",r,e)}path(t,e){let r=this._o(e),n=[];var i,a,s,o;return t&&(t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),e=r.fill&&"transparent"!==r.fill&&r.fill!==DI,i=r.stroke!==DI,s=((t,e)=>{let r=UN(GN(zN(t))),n=[],i=[],a=[0,0],s=[],o=me(()=>{4<=s.length&&i.push(...bI(s,1)),s=[]},"i"),l=me(()=>{o(),i.length&&(n.push(i),i=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],i.push(a);break;case"L":o(),i.push([h[0],h[1]]);break;case"C":var u;s.length||(u=i.length?i[i.length-1]:a,s.push([u[0],u[1]])),s.push([h[0],h[1]]),s.push([h[2],h[3]]),s.push([h[4],h[5]]);break;case"Z":o(),i.push([a[0],a[1]])}if(l(),!e)return n;var d,p=[];for(d of n){var g=vI(d,e);g.length&&p.push(g)}return p})(t,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=QN(t,r),e&&("solid"===r.fillStyle?1===s.length?(e=QN(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),n.push({type:"fillPath",ops:this._mergedShape(e.ops)})):n.push(JN(s,r)):n.push(tI(s,r))),i)&&(a?s.forEach(t=>{n.push(YN(t,!1,r))}):n.push(o)),this._d("path",n,r)}opsToPath(t,e){let r="";for(var n of t.ops){var i="number"==typeof e&&0<=e?n.data.map(t=>+t.toFixed(e)):n.data;switch(n.op){case"move":r+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":r+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":r+=`L${i[0]} ${i[1]} `}}return r.trim()}toPaths(t){var e,r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(e of r){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:DI};break;case"fillPath":t={d:this.opsToPath(e),stroke:DI,strokeWidth:0,fill:n.fill||DI};break;case"fillSketch":t=this.fillSketch(e,n)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||DI,strokeWidth:r,fill:DI}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}},PI=class{static{me(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new OI(e)}draw(t){var e,r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(e of r)switch(e.type){case"path":i.save(),i.strokeStyle="none"===n.stroke?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,e,a),i.restore();break;case"fillPath":i.save(),i.fillStyle=n.fill||"";var s="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,e,a,s),i.restore();break;case"fillSketch":this.fillSketch(i,e,n)}}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=n,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,n="nonzero"){t.beginPath();for(var i of e.ops){var a="number"==typeof r&&0<=r?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t),t}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t),t}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t),t}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),this.draw(t),t}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t),t}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t),t}arc(t,e,r,n,i,a,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t),t}curve(t,e){return t=this.gen.curve(t,e),this.draw(t),t}path(t,e){return t=this.gen.path(t,e),this.draw(t),t}},BI="http://www.w3.org/2000/svg",$I=class{static{me(this,"ot")}constructor(t,e){this.svg=t,this.gen=new OI(e)}draw(e){var r,t=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(BI,"g"),s=e.options.fixedDecimalPlaceDigits;for(r of t){let t=null;switch(r.type){case"path":(t=i.createElementNS(BI,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",""+n.strokeLineDashOffset);break;case"fillPath":(t=i.createElementNS(BI,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(i,r,n)}t&&a.appendChild(t)}return a}fillSketch(t,e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),(t=t.createElementNS(BI,"path")).setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),t.setAttribute("stroke",r.fill||""),t.setAttribute("stroke-width",n+""),t.setAttribute("fill","none"),r.fillLineDash&&t.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&t.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),t}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t)}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t)}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t)}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),this.draw(t)}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t)}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t)}arc(t,e,r,n,i,a,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t)}curve(t,e){return t=this.gen.curve(t,e),this.draw(t)}path(t,e){return t=this.gen.path(t,e),this.draw(t)}},FI={canvas:me((t,e)=>new PI(t,e),"canvas"),svg:me((t,e)=>new $I(t,e),"svg"),generator:me(t=>new OI(t),"generator"),newSeed:me(()=>OI.newSeed(),"newSeed")}});function GI(t,e){var r=Q(e).labelStyles;e.labelStyle=r;let n=sN(e),i=n,a=(n||(i="anchor"),t.insert("g").attr("class",i).attr("id",e.domId||e.id)),s=e.cssStyles,o=FI.svg(a),l=AN(e,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==e.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",_C(s)),aN(e,h),e.intersect=function(t){return D.info("Circle intersect",e,1,t),V.circle(e,1,t)},a}var UI=b(()=>{t(),i(),RN(),MN(),zI(),iS(),me(GI,"anchor")});function qI(t,e,r,n,i,a,s){var o=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=Math.sqrt(((r-t)/2/i)**2+((n-e)/2/a)**2);if(1<h)throw new Error("The given radii are too small to create an arc between the points.");let u=Math.sqrt(1-h**2),d=o+u*a*Math.sin(c)*(s?-1:1),p=l-u*i*Math.cos(c)*(s?-1:1),g=Math.atan2((e-p)/a,(t-d)/i),f=Math.atan2((n-p)/a,(r-d)/i)-g;s&&f<0&&(f+=2*Math.PI),!s&&0<f&&(f-=2*Math.PI);var m=[];for(let t=0;t<20;t++){var y=g+t/19*f,v=d+i*Math.cos(y),y=p+a*Math.sin(y);m.push({x:v,y:y})}return m}async function jI(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(t,e,sN(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,c=l/(2.5+o/50),h=e.cssStyles,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...qI(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...qI(s/2,o/2,s/2,-o/2,c,l,!0)],d=FI.svg(i),p=AN(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),tN(u)),f=d.path(g,p),m=i.insert(()=>f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),aN(e,m),e.intersect=function(t){return V.polygon(e,u,t)},i}var WI=b(()=>{i(),RN(),MN(),zI(),me(qI,"generateArcPoints"),me(jI,"bowTieRect")});function YI(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var HI=b(()=>{me(YI,"insertPolygonShape")});async function VI(t,i){var{labelStyles:e,nodeStyles:r}=Q(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await nN(t,i,sN(i)),s=n.height+i.padding,o=n.width+i.padding+12,l=o,c=-s,h=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:12+c},{x:12,y:c}],u,d=i.cssStyles;if("handDrawn"===i.look){let t=FI.svg(a),e=AN(i,{}),r=tN(h),n=t.path(r,e);u=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=YI(a,o,s,h);return r&&u.attr("style",r),aN(i,u),i.intersect=function(t){return V.polygon(i,h,t)},a}var XI=b(()=>{i(),RN(),MN(),zI(),HI(),i(),me(VI,"card")});function KI(t,e){var r=Q(e).nodeStyles;e.label="";let n=t.insert("g").attr("class",sN(e)).attr("id",e.domId??e.id),i=e.cssStyles,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=FI.svg(n),l=AN(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),tN(s)),h=o.path(c,l),u=n.insert(()=>h,":first-child");return i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return V.polygon(e,s,t)},n}var ZI=b(()=>{RN(),zI(),MN(),i(),me(KI,"choice")});async function QI(t,n,e){var{labelStyles:r,nodeStyles:i}=Q(n);n.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:o}=await nN(t,n,sN(n)),l=e?.padding??o,c=s.width/2+l,h,u=n.cssStyles;if("handDrawn"===n.look){let t=FI.svg(a),e=AN(n,{}),r=t.circle(0,0,2*c,e);(h=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",_C(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0);return aN(n,h),n.calcIntersect=function(t,e){var r=t.width/2;return V.circle(t,r,e)},n.intersect=function(t){return D.info("Circle intersect",n,c,t),V.circle(n,c,t)},a}var JI=b(()=>{zI(),t(),iS(),RN(),MN(),i(),me(QI,"circle")});function tR(t){var e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(t*=2)/2*e},${t/2*r} L ${t/2*e},${-t/2*r} + M ${t/2*e},${t/2*r} L ${-t/2*e},`+-t/2*r}function eR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",sN(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),s=e.cssStyles,o=FI.svg(i),l=AN(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=tR(a),u=o.path(h,l),d=i.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),aN(e,d),e.intersect=function(t){return D.info("crossedCircle intersect",e,{radius:a,point:t}),V.circle(e,a,t)},i}var rR=b(()=>{t(),i(),MN(),zI(),RN(),me(tR,"createLine"),me(eR,"crossedCircle")});function nR(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;t<i;t++){var c=o+t*l,h=e+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:-h,y:-c})}return s}async function iR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(t,e,sN(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,.1*l),h=e.cssStyles,u=[...nR(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...nR(o/2+2*c,-c,c,20,-180,-270),...nR(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...nR(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...nR(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...nR(o/2+.1*o,-c,c,20,-180,-270),...nR(o/2+.1*o,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...nR(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],p=FI.svg(i),g=AN(e,{fill:"none"}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),tN(u).replace("Z","")),m=p.path(f,g),y=tN(d),v=p.path(y,{...g}),x=i.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),aN(e,x),e.intersect=function(t){return V.polygon(e,d,t)},i}var aR=b(()=>{i(),RN(),MN(),zI(),me(nR,"generateCirclePoints"),me(iR,"curlyBraceLeft")});function sR(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;t<i;t++){var c=o+t*l,h=e+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:h,y:c})}return s}async function oR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(t,e,sN(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,.1*l),h=e.cssStyles,u=[...sR(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...sR(o/2+2*c,-c,c,20,-180,-270),...sR(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...sR(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...sR(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...sR(o/2+2*c,-c,c,20,-180,-270),...sR(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...sR(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],p=FI.svg(i),g=AN(e,{fill:"none"}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),tN(u).replace("Z","")),m=p.path(f,g),y=tN(d),v=p.path(y,{...g}),x=i.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),aN(e,x),e.intersect=function(t){return V.polygon(e,d,t)},i}var lR=b(()=>{i(),RN(),MN(),zI(),me(sR,"generateCirclePoints"),me(oR,"curlyBraceRight")});function cR(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;t<i;t++){var c=o+t*l,h=e+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:-h,y:-c})}return s}async function hR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(t,e,sN(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,.1*l),h=e.cssStyles,u=[...cR(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...cR(o/2+2*c,-c,c,20,-180,-270),...cR(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...cR(o/2,l/2,c,20,0,90)],d=[...cR(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...cR(-o/2-c/2,-c,c,20,0,90),...cR(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...cR(-o/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...cR(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...cR(o/2+2*c,-c,c,20,-180,-270),...cR(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...cR(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...cR(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...cR(-o/2-c/2,-c,c,20,0,90),...cR(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...cR(-o/2+c+c/2,l/2,c,30,-180,-270)],g=FI.svg(i),f=AN(e,{fill:"none"}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),tN(u).replace("Z","")),y=g.path(m,f),v=tN(d).replace("Z",""),x=g.path(v,f),b=tN(p),w=g.path(b,{...f}),k=i.insert("g",":first-child");return k.insert(()=>w,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),aN(e,k),e.intersect=function(t){return V.polygon(e,p,t)},i}var uR=b(()=>{i(),RN(),MN(),zI(),me(cR,"generateCirclePoints"),me(hR,"curlyBraces")});async function dR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await nN(t,e,sN(e))),i=Math.max(80,1.25*(t.width+2*(e.padding??0)),e?.width??0),a=(t=Math.max(20,t.height+2*(e.padding??0),e?.height??0))/2,s=e.cssStyles,o=FI.svg(r),l=AN(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=i,h=t,u=c-a,d=h/4,p=[{x:u,y:0},{x:d,y:0},{x:0,y:h/2},{x:d,y:h},{x:u,y:h},...rN(-u,-h/2,a,50,270,90)],g=tN(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",s),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-i/2}, ${-t/2})`),aN(e,m),e.intersect=function(t){return V.polygon(e,p,t)},r}var pR=b(()=>{i(),RN(),MN(),zI(),me(dR,"curvedTrapezoid")});async function gR(t,a){var{labelStyles:e,nodeStyles:r}=Q(a);a.labelStyle=e;let{shapeSvg:s,bbox:n,label:i}=await nN(t,a,sN(a)),o=Math.max(n.width+a.padding,a.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(n.height+c+a.padding,a.height??0),u,d=a.cssStyles;if("handDrawn"===a.look){let t=FI.svg(s),e=mR(0,0,o,h,l,c),r=yR(0,c,o,h,l,c),n=t.path(e,AN(a,{})),i=t.path(r,AN(a,{fill:"none"}));u=s.insert(()=>i,":first-child"),(u=s.insert(()=>n,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else e=fR(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",_C(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),aN(a,u),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(a.padding??0)/1.5-(n.y-(n.top??0))})`),a.intersect=function(e){var r=V.rect(a,e),n=r.x-(a.x??0);if(0!=l&&(Math.abs(n)<(a.width??0)/2||Math.abs(n)==(a.width??0)/2&&Math.abs(r.y-(a.y??0))>(a.height??0)/2-c)){let t=c*c*(1-n*n/(l*l));0<t&&(t=Math.sqrt(t)),t=c-t,0<e.y-(a.y??0)&&(t=-t),r.y+=t}return r},s}var fR,mR,yR,vR=b(()=>{i(),RN(),MN(),zI(),iS(),fR=me((t,e,r,n,i,a)=>[`M${t},`+(e+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),mR=me((t,e,r,n,i,a)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),yR=me((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(gR,"cylinder")});async function xR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await nN(t,e,sN(e))),a=t.width+e.padding,s=.2*(o=t.height+e.padding),a=-a/2,o=-o/2-s/2,l=e.cssStyles,c=FI.svg(r),h=AN(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let u=[{x:a,y:o+s},{x:-a,y:o+s},{x:-a,y:-o},{x:a,y:-o},{x:a,y:o},{x:-a,y:o},{x:-a,y:o+s}],d=c.polygon(u.map(t=>[t.x,t.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),i.attr("transform",`translate(${a+(e.padding??0)/2-(t.x-(t.left??0))}, ${o+s+(e.padding??0)/2-(t.y-(t.top??0))})`),aN(e,p),e.intersect=function(t){return V.rect(e,t)},r}var bR=b(()=>{i(),RN(),MN(),zI(),me(xR,"dividedRectangle")});async function wR(t,e){var r,{labelStyles:n,nodeStyles:i}=Q(e);e.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await nN(t,e,sN(e)),l=s.width/2+o+5,c=s.width/2+o,h,u=e.cssStyles;return"handDrawn"===e.look?(n=FI.svg(a),t=AN(e,{roughness:.2,strokeWidth:2.5}),r=AN(e,{roughness:.2,strokeWidth:1.5}),t=n.circle(0,0,2*l,t),n=n.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",_C(e.cssClasses)).attr("style",_C(u)),h.node()?.appendChild(t),h.node()?.appendChild(n)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),t=h.insert("circle"),h.attr("class","basic label-container").attr("style",i),r.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),t.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)),aN(e,h),e.intersect=function(t){return D.info("DoubleCircle intersect",e,l,t),V.circle(e,l,t)},a}var kR=b(()=>{t(),i(),RN(),MN(),zI(),iS(),me(wR,"doublecircle")});function TR(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=Q(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",sN(e)).attr("id",e.domId??e.id),s=e.cssStyles,o=FI.svg(a),l=r.nodeBorder,c=AN(e,{fillStyle:"solid"}),h=("handDrawn"!==e.look&&(c.roughness=0),o.circle(0,0,14,c)),u=a.insert(()=>h,":first-child");return u.selectAll("path").attr("style",`fill: ${l} !important;`),s&&0<s.length&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),aN(e,u),e.intersect=function(t){return D.info("filledCircle intersect",e,{radius:7,point:t}),V.circle(e,7,t)},a}var ER=b(()=>{zI(),t(),RN(),MN(),i(),me(TR,"filledCircle")});async function CR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(t,e,sN(e)),o=a.width+(e.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],u=e.cssStyles,d=FI.svg(i),p=AN(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),tN(h)),f=d.path(g,p),m=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),e.width=o,e.height=l,aN(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return D.info("Triangle intersect",e,h,t),V.polygon(e,h,t)},i}var SR=b(()=>{t(),i(),RN(),MN(),zI(),i(),me(CR,"flippedTriangle")});function _R(t,e,{dir:r,config:{state:n,themeVariables:i}}){var a=Q(e).nodeStyles;e.label="";let s=t.insert("g").attr("class",sN(e)).attr("id",e.domId??e.id),o=e.cssStyles,l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));var t=-1*l/2,r=-1*c/2,h=FI.svg(s),i=AN(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(i.roughness=0,i.fillStyle="solid");let u=h.rectangle(t,r,l,c,i),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),aN(e,d),h=n?.padding??0,e.width&&e.height&&(e.width+=h/2||0,e.height+=h/2||0),e.intersect=function(t){return V.rect(e,t)},s}var AR=b(()=>{zI(),RN(),MN(),i(),me(_R,"forkJoin")});async function LR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(t,e,sN(e)),s=Math.max(80,a.width+2*(e.padding??0),e?.width??0),o=Math.max(50,a.height+2*(e.padding??0),e?.height??0),l=o/2,c=e.cssStyles,h=FI.svg(i),u=AN(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...rN(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=tN(d),g=h.path(p,u),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),aN(e,f),e.intersect=function(t){return D.info("Pill intersect",e,{radius:l,point:t}),V.polygon(e,d,t)},i}var NR=b(()=>{t(),i(),RN(),MN(),zI(),me(LR,"halfRoundedRectangle")});async function IR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await nN(t,e,sN(e))),i=t.height+(e.padding??0),t=t.width+2.5*(e.padding??0),a=e.cssStyles,s=FI.svg(r),o=AN(e,{}),l=("handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid"),t/2);let c=i/2,h=c/2,u=(l+=l/6)-h,d=[{x:-u,y:-c},{x:0,y:-c},{x:u,y:-c},{x:l,y:0},{x:u,y:c},{x:0,y:c},{x:-u,y:c},{x:-l,y:0}],p=tN(d),g=s.path(p,o),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),e.width=t,e.height=i,aN(e,f),e.intersect=function(t){return V.polygon(e,d,t)},r}var RR=b(()=>{i(),RN(),MN(),zI(),me(IR,"hexagon")});async function MR(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),r=(e.label="",e.labelStyle=r,(await nN(t,e,sN(e))).shapeSvg),t=Math.max(30,e?.width??0),i=Math.max(30,e?.height??0),a=e.cssStyles,s=FI.svg(r),o=AN(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:t,y:0},{x:0,y:i},{x:t,y:i}],c=tN(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),u.attr("transform",`translate(${-t/2}, ${-i/2})`),aN(e,u),e.intersect=function(t){return D.info("Pill intersect",e,{points:l}),V.polygon(e,l,t)},r}var DR=b(()=>{t(),i(),RN(),MN(),zI(),me(MR,"hourglass")});async function OR(t,i,{config:{themeVariables:e,flowchart:r}}){var n,a=Q(i).labelStyles,a=(i.labelStyle=a,i.assetHeight??48),a=Math.max(a,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await nN(t,i,"icon-shape default"),c="t"===i.pos,h=a,u=a,d=e.nodeBorder,p=CN(i).stylesMap,g=-u/2,f=-h/2,m=i.label?8:0,y=FI.svg(s),v=AN(i,{stroke:"none",fill:"none"}),x=("handDrawn"!==i.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),b=Math.max(u,o.width),w=h+o.height+m,k=y.rectangle(-b/2,-w/2,b,w,{...v,fill:"transparent",stroke:"none"}),T=s.insert(()=>x,":first-child"),E=s.insert(()=>k);return i.icon&&((r=s.append("g")).html(`<g>${await Dc(i.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),e=(t=r.node().getBBox()).width,a=t.height,n=t.y,r.attr("transform",`translate(${-e/2-t.x},${c?o.height/2+m/2-a/2-n:-o.height/2-m/2-a/2-n})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${c?-w/2:w/2-o.height})`),T.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),aN(i,E),i.intersect=function(t){var e,r,n;return D.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-o.width/2,y:e-r/2},{x:n+o.width/2,y:e-r/2},{x:n+o.width/2,y:e-r/2+o.height+m},{x:n+u/2,y:e-r/2+o.height+m},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+o.height+m},{x:n-o.width/2,y:e-r/2+o.height+m}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+o.width/2,y:e-r/2+h},{x:n+o.width/2/2,y:e+r/2},{x:n-o.width/2,y:e+r/2},{x:n-o.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],V.polygon(i,n,t)):V.rect(i,t)},s}var PR=b(()=>{zI(),t(),Pc(),RN(),MN(),i(),me(OR,"icon")});async function BR(t,e,{config:{themeVariables:r,flowchart:n}}){var i=Q(e).labelStyles,i=(e.labelStyle=i,e.assetHeight??48),i=Math.max(i,e.assetWidth??48),n=n?.wrappingWidth,{shapeSvg:n,bbox:t,label:a}=(e.width=Math.max(i,n??0),await nN(t,e,"icon-shape default")),s=e.label?8:0,o="t"===e.pos,{nodeBorder:r,mainBkg:l}=r,c=CN(e).stylesMap,h=FI.svg(n),u=AN(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,n.append("g"));e.icon&&d.html(`<g>${await Dc(e.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let p=d.node().getBBox(),g=p.width,f=p.height,m=p.x,y=p.y,v=Math.max(g,f)*Math.SQRT2+40,x=h.circle(0,0,v,u),b=Math.max(v,t.width),w=v+t.height+s,k=h.rectangle(-b/2,-w/2,b,w,{...u,fill:"transparent",stroke:"none"}),T=n.insert(()=>x,":first-child"),E=n.insert(()=>k);return d.attr("transform",`translate(${-g/2-m},${o?t.height/2+s/2-f/2-y:-t.height/2-s/2-f/2-y})`),d.attr("style",`color: ${c.get("stroke")??r};`),a.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))},${o?-w/2:w/2-t.height})`),T.attr("transform",`translate(0,${o?t.height/2+s/2:-t.height/2-s/2})`),aN(e,E),e.intersect=function(t){return D.info("iconSquare intersect",e,t),V.rect(e,t)},n}var $R,FR=b(()=>{zI(),t(),Pc(),RN(),MN(),i(),me(BR,"iconCircle")}),zR=b(()=>{$R=me((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")});async function GR(t,i,{config:{themeVariables:e,flowchart:r}}){var n=Q(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await nN(t,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=e,g=CN(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=FI.svg(a),x=AN(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path($R(f,m,u,h,5),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child").attr("class","icon-shape2"),S=a.insert(()=>E);return i.icon&&((t=a.append("g")).html(`<g>${await Dc(i.icon,{height:n,width:n,fallbackPrefix:""})}</g>`),r=(e=t.node().getBBox()).width,n=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),t.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),aN(i,S),i.intersect=function(t){var e,r,n;return D.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+y},{x:n+u/2,y:e-r/2+s.height+y},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+s.height+y},{x:n-s.width/2,y:e-r/2+s.height+y}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+s.width/2,y:e-r/2+h},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],V.polygon(i,n,t)):V.rect(i,t)},a}var UR=b(()=>{zI(),t(),Pc(),RN(),MN(),zR(),i(),me(GR,"iconRounded")});async function qR(t,i,{config:{themeVariables:e,flowchart:r}}){var n=Q(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await nN(t,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=e,g=CN(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=FI.svg(a),x=AN(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path($R(f,m,u,h,.1),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child"),S=a.insert(()=>E);return i.icon&&((t=a.append("g")).html(`<g>${await Dc(i.icon,{height:n,width:n,fallbackPrefix:""})}</g>`),r=(e=t.node().getBBox()).width,n=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),t.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),aN(i,S),i.intersect=function(t){var e,r,n;return D.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+y},{x:n+u/2,y:e-r/2+s.height+y},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+s.height+y},{x:n-s.width/2,y:e-r/2+s.height+y}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+s.width/2,y:e-r/2+h},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],V.polygon(i,n,t)):V.rect(i,t)},a}var jR=b(()=>{zI(),t(),Pc(),RN(),zR(),MN(),i(),me(qR,"iconSquare")});async function WR(t,i,{config:{flowchart:e}}){(n=new Image).src=i?.img??"",await n.decode();var r=Number(n.naturalWidth.toString().replace("px","")),n=Number(n.naturalHeight.toString().replace("px","")),a=(i.imageAspectRatio=r/n,Q(i).labelStyles),a=(i.labelStyle=a,e?.wrappingWidth);i.defaultWidth=e?.wrappingWidth;let s=Math.max(i.label?a??0:0,i?.assetWidth??r),o="on"===i.constraint&&i?.assetHeight?i.assetHeight*i.imageAspectRatio:s,l="on"===i.constraint?o/i.imageAspectRatio:i?.assetHeight??n,{shapeSvg:c,bbox:h,label:u}=(i.width=Math.max(o,a??0),await nN(t,i,"image-shape default")),d="t"===i.pos,p=-o/2,g=-l/2,f=i.label?8:0,m=FI.svg(c),y=AN(i,{}),v=("handDrawn"!==i.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),x=Math.max(o,h.width),b=l+h.height+f,w=m.rectangle(-x/2,-b/2,x,b,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),T=c.insert(()=>w);return i.img&&((e=c.append("image")).attr("href",i.img),e.attr("width",o),e.attr("height",l),e.attr("preserveAspectRatio","none"),e.attr("transform",`translate(${-o/2},${d?b/2-l:-b/2})`)),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-l/2-h.height/2-f/2:l/2-h.height/2+f/2})`),k.attr("transform",`translate(0,${d?h.height/2+f/2:-h.height/2-f/2})`),aN(i,T),i.intersect=function(t){var e,r,n;return D.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=d?[{x:n-h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2+h.height+f},{x:n+o/2,y:e-r/2+h.height+f},{x:n+o/2,y:e+r/2},{x:n-o/2,y:e+r/2},{x:n-o/2,y:e-r/2+h.height+f},{x:n-h.width/2,y:e-r/2+h.height+f}]:[{x:n-o/2,y:e-r/2},{x:n+o/2,y:e-r/2},{x:n+o/2,y:e-r/2+l},{x:n+h.width/2,y:e-r/2+l},{x:n+h.width/2/2,y:e+r/2},{x:n-h.width/2,y:e+r/2},{x:n-h.width/2,y:e-r/2+l},{x:n-o/2,y:e-r/2+l}],V.polygon(i,n,t)):V.rect(i,t)},c}var YR=b(()=>{zI(),t(),RN(),MN(),i(),me(WR,"imageSquare")});async function HR(t,i){var{labelStyles:e,nodeStyles:r}=Q(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await nN(t,i,sN(i)),s=Math.max(n.width+2*(i.padding??0),i?.width??0),o=Math.max(n.height+2*(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=FI.svg(a),e=AN(i,{}),r=tN(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=YI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(t){return V.polygon(i,l,t)},a}var VR=b(()=>{i(),RN(),MN(),zI(),HI(),me(HR,"inv_trapezoid")});async function XR(t,n,e){var{labelStyles:r,nodeStyles:i}=Q(n);n.labelStyle=r;let{shapeSvg:a,bbox:s}=await nN(t,n,sN(n)),o=Math.max(s.width+2*e.labelPaddingX,n?.width||0),l=Math.max(s.height+2*e.labelPaddingY,n?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=n,g=n.cssStyles;if(e?.rx&&e.ry&&(d=e.rx,p=e.ry),"handDrawn"===n.look){let t=FI.svg(a),e=AN(n,{}),r=d||p?t.path($R(c,h,o,l,d||0),e):t.rectangle(c,h,o,l,e);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",_C(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",_C(d)).attr("ry",_C(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return aN(n,u),n.calcIntersect=function(t,e){return V.rect(t,e)},n.intersect=function(t){return V.rect(n,t)},a}var KR=b(()=>{i(),RN(),zR(),MN(),zI(),iS(),me(XR,"drawRect")});async function ZR(t,e){var{shapeSvg:t,bbox:r,label:n}=await nN(t,e,"label"),i=t.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),n.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),aN(e,i),e.intersect=function(t){return V.rect(e,t)},t}var QR=b(()=>{KR(),i(),RN(),me(ZR,"labelRect")});async function JR(t,i){var{labelStyles:e,nodeStyles:r}=Q(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await nN(t,i,sN(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=FI.svg(a),e=AN(i,{}),r=tN(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=YI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(t){return V.polygon(i,l,t)},a}var tM=b(()=>{i(),RN(),MN(),zI(),HI(),me(JR,"lean_left")});async function eM(t,i){var{labelStyles:e,nodeStyles:r}=Q(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await nN(t,i,sN(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=FI.svg(a),e=AN(i,{}),r=tN(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=YI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(t){return V.polygon(i,l,t)},a}var rM=b(()=>{i(),RN(),MN(),zI(),HI(),me(eM,"lean_right")});function nM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",sN(e)).attr("id",e.domId??e.id),a=e.cssStyles,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),l=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],c=FI.svg(i),h=AN(e,{}),u=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),tN(l)),d=c.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),aN(e,p),e.intersect=function(t){return D.info("lightningBolt intersect",e,t),V.polygon(e,l,t)},i}var iM=b(()=>{t(),i(),MN(),zI(),RN(),i(),me(nM,"lightningBolt")});async function aM(t,s){var{labelStyles:e,nodeStyles:r}=Q(s);s.labelStyle=e;let{shapeSvg:o,bbox:n,label:i}=await nN(t,s,sN(s)),l=Math.max(n.width+(s.padding??0),s.width??0),c=l/2,h=c/(2.5+l/50),u=Math.max(n.height+h+(s.padding??0),s.height??0),d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let t=FI.svg(o),e=oM(0,0,l,u,c,h,d),r=lM(0,h,l,u,c,h),n=AN(s,{}),i=t.path(e,n),a=t.path(r,n);o.insert(()=>a,":first-child").attr("class","line"),(p=o.insert(()=>i,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else e=sM(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",_C(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),aN(s,p),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),s.intersect=function(e){var r=V.rect(s,e),n=r.x-(s.x??0);if(0!=c&&(Math.abs(n)<(s.width??0)/2||Math.abs(n)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let t=h*h*(1-n*n/(c*c));0<t&&(t=Math.sqrt(t)),t=h-t,0<e.y-(s.y??0)&&(t=-t),r.y+=t}return r},o}var sM,oM,lM,cM=b(()=>{i(),RN(),MN(),zI(),iS(),sM=me((t,e,r,n,i,a,s)=>[`M${t},`+(e+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},`+(e+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),oM=me((t,e,r,n,i,a,s)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},`+(e+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lM=me((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(aM,"linedCylinder")});async function hM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await nN(t,e,sN(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=s+o,c=e.cssStyles,h=FI.svg(r),u=AN(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:l/2},...eN(-a/2-a/2*.1,l/2,a/2+a/2*.1,l/2,o,.8),{x:a/2+a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:-l/2},{x:-a/2,y:-l/2},{x:-a/2,y:l/2*1.1},{x:-a/2,y:-l/2}],p=h.polygon(d.map(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)+a/2*.1/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),aN(e,g),e.intersect=function(t){return V.polygon(e,d,t)},r}var uM=b(()=>{i(),RN(),zI(),MN(),me(hM,"linedWaveEdgedRect")});async function dM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(t,e,sN(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=FI.svg(i),p=AN(e,{}),g=[{x:c-5,y:5+h},{x:c-5,y:h+l+5},{x:c+o-5,y:h+l+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h+l-5},{x:c+o+5,y:h+l-5},{x:c+o+5,y:h-5},{x:5+c,y:h-5},{x:5+c,y:h},{x:c,y:h},{x:c,y:5+h}],f=[{x:c,y:5+h},{x:c+o-5,y:5+h},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h},{x:c,y:h}],m=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),tN(g)),y=d.path(m,p),v=tN(f),x=d.path(v,{...p,fill:"none"}),b=i.insert(()=>x,":first-child");return b.insert(()=>y,":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),aN(e,b),e.intersect=function(t){return V.polygon(e,g,t)},i}var pM=b(()=>{i(),MN(),zI(),RN(),me(dM,"multiRect")});async function gM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(t,e,sN(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=e.cssStyles,g=eN(u-5,d+h+5,u+o-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:5+d},{x:u-5,y:d+h+5},...g,{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:f.y-10},{x:u+o+5,y:f.y-10},{x:u+o+5,y:d-5},{x:5+u,y:d-5},{x:5+u,y:d},{x:u,y:d},{x:u,y:5+d}],y=[{x:u,y:5+d},{x:u+o-5,y:5+d},{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:d},{x:u,y:d}],v=FI.svg(i),x=AN(e,{}),b=("handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid"),tN(m)),w=v.path(b,x),k=tN(y),T=v.path(k,x),E=i.insert(()=>w,":first-child");return E.insert(()=>T),E.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),aN(e,E),e.intersect=function(t){return V.polygon(e,m,t)},i}var fM=b(()=>{i(),RN(),zI(),MN(),me(gM,"multiWaveEdgedRectangle")});async function mM(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=Q(e),{shapeSvg:n,bbox:t,label:a}=(e.labelStyle=n,e.useHtmlLabels||!1!==ar().flowchart?.htmlLabels||(e.centerLabel=!0),await nN(t,e,sN(e))),s=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),l=-s/2,c=-o/2,h=e.cssStyles,u=FI.svg(n),r=AN(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(r.roughness=0,r.fillStyle="solid");let d=u.rectangle(l,c,s,o,r),p=n.insert(()=>d,":first-child");return p.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),a.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))}, ${-t.height/2-(t.y-(t.top??0))})`),aN(e,p),e.intersect=function(t){return V.rect(e,t)},n}var yM=b(()=>{zI(),RN(),MN(),i(),rn(),me(mM,"note")});async function vM(t,i){var{labelStyles:e,nodeStyles:r}=Q(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await nN(t,i,sN(i)),s=n.width+i.padding,o=n.height+i.padding,l=s+o,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let t=FI.svg(a),e=AN(i,{}),r=xM(0,0,l),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2+.5}, ${l/2})`),u&&h.attr("style",u)}else(h=YI(a,l,l,c)).attr("transform",`translate(${-l/2+.5}, ${l/2})`);return r&&h.attr("style",r),aN(i,h),i.calcIntersect=function(t,e){var r=t.width;return{x:(t=V.polygon(t,[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],e)).x-.5,y:t.y-.5}},i.intersect=function(t){return this.calcIntersect(i,t)},a}var xM,bM=b(()=>{i(),RN(),MN(),zI(),HI(),xM=me((t,e,r)=>[`M${t+r/2},`+e,`L${t+r},`+(e-r/2),`L${t+r/2},`+(e-r),`L${t},`+(e-r/2),"Z"].join(" "),"createDecisionBoxPathD"),me(vM,"question")});async function wM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(t,e,sN(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],p=e.cssStyles,g=FI.svg(i),f=AN(e,{}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),tN(d)),y=g.path(m,f),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),aN(e,v),e.intersect=function(t){return V.polygon(e,d,t)},i}var kM=b(()=>{i(),RN(),MN(),zI(),me(wM,"rect_left_inv_arrow")});function TM(t,e){e&&t.attr("style",e)}async function EM(t){let e=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=O(),i=t.label;t.label&&Ec(t.label)&&(i=await _c(t.label.replace(L.lineBreakRegex,` +`),n));var a='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>";return r.html(lc(a,n)),TM(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var CM,SM,_M=b(()=>{i6(),Tu(),Oc(),t(),iS(),me(TM,"applyStyle"),me(EM,"addHtmlLabel"),CM=me(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),fc(O().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),D.info("vertexText"+i),EM({isNode:n,label:rS(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),SM=CM});async function AM(i,a){var{labelStyles:t,nodeStyles:e}=Q(a);a.labelStyle=t;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",i.insert("g").attr("class",r).attr("id",a.domId||a.id)),n=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",e),l=a.description,c=a.label,h=o.node().appendChild(await SM(c,a.labelStyle,!0,!0)),u={width:0,height:0};fc(O()?.flowchart?.htmlLabels)&&(t=h.children[0],i=H(h),u=t.getBoundingClientRect(),i.attr("width",u.width),i.attr("height",u.height)),D.info("Text 2",l);var t=l||[],i=h.getBBox(),d=(t=o.node().appendChild(await SM(t.join?t.join("<br/>"):t,a.labelStyle,!0,!0))).children[0],p=H(t),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);H(t).attr("transform","translate( "+(u.width>i.width?0:(i.width-u.width)/2)+", "+(i.height+d+5)+")"),H(h).attr("transform","translate( "+(u.width<i.width?0:-(i.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-d+3)+")");let g=u.width+(a.padding||0),f=u.height+(a.padding||0),m=-u.width/2-d,y=-u.height/2-d,v,x;if("handDrawn"===a.look){let t=FI.svg(s),e=AN(a,{}),r=t.path($R(m,y,g,f,a.rx||0),e),n=t.line(-u.width/2-d,-u.height/2-d+i.height+d,u.width/2+d,-u.height/2-d+i.height+d,e);x=s.insert(()=>(D.debug("Rough node insert CXC",r),n),":first-child"),v=s.insert(()=>(D.debug("Rough node insert CXC",r),r),":first-child")}else v=n.insert("rect",":first-child"),x=n.insert("line"),v.attr("class","outer title-state").attr("style",e).attr("x",-u.width/2-d).attr("y",-u.height/2-d).attr("width",u.width+(a.padding||0)).attr("height",u.height+(a.padding||0)),x.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+i.height+d).attr("y2",-u.height/2-d+i.height+d);return aN(a,v),a.intersect=function(t){return V.rect(a,t)},s}var LM=b(()=>{i6(),Oc(),i(),_M(),RN(),MN(),zI(),Tu(),zR(),t(),me(AM,"rectWithTitle")});function NM(t,e,r,n,i,a,s){var o=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=Math.sqrt(((r-t)/2/i)**2+((n-e)/2/a)**2);if(1<h)throw new Error("The given radii are too small to create an arc between the points.");let u=Math.sqrt(1-h**2),d=o+u*a*Math.sin(c)*(s?-1:1),p=l-u*i*Math.cos(c)*(s?-1:1),g=Math.atan2((e-p)/a,(t-d)/i),f=Math.atan2((n-p)/a,(r-d)/i)-g;s&&f<0&&(f+=2*Math.PI),!s&&0<f&&(f-=2*Math.PI);var m=[];for(let t=0;t<20;t++){var y=g+t/19*f,v=d+i*Math.cos(y),y=p+a*Math.sin(y);m.push({x:v,y:y})}return m}async function IM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await nN(t,e,sN(e))),i=e?.padding??0,a=e?.padding??0,i=(e?.width||t.width)+2*i,t=(e?.height||t.height)+2*a,a=e.radius||5,s=e.taper||5,o=e.cssStyles,l=FI.svg(r),c=AN(e,{});e.stroke&&(c.stroke=e.stroke),"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let h=[{x:-i/2+s,y:-t/2},{x:i/2-s,y:-t/2},...NM(i/2-s,-t/2,i/2,-t/2+s,a,a,!0),{x:i/2,y:-t/2+s},{x:i/2,y:t/2-s},...NM(i/2,t/2-s,i/2-s,t/2,a,a,!0),{x:i/2-s,y:t/2},{x:-i/2+s,y:t/2},...NM(-i/2+s,t/2,-i/2,t/2-s,a,a,!0),{x:-i/2,y:t/2-s},{x:-i/2,y:-t/2+s},...NM(-i/2,-t/2+s,-i/2+s,-t/2,a,a,!0)],u=tN(h),d=l.path(u,c),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",o),n&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",n),aN(e,p),e.intersect=function(t){return V.polygon(e,h,t)},r}var RM=b(()=>{i(),RN(),MN(),zI(),me(NM,"generateArcPoints"),me(IM,"roundedRect")});async function MM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await nN(t,e,sN(e))),a=e?.padding??0,s=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),l=-t.width/2-a,a=-t.height/2-a,c=e.cssStyles,h=FI.svg(r),u=AN(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:l,y:a},{x:l+s+8,y:a},{x:l+s+8,y:a+o},{x:l-8,y:a+o},{x:l-8,y:a},{x:l,y:a},{x:l,y:a+o}],p=h.polygon(d.map(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",_C(c)),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),i.attr("transform",`translate(${-s/2+4+(e.padding??0)-(t.x-(t.left??0))},${-o/2+(e.padding??0)-(t.y-(t.top??0))})`),aN(e,g),e.intersect=function(t){return V.rect(e,t)},r}var DM=b(()=>{i(),RN(),MN(),zI(),iS(),me(MM,"shadedProcess")});async function OM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await nN(t,e,sN(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=-a/2,l=-s/2,c=e.cssStyles,h=FI.svg(r),u=AN(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:o,y:l},{x:o,y:l+s},{x:o+a,y:l+s},{x:o+a,y:l-s/2}],p=tN(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(0, ${s/4})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))}, ${-s/4+(e.padding??0)-(t.y-(t.top??0))})`),aN(e,f),e.intersect=function(t){return V.polygon(e,d,t)},r}var PM=b(()=>{i(),RN(),MN(),zI(),me(OM,"slopedRect")});async function BM(t,e){return XR(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var $M=b(()=>{KR(),me(BM,"squareRect")});async function FM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await nN(t,e,sN(e))),i=t.height+e.padding,t=t.width+i/4+e.padding,a=i/2,s=e.cssStyles,o=FI.svg(r),l=AN(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=[{x:-t/2+a,y:-i/2},{x:t/2-a,y:-i/2},...rN(-t/2+a,0,a,50,90,270),{x:t/2-a,y:i/2},...rN(t/2-a,0,a,50,270,450)],h=tN(c),u=o.path(h,l),d=r.insert(()=>u,":first-child");return d.attr("class","basic label-container outer-path"),s&&"handDrawn"!==e.look&&d.selectChildren("path").attr("style",s),n&&"handDrawn"!==e.look&&d.selectChildren("path").attr("style",n),aN(e,d),e.intersect=function(t){return V.polygon(e,c,t)},r}var zM=b(()=>{i(),RN(),MN(),zI(),me(FM,"stadium")});async function GM(t,e){return XR(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var UM=b(()=>{KR(),me(GM,"state")});function qM(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=Q(e),n=(e.labelStyle=n,e.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=FI.svg(t),l=AN(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=o.circle(0,0,14,{...l,stroke:r,strokeWidth:2}),h=a??s,u=o.circle(0,0,5,{...l,fill:h,stroke:h,strokeWidth:2,fillStyle:"solid"}),d=t.insert(()=>c,":first-child");return d.insert(()=>u),n&&d.selectAll("path").attr("style",n),i&&d.selectAll("path").attr("style",i),aN(e,d),e.intersect=function(t){return V.circle(e,7,t)},t}var jM=b(()=>{zI(),RN(),MN(),i(),me(qM,"stateEnd")});function WM(t,e,{config:{themeVariables:r}}){let n=r.lineColor,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if("handDrawn"===e.look){let t=FI.svg(i).circle(0,0,14,EN(n));(a=i.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(a=i.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return aN(e,a),e.intersect=function(t){return V.circle(e,7,t)},i}var YM=b(()=>{zI(),RN(),MN(),i(),me(WM,"stateStart")});async function HM(a,s){var{labelStyles:o,nodeStyles:t}=Q(s);s.labelStyle=o;let{shapeSvg:l,bbox:e}=await nN(a,s,sN(s)),r=(s?.padding||0)/2,c=e.width+s.padding,h=e.height+s.padding,u=-e.width/2-r,d=-e.height/2-r,n=[{x:0,y:0},{x:c,y:0},{x:c,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if("handDrawn"===s.look){let t=FI.svg(l),e=AN(s,{}),r=t.rectangle(u-8,d,c+16,h,e),n=t.line(u,d,u,d+h,e),i=t.line(u+c,d,u+c,d+h,e);l.insert(()=>n,":first-child"),l.insert(()=>i,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",_C(a)),aN(s,o)}else a=YI(l,c,h,n),t&&a.attr("style",t),aN(s,a);return s.intersect=function(t){return V.polygon(s,n,t)},l}var VM=b(()=>{i(),RN(),MN(),zI(),HI(),iS(),me(HM,"subroutine")});async function XM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(t,e,sN(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=e.cssStyles,p=FI.svg(i),g=AN(e,{}),f=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],m=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}],y=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),tN(f)),v=p.path(y,g),x=tN(m),b=p.path(x,{...g,fillStyle:"solid"}),w=i.insert(()=>b,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",d),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),aN(e,w),e.intersect=function(t){return V.polygon(e,f,t)},i}var KM=b(()=>{i(),MN(),zI(),RN(),me(XM,"taggedRect")});async function ZM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await nN(t,e,sN(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=.2*a,c=.2*s,h=s+o,u=e.cssStyles,d=FI.svg(r),p=AN(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...eN(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,o,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2}],f=-a/2+a/2*.1,m=-h/2-.4*c,y=[{x:f+a-l,y:1.4*(m+s)},{x:f+a,y:m+s-c},{x:f+a,y:.9*(m+s)},...eN(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=tN(g),x=d.path(v,p),b=tN(y),w=d.path(b,{...p,fillStyle:"solid"}),k=r.insert(()=>w,":first-child");return k.insert(()=>x,":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),aN(e,k),e.intersect=function(t){return V.polygon(e,g,t)},r}var QM=b(()=>{i(),RN(),zI(),MN(),me(ZM,"taggedWaveEdgedRectangle")});async function JM(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await nN(t,e,sN(e))),i=Math.max(t.width+e.padding,e?.width||0),a=-i/2,s=-(t=Math.max(t.height+e.padding,e?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",i).attr("height",t),aN(e,o),e.intersect=function(t){return V.rect(e,t)},r}var tD=b(()=>{i(),RN(),MN(),me(JM,"text")});async function eD(t,a){var{labelStyles:e,nodeStyles:r}=Q(a);a.labelStyle=e;let{shapeSvg:s,bbox:n,label:i,halfPadding:o}=await nN(t,a,sN(a)),l="neo"===a.look?2*o:o,c=n.height+l,h=c/2,u=h/(2.5+c/50),d=n.width+u+l,p=a.cssStyles,g;if("handDrawn"===a.look){let t=FI.svg(s),e=nD(0,0,d,c,u,h),r=iD(0,0,d,c,u,h),n=t.path(e,AN(a,{})),i=t.path(r,AN(a,{fill:"none"}));g=s.insert(()=>i,":first-child"),(g=s.insert(()=>n,":first-child")).attr("class","basic label-container"),p&&g.attr("style",p)}else e=rD(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",_C(p)).attr("style",r)).attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),r&&g.selectAll("path").attr("style",r);return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),i.attr("transform",`translate(${-n.width/2-u-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),aN(a,g),a.intersect=function(e){var r=V.rect(a,e),n=r.y-(a.y??0);if(0!=h&&(Math.abs(n)<(a.height??0)/2||Math.abs(n)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-u)){let t=u*u*(1-n*n/(h*h));0!=t&&(t=Math.sqrt(Math.abs(t))),t=u-t,0<e.x-(a.x??0)&&(t=-t),r.x+=t}return r},s}var rD,nD,iD,aD=b(()=>{i(),MN(),zI(),RN(),iS(),rD=me((t,e,r,n,i,a)=>`M${t},${e} + a${i},${a} 0,0,1 0,${-n} + l${r},0 + a${i},${a} 0,0,1 0,${n} + M${r},${-n} + a${i},${a} 0,0,0 0,${n} + l${-r},0`,"createCylinderPathD"),nD=me((t,e,r,n,i,a)=>[`M${t},`+e,`M${t+r},`+e,`a${i},${a} 0,0,0 0,`+-n,`l${-r},0`,`a${i},${a} 0,0,0 0,`+n,`l${r},0`].join(" "),"createOuterCylinderPathD"),iD=me((t,e,r,n,i,a)=>[`M${t+r/2},`+-n/2,`a${i},${a} 0,0,0 0,`+n].join(" "),"createInnerCylinderPathD"),me(eD,"tiltedCylinder")});async function sD(t,i){var{labelStyles:e,nodeStyles:r}=Q(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await nN(t,i,sN(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=FI.svg(a),e=AN(i,{}),r=tN(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=YI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(t){return V.polygon(i,l,t)},a}var oD=b(()=>{i(),RN(),MN(),zI(),HI(),me(sD,"trapezoid")});async function lD(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await nN(t,e,sN(e))),i=Math.max(60,t.width+2*(e.padding??0),e?.width??0),t=Math.max(20,t.height+2*(e.padding??0),e?.height??0),a=e.cssStyles,s=FI.svg(r),o=AN(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-i/2*.8,y:-t/2},{x:i/2*.8,y:-t/2},{x:i/2,y:-t/2*.6},{x:i/2,y:t/2},{x:-i/2,y:t/2},{x:-i/2,y:-t/2*.6}],c=tN(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),aN(e,u),e.intersect=function(t){return V.polygon(e,l,t)},r}var cD=b(()=>{i(),RN(),MN(),zI(),me(lD,"trapezoidalPentagon")});async function hD(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(t,e,sN(e)),o=fc(O().flowchart?.htmlLabels),l=a.width+(e.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],d=e.cssStyles,p=FI.svg(i),g=AN(e,{}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),tN(u)),m=p.path(f,g),y=i.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),n&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",n),e.width=l,e.height=c,aN(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return D.info("Triangle intersect",e,u,t),V.polygon(e,u,t)},i}var uD=b(()=>{t(),i(),RN(),MN(),zI(),i(),Oc(),Tu(),me(hD,"triangle")});async function dD(t,e){var{labelStyles:r,nodeStyles:n}=Q(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await nN(t,e,sN(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/8,l=s+o,c=e.cssStyles,h=0<(h=70-a)?h/2:0,u=FI.svg(r),d=AN(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...eN(-a/2-h,l/2,a/2+h,l/2,o,.8),{x:a/2+h,y:-l/2},{x:-a/2-h,y:-l/2}],g=tN(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o-(t.y-(t.top??0))})`),aN(e,m),e.intersect=function(t){return V.polygon(e,p,t)},r}var pD=b(()=>{i(),RN(),zI(),MN(),me(dD,"waveEdgedRectangle")});async function gD(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(t,e,sN(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=s/o,c=s,h=o;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);var r=Math.min(.2*h,h/4),t=h+2*r,u=e.cssStyles,d=FI.svg(i),p=AN(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:t/2},...eN(-c/2,t/2,c/2,t/2,r,1),{x:c/2,y:-t/2},...eN(c/2,-t/2,-c/2,-t/2,r,-1)],f=tN(g),m=d.path(f,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),aN(e,y),e.intersect=function(t){return V.polygon(e,g,t)},i}var fD=b(()=>{i(),RN(),MN(),zI(),me(gD,"waveRectangle")});async function mD(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(t,e,sN(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=FI.svg(i),p=AN(e,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-5}],f=`M${c-5},${h-5} L${c+o},${h-5} L${c+o},${h+l} L${c-5},${h+l} L${c-5},${h-5} + M${c-5},${h} L${c+o},${h} + M${c},${h-5} L${c},`+(h+l),m=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),d.path(f,p)),y=i.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),aN(e,y),e.intersect=function(t){return V.polygon(e,g,t)},i}var yD=b(()=>{i(),MN(),zI(),RN(),me(mD,"windowPane")});async function vD(t,e){var r,n=e,i=(n.alias&&(e.label=n.alias),"handDrawn"===e.look&&(A=(A=ar().themeVariables).background,await vD(t,{...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),ar());e.useHtmlLabels=i.htmlLabels;let o=i.er?.diagramPadding??10,l=i.er?.entityPadding??6,a=e.cssStyles,{labelStyles:s,nodeStyles:c}=Q(e);if(0===n.attributes.length&&e.label)return A={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},EC(e.label,i)+2*A.labelPaddingX<i.er.minEntityWidth&&(e.width=i.er.minEntityWidth),A=await XR(t,e,A),fc(i.htmlLabels)||(E=(_=A.select("text")).node()?.getBBox(),_.attr("transform",`translate(${-E.width/2}, 0)`)),A;i.htmlLabels||(o*=1.25,l*=1.25);let h=sN(e),u=(h=h||"node default",t.insert("g").attr("class",h).attr("id",e.domId||e.id)),d=await xD(u,e.label??"",i,0,0,["name"],s),p=(d.height+=l,0),g=[],f=[],m=0,y=0,v=0,x=0,b=!0,w=!0;for(r of n.attributes){var k=await xD(u,r.type,i,0,p,["attribute-type"],s),P=(m=Math.max(m,k.width+o),await xD(u,r.name,i,0,p,["attribute-name"],s)),B=(y=Math.max(y,P.width+o),await xD(u,r.keys.join(),i,0,p,["attribute-keys"],s)),$=(v=Math.max(v,B.width+o),await xD(u,r.comment,i,0,p,["attribute-comment"],s)),k=(x=Math.max(x,$.width+o),Math.max(k.height,P.height,B.height,$.height)+l);f.push({yOffset:p,rowHeight:k}),p+=k}let T=4;v<=o&&(b=!1,v=0,T--),x<=o&&(w=!1,x=0,T--);var E,F,C,S,_=u.node().getBBox(),A=(0<d.width+2*o-(m+y+v+x)&&(E=d.width+2*o-(m+y+v+x),m+=E/T,y+=E/T,0<v&&(v+=E/T),0<x)&&(x+=E/T),m+y+v+x),L=FI.svg(u),N=AN(e,{});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let z=0,I=(0<f.length&&(z=f.reduce((t,e)=>t+(e?.rowHeight??0),0)),Math.max(_.width+2*o,e?.width||0,A)),R=Math.max((z??0)+d.height,e?.height||0),M=-I/2,D=-R/2,G=(u.selectAll("g:not(:first-child)").each((t,e,r)=>{let n=H(r[e]),i=n.attr("transform"),a=0,s=0;i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2]),n.attr("class").includes("attribute-name")?a+=m:n.attr("class").includes("attribute-keys")?a+=m+y:n.attr("class").includes("attribute-comment")&&(a+=m+y+v)),n.attr("transform",`translate(${M+o/2+a}, ${s+D+d.height+l/2})`)}),u.select(".name").attr("transform","translate("+-d.width/2+", "+(D+l/2)+")"),L.rectangle(M,D,I,R,N)),U=u.insert(()=>G,":first-child").attr("style",a.join("")),q=ar().themeVariables,{rowEven:j,rowOdd:W,nodeBorder:Y}=q;g.push(0);for([F,C]of f.entries()){let t=(F+1)%2==0&&0!==C.yOffset,e=L.rectangle(M,d.height+D+C?.yOffset,I,C?.rowHeight,{...N,fill:t?j:W,stroke:Y});u.insert(()=>e,"g.label").attr("style",a.join("")).attr("class","row-rect-"+(t?"even":"odd"))}let O=L.line(M,d.height+D,I+M,d.height+D,N);u.insert(()=>O).attr("class","divider"),O=L.line(m+M,d.height+D,m+M,R+D,N),u.insert(()=>O).attr("class","divider"),b&&(O=L.line(m+y+M,d.height+D,m+y+M,R+D,N),u.insert(()=>O).attr("class","divider")),w&&(O=L.line(m+y+v+M,d.height+D,m+y+v+M,R+D,N),u.insert(()=>O).attr("class","divider"));for(S of g)O=L.line(M,d.height+D+S,I+M,d.height+D+S,N),u.insert(()=>O).attr("class","divider");return aN(e,U),c&&"handDrawn"!==e.look&&(t=c.split(";")?.filter(t=>t.includes("stroke"))?.map(t=>""+t).join("; "),u.selectAll("path").attr("style",t??""),u.selectAll(".row-rect-even path").attr("style",c)),e.intersect=function(t){return V.rect(e,t)},u}async function xD(t,e,r,n=0,i=0,a=[],s=""){if(t=t.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${n}, ${i})`).attr("style",s),e!==vc(e)&&(e=(e=vc(e)).replaceAll("<","<").replaceAll(">",">")),a=t.node().appendChild(await QL(t,e,{width:EC(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),e.includes("<")||e.includes(">")){let t=a.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let o=a.getBBox();return fc(r.htmlLabels)&&((n=a.children[0]).style.textAlign="start",i=H(a),o=n.getBoundingClientRect(),i.attr("width",o.width),i.attr("height",o.height)),o}var bD=b(()=>{i(),RN(),MN(),zI(),KR(),rn(),JL(),Oc(),i6(),iS(),me(vD,"erBox"),me(xD,"addText")});async function wD(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",sN(e)).attr("id",e.domId||e.id),o=null,l=null,c=null,h=null,u=0,d,p=0;var g,f;o=s.insert("g").attr("class","annotation-group text"),0<e.annotations.length&&(n=e.annotations[0],await kD(o,{text:`«${n}»`},0),u=o.node().getBBox().height),await kD(l=s.insert("g").attr("class","label-group text"),e,0,["font-weight: bolder"]),d=(t=l.node().getBBox()).height,c=s.insert("g").attr("class","members-group text");let m=0;for(g of e.members){var y=await kD(c,g,m,[g.parseClassifier()]);m+=y+a}(p=c.node().getBBox().height)<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let v=0;for(f of e.methods){var x=await kD(h,f,v,[f.parseClassifier()]);v+=x+a}return s.node().getBBox(),null!==o&&(n=o.node().getBBox(),o.attr("transform",`translate(${-n.width/2})`)),l.attr("transform",`translate(${-t.width/2}, ${u})`),s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*i})`),s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*i:2*i)})`),e=s.node().getBBox(),{shapeSvg:s,bbox:e}}async function kD(t,e,r,n=[]){let i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=ar(),s="useHtmlLabels"in e?e.useHtmlLabels:fc(a.htmlLabels)??!0,o="",l=(o="text"in e?e.text:e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Ec(o)&&(s=!0),await QL(i,Sh(rS(o)),{width:EC(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a)),c,h=1;if(s){var t=l.children[0],e=H(l),u=(h=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(h+=t.innerHTML.split("<mrow>").length-1),t.getElementsByTagName("img"));if(u){let n=""===o.replace(/<img[^>]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}else n.includes("font-weight: bolder")&&H(l).selectAll("tspan").attr("font-weight",""),h=l.children.length,u=l.children[0],""!==l.textContent&&!l.textContent.includes(">")||(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "!==o[1])||(u.textContent=u.textContent[0]+" "+u.textContent.substring(1)),"undefined"===u.textContent&&(u.textContent=""),c=l.getBBox();return i.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var TD=b(()=>{i6(),rn(),i(),iS(),Tu(),JL(),Oc(),me(wD,"textHelper"),me(kD,"addText")});async function ED(e,r){let t=O(),s=t.class.padding??12,n=s,o=r.useHtmlLabels??fc(t.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:i}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await wD(e,r,t,o,n)),{labelStyles:a,nodeStyles:h}=Q(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",e=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=e.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!t.class?.hideEmptyMembersBox),d=FI.svg(c),p=AN(r,{}),g=("handDrawn"!==r.look&&(p.roughness=0,p.fillStyle="solid"),i.width),f=i.height,m=(0===l.members.length&&0===l.methods.length?f+=n:0<l.members.length&&0===l.methods.length&&(f+=2*n),-g/2),y=-f/2,v=d.rectangle(m-s,y-s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),g+2*s,f+2*s+(u?2*s:0===l.members.length&&0===l.methods.length?-s:0),p),x=c.insert(()=>v,":first-child");x.attr("class","basic label-container");var b=x.node().getBBox(),w=(c.selectAll(".text").each((t,e,r)=>{let n=(e=H(r[e])).attr("transform"),i=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))?parseFloat(r[2]):0)+y+s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),a=(o||(i-=4),m);(e.attr("class").includes("label-group")||e.attr("class").includes("annotation-group"))&&(a=-e.node()?.getBBox().width/2||0,c.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(a=0)})),e.attr("transform",`translate(${a}, ${i})`)}),c.select(".annotation-group").node().getBBox().height-(u?s/2:0)||0),k=c.select(".label-group").node().getBBox().height-(u?s/2:0)||0,T=c.select(".members-group").node().getBBox().height-(u?s/2:0)||0;if(0<l.members.length||0<l.methods.length||u){let t=d.line(b.x,w+k+y+s,b.x+b.width,w+k+y+s,p);c.insert(()=>t).attr("class","divider").attr("style",e)}if(u||0<l.members.length||0<l.methods.length){let t=d.line(b.x,w+k+T+y+2*n+s,b.x+b.width,w+k+T+y+s+2*n,p);c.insert(()=>t).attr("class","divider").attr("style",e)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",e),x.select(":nth-child(2)").attr("style",e),c.selectAll(".divider").select("path").attr("style",e),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",e),o||((w=(b=RegExp(/color\s*:\s*([^;]*)/)).exec(e))?(k=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",k)):a&&(T=b.exec(a))&&(e=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",e))),aN(r,x),r.intersect=function(t){return V.rect(r,t)},c}var CD=b(()=>{i(),Tu(),i6(),zI(),MN(),RN(),TD(),Oc(),me(ED,"classBox")});async function SD(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let i=e,a=e,s="verifyMethod"in e,o=sN(e),l=t.insert("g").attr("class",o).attr("id",e.domId??e.id),c,h=c=s?await _D(l,`<<${i.type}>>`,0,e.labelStyle):await _D(l,"<<Element>>",0,e.labelStyle),u=await _D(l,i.name,h,e.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await _D(l,i.requirementId?"ID: "+i.requirementId:"",h,e.labelStyle),h+=r,t=await _D(l,i.text?"Text: "+i.text:"",h,e.labelStyle),h+=t,r=await _D(l,i.risk?"Risk: "+i.risk:"",h,e.labelStyle),h+=r,await _D(l,i.verifyMethod?"Verification: "+i.verifyMethod:"",h,e.labelStyle)):(t=await _D(l,a.type?"Type: "+a.type:"",h,e.labelStyle),h+=t,await _D(l,a.docRef?"Doc Ref: "+a.docRef:"",h,e.labelStyle)),(l.node()?.getBBox().width??200)+20),p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=FI.svg(l),y=AN(e,{}),v=("handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(g,f,d,p,y)),x=l.insert(()=>v,":first-child");if(x.attr("class","basic label-container").attr("style",n),l.selectAll(".label").each((t,e,r)=>{let n=H(r[e]),i=n.attr("transform"),a=0,s=0,o=(i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2])),s-p/2),l=10+g;0!==e&&1!==e||(l=a),n.attr("transform",`translate(${l}, ${20+o})`)}),h>c+u+20){let t=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert(()=>t).attr("style",n)}return aN(e,x),e.intersect=function(t){return V.rect(e,t)},l}async function _D(t,e,r,n=""){if(""===e)return 0;let i=t.insert("g").attr("class","label").attr("style",n),a=O(),s=a.htmlLabels??!0,o=await QL(i,Sh(rS(e)),{width:EC(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),l;if(s)t=o.children[0],e=H(o),l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height);else{var c;for(c of o.children[0].children)c.textContent=c.textContent.replaceAll(">",">").replaceAll("<","<"),n&&c.setAttribute("style",n);(l=o.getBBox()).height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var AD=b(()=>{i(),RN(),MN(),zI(),iS(),Tu(),JL(),i6(),me(SD,"requirementBox"),me(_D,"addText")});async function LD(t,n,{config:e}){var{labelStyles:i,nodeStyles:r}=Q(n),i=(n.labelStyle=i||"",n.width);n.width=(n.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await nN(t,n,sN(n)),l=n.padding||10,c,h,u=("ticket"in n&&n.ticket&&e?.kanban?.ticketBaseUrl&&(c=e?.kanban?.ticketBaseUrl.replace("#TICKET#",n.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:n.useHtmlLabels,labelStyle:n.labelStyle||"",width:n.width,img:n.img,padding:n.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await iN(h,"ticket"in n&&n.ticket||"",u):{label:d,bbox:p}=await iN(a,"ticket"in n&&n.ticket||"",u);var{label:t,bbox:e}=await iN(a,"assigned"in n&&n.assigned||"",u),i=(n.width=i,n?.width||0),g=Math.max(p.height,e.height)/2,f=Math.max(s.height+20,n?.height||0)+g,m=-i/2,y=-f/2;o.attr("transform","translate("+(l-i/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-i/2)+", "+(-g+s.height/2)+")"),t.attr("transform","translate("+(l+i/2-e.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=n,w=n.cssStyles;if("handDrawn"===n.look){let t=FI.svg(a),e=AN(n,{}),r=x||b?t.path($R(m,y,i,f,x||0),e):t.rectangle(m,y,i,f,e);(v=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",w||null)}else(v=a.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",r).attr("rx",x??5).attr("ry",b??5).attr("x",m).attr("y",y).attr("width",i).attr("height",f),(t="priority"in n&&n.priority)&&(e=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),i=y+f-Math.floor((x??0)/2),e.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",i).attr("stroke-width","4").attr("stroke",ND(t)));return aN(n,v),n.height=f,n.intersect=function(t){return V.rect(n,t)},a}var ND,ID=b(()=>{i(),RN(),zR(),MN(),zI(),ND=me(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority"),me(LD,"kanbanItem")});async function RD(t,n){var{labelStyles:i,nodeStyles:e}=Q(n),{shapeSvg:i,bbox:t,halfPadding:r,label:a}=(n.labelStyle=i,await nN(t,n,sN(n))),s=t.width+10*r,r=t.height+8*r,o=.15*s,l=n.cssStyles,c=t.height+20,s=Math.max(s,t.width+20),r=Math.max(r,c);a.attr("transform",`translate(${-t.width/2}, ${-t.height/2})`);let h,u=`M0 0 + a${o},${o} 1 0,0 ${.25*s},${-1*r*.1} + a${o},${o} 1 0,0 ${.25*s},0 + a${o},${o} 1 0,0 ${.25*s},0 + a${o},${o} 1 0,0 ${.25*s},${.1*r} + + a${o},${o} 1 0,0 ${.15*s},${.33*r} + a${.8*o},${.8*o} 1 0,0 0,${.34*r} + a${o},${o} 1 0,0 ${-1*s*.15},${.33*r} + + a${o},${o} 1 0,0 ${-1*s*.25},${.15*r} + a${o},${o} 1 0,0 ${-1*s*.25},0 + a${o},${o} 1 0,0 ${-1*s*.25},0 + a${o},${o} 1 0,0 ${-1*s*.25},${-1*r*.15} + + a${o},${o} 1 0,0 ${-1*s*.1},${-1*r*.33} + a${.8*o},${.8*o} 1 0,0 0,${-1*r*.34} + a${o},${o} 1 0,0 ${.1*s},${-1*r*.33} + H0 V0 Z`;if("handDrawn"===n.look){let t=FI.svg(i),e=AN(n,{}),r=t.path(u,e);(h=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",_C(l))}else h=i.insert("path",":first-child").attr("class","basic label-container").attr("style",e).attr("d",u);return h.attr("transform",`translate(${-s/2}, ${-r/2})`),aN(n,h),n.calcIntersect=function(t,e){return V.rect(t,e)},n.intersect=function(t){return D.info("Bang intersect",n,t),V.rect(n,t)},i}var MD=b(()=>{t(),i(),RN(),MN(),zI(),iS(),me(RD,"bang")});async function DD(t,n){var{labelStyles:e,nodeStyles:r}=Q(n);n.labelStyle=e;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await nN(t,n,sN(n)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,d=.35*l,p=.2*l,g=n.cssStyles,f,m=`M0 0 + a${h},${h} 0 0,1 ${.25*l},${-1*l*.1} + a${d},${d} 1 0,1 ${.4*l},${-1*l*.1} + a${u},${u} 1 0,1 ${.35*l},${.2*l} + + a${h},${h} 1 0,1 ${.15*l},${.35*c} + a${p},${p} 1 0,1 ${-1*l*.15},${.65*c} + + a${u},${h} 1 0,1 ${-1*l*.25},${.15*l} + a${d},${d} 1 0,1 ${-1*l*.5},0 + a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15} + + a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35} + a${p},${p} 1 0,1 ${.1*l},${-1*c*.65} + H0 V0 Z`;if("handDrawn"===n.look){let t=FI.svg(i),e=AN(n,{}),r=t.path(m,e);(f=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",_C(g))}else f=i.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",m);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-c/2})`),aN(n,f),n.calcIntersect=function(t,e){return V.rect(t,e)},n.intersect=function(t){return D.info("Cloud intersect",n,t),V.rect(n,t)},i}var OD=b(()=>{zI(),t(),iS(),RN(),MN(),i(),me(DD,"cloud")});async function PD(t,e){var{labelStyles:r,nodeStyles:n}=Q(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await nN(t,e,sN(e)),l=a.width+8*s,c=a.height+2*s,h=` + M${-l/2} ${c/2-5} + v${10-c} + q0,-5 5,-5 + h${l-10} + q5,0 5,5 + v${c-10} + q0,5 -5,5 + h${10-l} + q-5,0 -5,-5 + Z + `,u=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",h);return i.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>o.node()),aN(e,u),e.calcIntersect=function(t,e){return V.rect(t,e)},e.intersect=function(t){return V.rect(e,t)},i}var BD=b(()=>{RN(),MN(),i(),me(PD,"defaultMindmapNode")});async function $D(t,e){return QI(t,e,{padding:e.padding??0})}var FD=b(()=>{JI(),me($D,"mindmapCircle")});function zD(t){return t in qD}var GD,UD,qD,jD,WD,YD,HD,VD,XD,KD,ZD,QD,JD,tO,eO,rO=b(()=>{UI(),WI(),XI(),ZI(),JI(),rR(),aR(),lR(),uR(),pR(),vR(),bR(),kR(),ER(),SR(),AR(),NR(),RR(),DR(),PR(),FR(),UR(),jR(),YR(),VR(),QR(),tM(),rM(),iM(),cM(),uM(),pM(),fM(),yM(),bM(),kM(),LM(),RM(),DM(),PM(),$M(),zM(),UM(),jM(),YM(),VM(),KM(),QM(),tD(),aD(),oD(),cD(),uD(),pD(),fD(),yD(),bD(),CD(),AD(),ID(),MD(),OD(),BD(),FD(),GD=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:BM},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:IM},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:FM},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:HM},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:gR},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:QI},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:RD},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:DD},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:vM},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:IR},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:eM},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:JR},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:sD},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:HR},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:wR},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:JM},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:VI},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:MM},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:WM},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:qM},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:_R},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:MR},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:iR},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:oR},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:hR},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:nM},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:dD},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:LR},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:eD},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:aM},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:dR},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:xR},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:hD},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:mD},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:TR},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:lD},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:CR},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:OM},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:gM},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:dM},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:jI},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:eR},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ZM},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:XM},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:gD},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:wM},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:hM}],UD=me(()=>{var t=[...Object.entries({state:GM,choice:KI,note:mM,rectWithTitle:AM,labelRect:ZR,iconSquare:qR,iconCircle:BR,icon:OR,iconRounded:GR,imageSquare:WR,anchor:GI,kanbanItem:LD,mindmapCircle:$D,defaultMindmapNode:PD,classBox:ED,erBox:vD,requirementBox:SD}),...GD.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(t)},"generateShapeMap"),qD=UD(),me(zD,"isValidShape")}),nO=b(()=>{i6(),F9(),Tu(),t(),rO(),iS(),Oc(),ku(),jD=class{constructor(){this.vertexCounter=0,this.config=O(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=mh,this.setAccDescription=vh,this.setDiagramTitle=bh,this.getAccTitle=yh,this.getAccDescription=xh,this.getDiagramTitle=wh,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{me(this,"FlowDB")}sanitizeText(t){return L.sanitizeText(t,this.config)}lookUpDomId(t){for(var e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(n,i,a,s,o,l,c={},t){if(n&&0!==n.trim().length){let r;var e;if(void 0!==t&&(e=t.includes(` +`)?t+` +`:`{ +`+t+` +}`,r=$9(e,{schema:B9})),t=this.edges.find(t=>t.id===n))void 0!==(e=r)?.animate&&(t.animate=e.animate),void 0!==e?.animation&&(t.animation=e.animation),void 0!==e?.curve&&(t.interpolate=e.curve);else{let t,e=this.vertices.get(n);if(void 0===e&&(e={id:n,labelType:"text",domId:"flowchart-"+n+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(n,e)),this.vertexCounter++,void 0!==i?(this.config=O(),t=this.sanitizeText(i.text.trim()),e.labelType=i.type,t.startsWith('"')&&t.endsWith('"')&&(t=t.substring(1,t.length-1)),e.text=t):void 0===e.text&&(e.text=n),void 0!==a&&(e.type=a),s?.forEach(t=>{e.styles.push(t)}),o?.forEach(t=>{e.classes.push(t)}),void 0!==l&&(e.dir=l),void 0===e.props?e.props=c:void 0!==c&&Object.assign(e.props,c),void 0!==r){if(r.shape){if(r.shape!==r.shape.toLowerCase()||r.shape.includes("_"))throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);if(!zD(r.shape))throw new Error(`No such shape: ${r.shape}.`);e.type=r?.shape}r?.label&&(e.text=r?.label),r?.icon&&(e.icon=r?.icon,!r.label?.trim())&&e.text===n&&(e.text=""),r?.form&&(e.form=r?.form),r?.pos&&(e.pos=r?.pos),r?.img&&(e.img=r?.img,!r.label?.trim())&&e.text===n&&(e.text=""),r?.constraint&&(e.constraint=r.constraint),r.w&&(e.assetWidth=Number(r.w)),r.h&&(e.assetHeight=Number(r.h))}}}}addSingleLink(t,e,r,n){let i={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(D.info("abc78 Got edge...",i),void 0!==(t=r.text)&&(i.text=this.sanitizeText(t.text.trim()),i.text.startsWith('"')&&i.text.endsWith('"')&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=t.type),void 0!==r&&(i.type=r.type,i.stroke=r.stroke,i.length=10<r.length?10:r.length),n&&!this.edges.some(t=>t.id===n)?(i.id=n,i.isUserDefinedId=!0):0===(e=this.edges.filter(t=>t.start===i.start&&t.end===i.end)).length?i.id=nS(i.start,i.end,{counter:0,prefix:"L"}):i.id=nS(i.start,i.end,{counter:e.length+1,prefix:"L"}),!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`);D.info("Pushing edge..."),this.edges.push(i)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,r){var n,i=this.isLinkData(r)?r.id.replace("@",""):void 0;D.info("addLink",t,e,i);for(n of t)for(var a of e){var s=n===t[t.length-1],o=a===e[0];s&&o?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,0<(this.edges[t]?.style?.length??0)&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){let n=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),n?.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,r){for(let e of t.split(",")){var n=this.vertices.get(e);n&&n.classes.push(r),(n=this.edges.find(t=>t.id===e))&&n.classes.push(r),(n=this.subGraphLookup.get(e))&&n.classes.push(r)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(var r of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,e)}}setClickFun(t,e,n){let i=this.lookUpDomId(t);if("loose"===O().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith('"')&&t.endsWith('"')&&(t=t.substr(1,t.length-2)),r[e]=t}}0===r.length&&r.push(t),(n=this.vertices.get(t))&&(n.haveCallback=!0,this.funs.push(()=>{var t=document.querySelector(`[id="${i}"]`);null!==t&&t.addEventListener("click",()=>{tS.runFunc(e,...r)},!1)}))}}setLink(t,e,r){t.split(",").forEach(t=>{void 0!==(t=this.vertices.get(t))&&(t.link=tS.formatUrl(e,this.config),t.linkTarget=r)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFun(t,e,r)}),this.setClass(t,"clickable")}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e=H(t.currentTarget);null!==e.attr("title")&&(t=t.currentTarget?.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),e.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),H(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=O(),fh()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);var a=(t=me(t=>{let r={boolean:{},number:{},string:{}},n=[],i;return{nodeList:t.filter(function(t){var e=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(e in r?!r[e].hasOwnProperty(t)&&(r[e][t]=!0):!n.includes(t)&&n.push(t))}),dir:i}},"uniq")(e.flat())).nodeList,e=t.dir,t=O().flowchart??{},e=e??(t.inheritDir?this.getDirection()??O().direction??void 0:void 0);if("gen-1"===this.version)for(let t=0;t<a.length;t++)a[t]=this.lookUpDomId(a[t]);return n=n??"subGraph"+this.subCount,i=this.sanitizeText(i=i||""),this.subCount=this.subCount+1,t={id:n,nodes:a,title:i.trim(),classes:[],dir:e,labelType:r.type},D.info("Adding",t.id,t.nodes,t.dir),t.nodes=this.makeUniq(t,this.subGraphs).nodes,this.subGraphs.push(t),this.subGraphLookup.set(n,t),n}getPosForId(t){for(var[e,r]of this.subGraphs.entries())if(r.id===t)return e;return-1}indexNodes2(t,e){var r=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,2e3<this.secCount)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){var a=this.getPosForId(r[n]);if(0<=a){if((a=this.indexNodes2(t,a)).result)return{result:!0,count:i+a.count};i+=a.count}n+=1}return{result:!1,count:i}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,0<this.subGraphs.length&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&!(this.firstGraphFlag=!1)}destructStartLink(t){let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1)}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}}countChar(e,r){let n=r.length,i=0;for(let t=0;t<n;++t)r[t]===e&&++i;return i}destructEndLink(t){let e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1))}let i="normal",a=r.length-1;return r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible"),(t=this.countChar(".",r))&&(i="dotted",a=t),{type:n,stroke:i,length:a}}destructLink(t,e){if(t=this.destructEndLink(t),e){if((e=this.destructStartLink(e)).stroke!==t.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===e.type)e.type=t.type;else{if(e.type!==t.type)return{type:"INVALID",stroke:"INVALID"};e.type="double_"+e.type}return"double_arrow"===e.type&&(e.type="double_arrow_point"),e.length=t.length,e}return t}exists(t,e){for(var r of t)if(r.nodes.includes(e))return!0;return!1}makeUniq(r,n){let i=[];return r.nodes.forEach((t,e)=>{this.exists(n,t)||i.push(r.nodes[e])}),{nodes:i}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e}return{arrowTypeStart:e,arrowTypeEnd:r}}addNodeFromVertex(t,e,r,n,i,a){var r=r.get(t.id),n=n.get(t.id)??!1,s=this.findNode(e,t.id);s?(s.cssStyles=t.styles,s.cssCompiledStyles=this.getCompiledStyles(t.classes),s.cssClasses=t.classes.join(" ")):(s={id:t.id,label:t.text,labelStyle:"",parentId:r,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint},n?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t)}))}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}getData(){let a=O(),e=[],s=[],r=this.getSubGraphs(),n=new Map,i=new Map;for(let t=r.length-1;0<=t;t--){var o,l=r[t];0<l.nodes.length&&i.set(l.id,!0);for(o of l.nodes)n.set(o,l.id)}for(let t=r.length-1;0<=t;t--){var c=r[t];e.push({id:c.id,label:c.title,labelStyle:"",parentId:n.get(c.id),padding:8,cssCompiledStyles:this.getCompiledStyles(c.classes),cssClasses:c.classes.join(" "),shape:"rect",dir:c.dir,isGroup:!0,look:a.look})}this.getVertices().forEach(t=>{this.addNodeFromVertex(t,e,n,i,a,a.look||"classic")});let h=this.getEdges();return h.forEach((t,e)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=this.destructEdgeType(t.type),i=[...h.defaultStyle??[]],e=(t.style&&i.push(...t.style),{id:nS(t.start,t.end,{counter:e,prefix:"L"},t.id),isUserDefinedId:t.isUserDefinedId,start:t.start,end:t.end,type:t.type??"normal",label:t.text,labelpos:"c",thickness:t.stroke,minlen:t.length,classes:"invisible"===t?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":r,arrowTypeEnd:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":n,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:i,style:i,pattern:t.stroke,look:a.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||a.flowchart?.curve});s.push(e)}),{nodes:e,edges:s,other:{},config:a}}defaultConfig(){return Ch.flowchart}}}),iO=b(()=>{i6(),WD=me((t,e)=>{let r;return"sandbox"===e&&(r=H("#i"+t)),H("sandbox"===e?r.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)},"getDiagramElement")}),aO=b(()=>{YD=me(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins")}),sO=b(()=>{Tu(),Oc(),t(),aO(),i6(),zI(),JL(),IN(),_M(),zR(),MN(),HD=me(async(n,i)=>{D.info("Creating subgraph rect for ",i.id,i);let t=O(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Q(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=fc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await QL(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();fc(t.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;D.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let t=FI.svg(u),e=AN(i,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=t.path($R(y,v,n,m,0),e);(x=u.insert(()=>(D.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=YD(t).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(t){return TN(i,t)},{cluster:u,labelBBox:f}},"rect"),VD=me((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.id)).insert("rect",":first-child"),n=0*e.padding,i=n/2,i=(r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none"),r.node().getBBox());return e.width=i.width,e.height=i.height,e.intersect=function(t){return TN(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),XD=me(async(i,a)=>{let t=O(),{themeVariables:e,handDrawnSeed:s}=t,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=e,u=i.insert("g").attr("class",a.cssClasses).attr("id",a.id).attr("data-id",a.id).attr("data-look",a.look),r=u.insert("g",":first-child"),n=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=n.node().appendChild(await SM(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();fc(t.flowchart.htmlLabels)&&(i=p.children[0],f=H(p),g=i.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(i=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+i,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+i),i=a.height+i-g.height-6,v=a.x-m/2,x=a.y-y/2;a.width=m;let b=a.y-a.height/2-f+g.height+2,w;if("handDrawn"===a.look){let t=a.cssClasses.includes("statediagram-cluster-alt"),e=FI.svg(u),r=a.rx||a.ry?e.path($R(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):e.rectangle(v,x,m,y,{seed:s}),n=(w=u.insert(()=>r,":first-child"),e.rectangle(v,b,m,i,{fill:t?o:l,fillStyle:t?"hachure":"solid",stroke:h,seed:s}));w=u.insert(()=>r,":first-child"),d=u.insert(()=>n)}else(w=r.insert("rect",":first-child")).attr("class","outer").attr("x",v).attr("y",x).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",b).attr("width",m).attr("height",i);return n.attr("transform",`translate(${a.x-g.width/2}, ${1+x-(fc(t.flowchart.htmlLabels)?0:3)})`),f=w.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(t){return TN(a,t)},{cluster:u,labelBBox:g}},"roundedWithTitle"),KD=me(async(n,i)=>{D.info("Creating subgraph rect for ",i.id,i);let t=O(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Q(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=fc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await QL(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0,width:i.width}),f=g.getBBox();fc(t.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;D.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let t=FI.svg(u),e=AN(i,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=t.path($R(y,v,n,m,i.rx),e);(x=u.insert(()=>(D.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=YD(t).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(t){return TN(i,t)},{cluster:u,labelBBox:f}},"kanbanSection"),ZD=me((e,r)=>{var{themeVariables:n,handDrawnSeed:i}=O(),n=n.nodeBorder,t=(e=e.insert("g").attr("class",r.cssClasses).attr("id",r.id).attr("data-look",r.look)).insert("g",":first-child"),a=0*r.padding,s=r.width+a,a=(r.diff=-r.padding,r.height+a),o=r.x-s/2,l=r.y-a/2;r.width=s;let c;if("handDrawn"===r.look){let t=FI.svg(e).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:i});c=e.insert(()=>t,":first-child")}else(c=t.insert("rect",":first-child")).attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return n=c.node().getBBox(),r.height=n.height,r.offsetX=0,r.offsetY=0,r.intersect=function(t){return TN(r,t)},{cluster:e,labelBBox:{}}},"divider"),QD={rect:HD,squareRect:HD,roundedWithTitle:XD,noteGroup:VD,divider:ZD,kanbanSection:KD},JD=new Map,tO=me(async(t,e)=>{var r=e.shape||"rect",r=await QD[r](t,e);return JD.set(e.id,r),r},"insertCluster"),eO=me(()=>{JD=new Map},"clear")});function oO(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=cO(t),e=cO(e);var[t,r]=[t.x,t.y],[e,n]=[e.x,e.y],e=e-t,t=n-r;return{angle:Math.atan(t/e),deltaX:e,deltaY:t}}var lO,cO,hO,uO,dO,pO,gO=b(()=>{lO={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},me(oO,"calculateDeltaAndAngle"),cO=me(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),hO=me(c=>({x:me(function(t,e,r){let n=0,i=cO(r[0]).x<cO(r[r.length-1]).x?"left":"right";0===e&&Object.hasOwn(lO,c.arrowTypeStart)?({angle:a,deltaX:s}=oO(r[0],r[1]),n=lO[c.arrowTypeStart]*Math.cos(a)*(0<=s?1:-1)):e===r.length-1&&Object.hasOwn(lO,c.arrowTypeEnd)&&({angle:a,deltaX:s}=oO(r[r.length-1],r[r.length-2]),n=lO[c.arrowTypeEnd]*Math.cos(a)*(0<=s?1:-1));var e=Math.abs(cO(t).x-cO(r[r.length-1]).x),a=Math.abs(cO(t).y-cO(r[r.length-1]).y),s=Math.abs(cO(t).x-cO(r[0]).x),r=Math.abs(cO(t).y-cO(r[0]).y),o=lO[c.arrowTypeStart],l=lO[c.arrowTypeEnd];return e<l&&0<e&&a<l&&(a=l+1-e,a*="right"==i?-1:1,n-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="right"==i?-1:1,n+=l),cO(t).x+n},"x"),y:me(function(t,e,r){let n=0,i=cO(r[0]).y<cO(r[r.length-1]).y?"down":"up";0===e&&Object.hasOwn(lO,c.arrowTypeStart)?({angle:a,deltaY:s}=oO(r[0],r[1]),n=lO[c.arrowTypeStart]*Math.abs(Math.sin(a))*(0<=s?1:-1)):e===r.length-1&&Object.hasOwn(lO,c.arrowTypeEnd)&&({angle:a,deltaY:s}=oO(r[r.length-1],r[r.length-2]),n=lO[c.arrowTypeEnd]*Math.abs(Math.sin(a))*(0<=s?1:-1));var e=Math.abs(cO(t).y-cO(r[r.length-1]).y),a=Math.abs(cO(t).x-cO(r[r.length-1]).x),s=Math.abs(cO(t).y-cO(r[0]).y),r=Math.abs(cO(t).x-cO(r[0]).x),o=lO[c.arrowTypeStart],l=lO[c.arrowTypeEnd];return e<l&&0<e&&a<l&&(a=l+1-e,a*="up"==i?-1:1,n-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="up"==i?-1:1,n+=l),cO(t).y+n},"y")}),"getLineFunctionsWithOffset")}),fO=b(()=>{t(),uO=me((t,e,r,n,i,a)=>{e.arrowTypeStart&&pO(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&pO(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),dO={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},pO=me((t,e,r,n,i,a,s)=>{let o=dO[r],l,c;o?(i=i+`_${a}-`+o.type+("start"===e?"Start":"End"),s&&""!==s.trim()?(a=i+"_"+s.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(l=document.getElementById(i))&&((c=l.cloneNode(!0)).id=a,c.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),o.fill&&t.setAttribute("fill",s)}),l.parentNode?.appendChild(c)),t.attr("marker-"+e,`url(${n}#${a})`)):t.attr("marker-"+e,`url(${n}#${i})`)):D.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function mO(t,e){O().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function yO(e){var r=[],n=[];for(let t=1;t<e.length-1;t++){var i=e[t-1],a=e[t],s=e[t+1];(i.x===a.x&&a.y===s.y&&5<Math.abs(a.x-s.x)&&5<Math.abs(a.y-i.y)||i.y===a.y&&a.x===s.x&&5<Math.abs(a.x-i.x)&&5<Math.abs(a.y-s.y))&&(r.push(a),n.push(t))}return{cornerPoints:r,cornerPointPositions:n}}var vO,xO,bO,wO,kO,TO,EO,CO,SO,_O,AO,LO,NO,IO,RO,MO,DO,OO,PO,BO,$O,FO,zO,GO,UO,qO,jO,WO,YO,HO,VO=b(()=>{Tu(),Oc(),t(),JL(),iS(),gO(),aO(),i6(),zI(),_M(),fO(),MN(),vO=new Map,xO=new Map,bO=me(()=>{vO.clear(),xO.clear()},"clear"),wO=me(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),kO=me(async(t,e)=>{var r,n=fc(O().flowchart.htmlLabels),i=await QL(t,e.label,{style:wO(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1}),a=(D.info("abc82",e,e.labelType),t.insert("g").attr("class","edgeLabel")),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();n&&(n=i.children[0],r=H(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),vO.set(e.id,a),e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(n=await SM(e.startLabelLeft,wO(e.labelStyle)),s=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a=n.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),xO.get(e.id)||xO.set(e.id,{}),xO.get(e.id).startLeft=r,mO(l,e.startLabelLeft)),e.startLabelRight&&(n=await SM(e.startLabelRight,wO(e.labelStyle)),a=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a.node().appendChild(n),r=n.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),xO.get(e.id)||xO.set(e.id,{}),xO.get(e.id).startRight=s,mO(l,e.startLabelRight)),e.endLabelLeft&&(n=await SM(e.endLabelLeft,wO(e.labelStyle)),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(n),s=n.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(n),xO.get(e.id)||xO.set(e.id,{}),xO.get(e.id).endLeft=a,mO(l,e.endLabelLeft)),e.endLabelRight&&(r=await SM(e.endLabelRight,wO(e.labelStyle)),n=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=n.node().appendChild(r),a=r.getBBox(),n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),xO.get(e.id)||xO.set(e.id,{}),xO.get(e.id).endRight=s,mO(l,e.endLabelRight)),i},"insertEdgeLabel"),me(mO,"setTerminalWidth"),TO=me((n,i)=>{D.debug("Moving label abc88 ",n.id,n.label,vO.get(n.id),i);var a,s=i.updatedPath||i.originalPath,o=O(),o=YD(o).subGraphTitleTotalMargin;if(n.label){let t=vO.get(n.id),e=n.x,r=n.y;s&&(a=tS.calcLabelPosition(s),D.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(n.startLabelLeft){let t=xO.get(n.id).startLeft,e=n.x,r=n.y;s&&(i=tS.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=xO.get(n.id).startRight,e=n.x,r=n.y;s&&(a=tS.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=xO.get(n.id).endLeft,e=n.x,r=n.y;s&&(o=tS.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=xO.get(n.id).endRight,e=n.x,r=n.y;s&&(i=tS.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),EO=me((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),CO=me((t,n,i)=>{D.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(n)} + insidePoint : ${JSON.stringify(i)} + node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),s=t.width/2,o=i.x<n.x?s-r:s+r,l=t.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x),u;if(Math.abs(e-n.y)*s>Math.abs(a-n.x)*l)return t=i.y<n.y?n.y-l-e:e-l-n.y,o=h*t/c,u={x:i.x<n.x?i.x+o:i.x-h+o,y:i.y<n.y?i.y+c-t:i.y-c+t},0===o&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),D.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${h}, r `+o,u),u;{let t=c*(o=i.x<n.x?n.x-s-a:a-s-n.x)/h,e=i.x<n.x?i.x+h-o:i.x-h+o,r=i.y<n.y?i.y+t:i.y-t;return D.debug(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r `+o,{_x:e,_y:r}),0===o&&(e=n.x,r=n.y),0===h&&(e=n.x),0===c&&(r=n.y),{x:e,y:r}}},"intersection"),SO=me((t,n)=>{D.warn("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(D.info("abc88 checking point",t,n),EO(n,t)||s)D.warn("abc88 outside",t,a),a=t,s||i.push(t);else{let e=CO(n,a,t),r=(D.debug("abc88 inside",t,a,e),D.debug("abc88 intersection",e,n),!1);i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)?D.warn("abc88 no intersect",e,i):i.push(e),s=!0}}),D.debug("returning points",i),i},"cutPathAtIntersect"),me(yO,"extractCornerPoints"),_O=me(function(t,e,r){var n=e.x-t.x,t=e.y-t.y,r=r/Math.sqrt(n*n+t*t);return{x:e.x-r*n,y:e.y-r*t}},"findAdjacentPoint"),AO=me(function(n){var t=yO(n).cornerPointPositions,i=[];for(let r=0;r<n.length;r++)if(t.includes(r)){var a=n[r-1],s=n[r+1],o=n[r],l=_O(a,o,5),c=_O(s,o,5),h=c.x-l.x,u=c.y-l.y;i.push(l);let t=2*Math.sqrt(2),e={x:o.x,y:o.y};10<Math.abs(s.x-a.x)&&10<=Math.abs(s.y-a.y)?(D.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),e=o.x===l.x?{x:h<0?l.x-5+t:l.x+5-t,y:u<0?l.y-t:l.y+t}:{x:h<0?l.x-t:l.x+t,y:u<0?l.y-5+t:l.y+5-t}):D.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),i.push(e,c)}else i.push(n[r]);return i},"fixCorners"),LO=me(function(n,i,t,e,r,a,s){let o=O().handDrawnSeed,l=i.points,c=!1,h=r,u=a;var d,p=[];for(d in i.cssCompiledStyles)_N(d)||p.push(i.cssCompiledStyles[d]);u.intersect&&h.intersect&&((l=l.slice(1,i.points.length-1)).unshift(h.intersect(l[0])),D.debug("Last point APA12",i.start,"--\x3e",i.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),i.toCluster&&(D.info("to cluster abc88",t.get(i.toCluster)),l=SO(i.points,t.get(i.toCluster).node),c=!0),i.fromCluster&&(D.debug("from cluster abc88",t.get(i.fromCluster),JSON.stringify(l,null,2)),l=SO(l.reverse(),t.get(i.fromCluster).node).reverse(),c=!0),r=l.filter(t=>!Number.isNaN(t.y)),r=AO(r);let g=v3;switch(g=Z5,i.curve){case"linear":g=Z5;break;case"basis":g=v3;break;case"cardinal":g=I3;break;case"bumpX":g=h3;break;case"bumpY":g=u3;break;case"catmullRom":g=G3;break;case"monotoneX":g=aw;break;case"monotoneY":g=sw;break;case"natural":g=hw;break;case"step":g=pw;break;case"stepAfter":g=fw;break;case"stepBefore":g=gw;break;default:g=v3}let{x:f,y:m}=hO(i),y=r3().x(f).y(m).curve(g),v;switch(i.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(i.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let x,b=y(r),w=Array.isArray(i.style)?i.style:i.style?[i.style]:[],k=w.find(t=>t?.startsWith("stroke:"));if("handDrawn"===i.look)a=FI.svg(n),Object.assign([],r),t=a.path(b,{roughness:.3,seed:o}),v+=" transition",r=(x=H(t).select("path").attr("id",i.id).attr("class"," "+v+(i.classes?" "+i.classes:"")).attr("style",w?w.reduce((t,e)=>t+";"+e,""):"")).attr("d"),x.attr("d",r),n.node().appendChild(x.node());else{let t=p.join(";"),e=w?w.reduce((t,e)=>t+e+";",""):"",r="";i.animate&&(r=" edge-animation-fast"),i.animation&&(r=" edge-animation-"+i.animation),a=t?t+";"+e+";":e,x=n.append("path").attr("d",b).attr("id",i.id).attr("class"," "+v+(i.classes?" "+i.classes:"")+(r??"")).attr("style",a),k=a.match(/stroke:([^;]+)/)?.[1]}let T="";return(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&(T=gc(!0)),D.info("arrowTypeStart",i.arrowTypeStart),D.info("arrowTypeEnd",i.arrowTypeEnd),uO(x,i,T,s,e,k),t=Math.floor(l.length/2),r=l[t],n={},(c=!tS.isLabelCoordinateInPath(r,x.attr("d"))||c)&&(n.updatedPath=l),n.originalPath=i.points,n},"insertEdge")}),XO=b(()=>{t(),NO=me((e,t,r,n)=>{t.forEach(t=>{YO[t](e,r,n)})},"insertMarkers"),IO=me((t,e,r)=>{D.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),RO=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),MO=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),DO=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),OO=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),PO=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),BO=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),$O=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),FO=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),zO=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),GO=me((t,e,r)=>{var n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),UO=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),qO=me((t,e,r)=>{var n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),jO=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`)},"requirement_arrow"),WO=me((t,e,r)=>{(t=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),t.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),t.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),YO={extension:IO,composition:RO,aggregation:MO,dependency:DO,lollipop:OO,point:PO,circle:BO,cross:$O,barb:FO,only_one:zO,zero_or_one:GO,one_or_more:UO,zero_or_more:qO,requirement_arrow:jO,requirement_contains:WO},HO=NO});async function KO(e,r,n){let i,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?qD[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===n.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),a=await s(i,r,n)}else a=await s(e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),ZO.set(r.id,i),r.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var ZO,QO,JO,tP,eP,rP=b(()=>{t(),rO(),ZO=new Map,me(KO,"insertNode"),QO=me((t,e)=>{ZO.set(e.id,t)},"setNodeElem"),JO=me(()=>{ZO.clear()},"clear"),tP=me(t=>{var e=ZO.get(t.id),r=(D.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")}),nP=b(()=>{rn(),Oc(),t(),sO(),VO(),XO(),rP(),i(),iS(),eP={common:L,getConfig:ar,insertCluster:tO,insertEdge:LO,insertEdgeLabel:kO,insertMarkers:HO,insertNode:KO,interpolateToCurve:fC,labelHelper:nN,log:D,positionEdgeLabel:TO}});function iP(t){return"symbol"==typeof t||V7(t)&&"[object Symbol]"==S6(t)}var aP,sP=b(()=>{_6(),X7(),me(iP,"isSymbol"),aP=iP});function oP(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var lP,cP=b(()=>{me(oP,"arrayMap"),lP=oP});function hP(t){var e;return"string"==typeof t?t:n8(t)?lP(t,hP)+"":aP(t)?pP?pP.call(t):"":"0"==(e=t+"")&&1/t==-uP?"-0":e}var uP,dP,pP,gP,fP=b(()=>{u6(),cP(),s8(),sP(),uP=1/0,dP=Jw?Jw.prototype:void 0,pP=dP?dP.toString:void 0,me(hP,"baseToString"),gP=hP});function mP(t){for(var e=t.length;e--&&yP.test(t.charAt(e)););return e}var yP,vP,xP=b(()=>{yP=/\s/,me(mP,"trimmedEndIndex"),vP=mP});function bP(t){return t&&t.slice(0,vP(t)+1).replace(wP,"")}var wP,kP,TP=b(()=>{xP(),wP=/^\s+/,me(bP,"baseTrim"),kP=bP});function EP(t){if("number"==typeof t)return t;if(aP(t))return CP;if(L6(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=L6(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=kP(t);var e=_P.test(t);return e||AP.test(t)?LP(t.slice(2),e?2:8):SP.test(t)?CP:+t}var CP,SP,_P,AP,LP,NP,IP=b(()=>{TP(),N6(),sP(),CP=NaN,SP=/^[-+]0x[0-9a-f]+$/i,_P=/^0b[01]+$/i,AP=/^0o[0-7]+$/i,LP=parseInt,me(EP,"toNumber"),NP=EP});function RP(t){return t?(t=NP(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}var MP,DP=b(()=>{IP(),me(RP,"toFinite"),MP=RP});function OP(t){var e=(t=MP(t))%1;return t==t?e?t-e:t:0}var PP,BP,$P,FP=b(()=>{DP(),me(OP,"toInteger"),PP=OP}),zP=b(()=>{ok(),h6(),BP=ik(Zw,"WeakMap"),$P=BP});function GP(){}var UP,qP=b(()=>{me(GP,"noop"),UP=GP});function jP(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}var WP,YP=b(()=>{me(jP,"arrayEach"),WP=jP});function HP(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}var VP,XP=b(()=>{me(HP,"baseFindIndex"),VP=HP});function KP(t){return t!=t}var ZP,QP=b(()=>{me(KP,"baseIsNaN"),ZP=KP});function JP(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var tB,eB=b(()=>{me(JP,"strictIndexOf"),tB=JP});function rB(t,e,r){return e==e?tB(t,e,r):VP(t,ZP,r)}var nB,iB=b(()=>{XP(),QP(),eB(),me(rB,"baseIndexOf"),nB=rB});function aB(t,e){return!(null==t||!t.length)&&-1<nB(t,e,0)}var sB,oB,lB,cB=b(()=>{iB(),me(aB,"arrayIncludes"),sB=aB}),hB=b(()=>{$7(),oB=O7(Object.keys,Object),lB=oB});function uB(t){if(!U7(t))return lB(t);var e,r=[];for(e in Object(t))pB.call(t,e)&&"constructor"!=e&&r.push(e);return r}var dB,pB,gB,fB=b(()=>{q7(),hB(),dB=Object.prototype,pB=dB.hasOwnProperty,me(uB,"baseKeys"),gB=uB});function mB(t){return(u8(t)?pE:gB)(t)}var yB,vB,xB,bB,wB=b(()=>{gE(),fB(),d8(),me(mB,"keys"),yB=mB}),kB=b(()=>{J8(),rE(),pC(),d8(),q7(),wB(),xB=Object.prototype,vB=xB.hasOwnProperty,xB=hC(function(t,e){if(U7(e)||u8(e))eE(e,yB(e),t);else for(var r in e)vB.call(e,r)&&Q8(t,r,e[r])}),bB=xB});function TB(t,e){var r;return!n8(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!aP(t))||CB.test(t)||!EB.test(t)||null!=e&&t in Object(e))}var EB,CB,SB,_B=b(()=>{s8(),sP(),EB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CB=/^\w*$/,me(TB,"isKey"),SB=TB});function AB(t){var e=(t=RT(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}var LB,NB,IB,RB,MB,DB=b(()=>{MT(),me(AB,"memoizeCapped"),LB=AB}),OB=b(()=>{DB(),NB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,IB=/\\(\\)?/g,RB=LB(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(NB,function(t,e,r,n){i.push(r?n.replace(IB,"$1"):e||t)}),i}),MB=RB});function PB(t){return null==t?"":gP(t)}var BB,$B=b(()=>{fP(),me(PB,"toString"),BB=PB});function FB(t,e){return n8(t)?t:SB(t,e)?[t]:MB(BB(t))}var zB,GB=b(()=>{s8(),_B(),OB(),$B(),me(FB,"castPath"),zB=FB});function UB(t){var e;return"string"==typeof t||aP(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}var qB,jB=b(()=>{sP(),me(UB,"toKey"),qB=UB});function WB(t,e){for(var r=0,n=(e=zB(e,t)).length;null!=t&&r<n;)t=t[qB(e[r++])];return r&&r==n?t:void 0}var YB,HB=b(()=>{GB(),jB(),me(WB,"baseGet"),YB=WB});function VB(t,e,r){return void 0===(t=null==t?void 0:YB(t,e))?r:t}var XB,KB=b(()=>{HB(),me(VB,"get"),XB=VB});function ZB(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var QB,JB=b(()=>{me(ZB,"arrayPush"),QB=ZB});function t$(t){return n8(t)||e8(t)||!!(e$&&t&&t[e$])}var e$,r$,n$=b(()=>{u6(),a8(),s8(),e$=Jw?Jw.isConcatSpreadable:void 0,me(t$,"isFlattenable"),r$=t$});function i$(t,e,r,n,i){var a=-1,s=t.length;for(r=r||r$,i=i||[];++a<s;){var o=t[a];0<e&&r(o)?1<e?i$(o,e-1,r,n,i):QB(i,o):n||(i[i.length]=o)}return i}var a$,s$=b(()=>{JB(),n$(),me(i$,"baseFlatten"),a$=i$});function o$(t){return null!=t&&t.length?a$(t,1):[]}var l$,c$=b(()=>{s$(),me(o$,"flatten"),l$=o$});function h$(t){return tC(qE(t,void 0,l$),t+"")}var u$,d$=b(()=>{c$(),jE(),rC(),me(h$,"flatRest"),u$=h$});function p$(t,e,r){var n=-1,i=t.length;(r=i<r?i:r)<0&&(r+=i),i=r<(e=e<0?i<-e?0:i+e:e)?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}var g$,f$=b(()=>{me(p$,"baseSlice"),g$=p$});function m$(t){return y$.test(t)}var y$,v$,x$=b(()=>{y$=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),me(m$,"hasUnicode"),v$=m$});function b$(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}var w$,k$=b(()=>{me(b$,"arrayReduce"),w$=b$});function T$(t,e){return t&&eE(e,yB(e),t)}var E$,C$=b(()=>{rE(),wB(),me(T$,"baseAssign"),E$=T$});function S$(t,e){return t&&eE(e,EE(e),t)}var _$,A$=b(()=>{rE(),CE(),me(S$,"baseAssignIn"),_$=S$});function L$(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[i++]=s)}return a}var N$,I$=b(()=>{me(L$,"arrayFilter"),N$=L$});function R$(){return[]}var M$,D$,O$,P$,B$,$$=b(()=>{me(R$,"stubArray"),M$=R$}),F$=b(()=>{I$(),$$(),D$=Object.prototype,O$=D$.propertyIsEnumerable,B$=(P$=Object.getOwnPropertySymbols)?function(e){return null==e?[]:(e=Object(e),N$(P$(e),function(t){return O$.call(e,t)}))}:M$});function z$(t,e){return eE(t,B$(t),e)}var G$,U$,q$,j$=b(()=>{rE(),F$(),me(z$,"copySymbols"),G$=z$}),W$=b(()=>{JB(),F7(),F$(),$$(),U$=Object.getOwnPropertySymbols,q$=U$?function(t){for(var e=[];t;)QB(e,B$(t)),t=B7(t);return e}:M$});function Y$(t,e){return eE(t,q$(t),e)}var H$,V$=b(()=>{rE(),W$(),me(Y$,"copySymbolsIn"),H$=Y$});function X$(t,e,r){return e=e(t),n8(t)?e:QB(e,r(t))}var K$,Z$=b(()=>{JB(),s8(),me(X$,"baseGetAllKeys"),K$=X$});function Q$(t){return K$(t,yB,B$)}var J$,tF=b(()=>{Z$(),F$(),wB(),me(Q$,"getAllKeys"),J$=Q$});function eF(t){return K$(t,EE,q$)}var rF,nF,iF,aF,sF,oF,lF,cF,hF,uF,dF,pF,gF,fF,mF,yF,vF,xF,bF,wF=b(()=>{Z$(),W$(),CE(),me(eF,"getAllKeysIn"),rF=eF}),kF=b(()=>{ok(),h6(),nF=ik(Zw,"DataView"),iF=nF}),TF=b(()=>{ok(),h6(),aF=ik(Zw,"Promise"),sF=aF}),EF=b(()=>{ok(),h6(),oF=ik(Zw,"Set"),lF=oF}),CF=b(()=>{kF(),aT(),TF(),EF(),zP(),_6(),W6(),cF="[object Map]",hF="[object Promise]",uF="[object Set]",dF="[object WeakMap]",pF="[object DataView]",gF=j6(iF),fF=j6(nT),mF=j6(sF),yF=j6(lF),vF=j6($P),xF=S6,(iF&&xF(new iF(new ArrayBuffer(1)))!=pF||nT&&xF(new nT)!=cF||sF&&xF(sF.resolve())!=hF||lF&&xF(new lF)!=uF||$P&&xF(new $P)!=dF)&&(xF=me(function(t){var e=S6(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?j6(t):"")switch(t){case gF:return pF;case fF:return cF;case mF:return hF;case yF:return uF;case vF:return dF}return e},"getTag")),bF=xF});function SF(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&AF.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var _F,AF,LF,NF=b(()=>{_F=Object.prototype,AF=_F.hasOwnProperty,me(SF,"initCloneArray"),LF=SF});function IF(t,e){return e=e?T7(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)}var RF,MF=b(()=>{E7(),me(IF,"cloneDataView"),RF=IF});function DF(t){var e=new t.constructor(t.source,OF.exec(t));return e.lastIndex=t.lastIndex,e}var OF,PF,BF=b(()=>{OF=/\w*$/,me(DF,"cloneRegExp"),PF=DF});function $F(t){return zF?Object(zF.call(t)):{}}var FF,zF,GF,UF=b(()=>{u6(),FF=Jw?Jw.prototype:void 0,zF=FF?FF.valueOf:void 0,me($F,"cloneSymbol"),GF=$F});function qF(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return T7(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return RF(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return S7(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return PF(t);case"[object Set]":return new n;case"[object Symbol]":return GF(t)}}var jF,WF=b(()=>{E7(),MF(),BF(),UF(),_7(),me(qF,"initCloneByTag"),jF=qF});function YF(t){return V7(t)&&"[object Map]"==bF(t)}var HF,VF,XF,KF=b(()=>{CF(),X7(),me(YF,"baseIsMap"),HF=YF}),ZF=b(()=>{KF(),q8(),j8(),VF=(VF=z8&&z8.isMap)?P8(VF):HF,XF=VF});function QF(t){return V7(t)&&"[object Set]"==bF(t)}var JF,tz,ez,rz=b(()=>{CF(),X7(),me(QF,"baseIsSet"),JF=QF}),nz=b(()=>{rz(),q8(),j8(),tz=(tz=z8&&z8.isSet)?P8(tz):JF,ez=tz});function iz(r,n,i,t,e,a){var s,o=n&az,l=n&sz,c=n&oz;if(void 0===(s=i?e?i(r,t,e,a):i(r):s)){if(!L6(r))return r;if(t=n8(r)){if(s=LF(r),!o)return L7(r,s)}else{var h=bF(r),u=h==cz||h==hz;if(b8(r))return y7(r,o);if(h==uz||h==lz||u&&!e){if(s=l||u?{}:W7(r),!o)return l?H$(r,_$(s,r)):G$(r,E$(s,r))}else{if(!dz[h])return e?r:{};s=jF(r,h,o)}}if(u=(a=a||new KT).get(r))return u;a.set(r,s),ez(r)?r.forEach(function(t){s.add(iz(t,n,i,t,r,a))}):XF(r)&&r.forEach(function(t,e){s.set(e,iz(t,n,i,e,r,a))});var d=t?void 0:(c?l?rF:J$:l?EE:yB)(r);WP(d||r,function(t,e){d&&(t=r[e=t]),Q8(s,e,iz(t,n,i,e,r,a))})}return s}var az,sz,oz,lz,cz,hz,uz,dz,pz,gz=b(()=>{JT(),YP(),J8(),C$(),A$(),b7(),R7(),j$(),V$(),tF(),wF(),CF(),NF(),WF(),Y7(),s8(),k8(),ZF(),N6(),nz(),wB(),CE(),az=1,sz=2,oz=4,cz="[object Function]",hz="[object GeneratorFunction]",uz="[object Object]",(dz={})[lz="[object Arguments]"]=dz["[object Array]"]=dz["[object ArrayBuffer]"]=dz["[object DataView]"]=dz["[object Boolean]"]=dz["[object Date]"]=dz["[object Float32Array]"]=dz["[object Float64Array]"]=dz["[object Int8Array]"]=dz["[object Int16Array]"]=dz["[object Int32Array]"]=dz["[object Map]"]=dz["[object Number]"]=dz[uz]=dz["[object RegExp]"]=dz["[object Set]"]=dz["[object String]"]=dz["[object Symbol]"]=dz["[object Uint8Array]"]=dz["[object Uint8ClampedArray]"]=dz["[object Uint16Array]"]=dz["[object Uint32Array]"]=!0,dz["[object Error]"]=dz[cz]=dz["[object WeakMap]"]=!1,me(iz,"baseClone"),pz=iz});function fz(t){return pz(t,4)}var mz,yz=b(()=>{gz(),me(fz,"clone"),mz=fz});function vz(t){return pz(t,5)}var xz,bz=b(()=>{gz(),me(vz,"cloneDeep"),xz=vz});function wz(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a)}return i}var kz,Tz=b(()=>{me(wz,"compact"),kz=wz});function Ez(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}var Cz,Sz=b(()=>{me(Ez,"setCacheAdd"),Cz=Ez});function _z(t){return this.__data__.has(t)}var Az,Lz=b(()=>{me(_z,"setCacheHas"),Az=_z});function Nz(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new AT;++e<r;)this.add(t[e])}var Iz,Rz=b(()=>{LT(),Sz(),Lz(),me(Nz,"SetCache"),Nz.prototype.add=Nz.prototype.push=Cz,Nz.prototype.has=Az,Iz=Nz});function Mz(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Dz,Oz=b(()=>{me(Mz,"arraySome"),Dz=Mz});function Pz(t,e){return t.has(e)}var Bz,$z=b(()=>{me(Pz,"cacheHas"),Bz=Pz});function Fz(t,e,r,n,i,a){var s=1&r,o=t.length;if(o!=(l=e.length)&&!(s&&o<l))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var h=-1,u=!0,d=2&r?new Iz:void 0;for(a.set(t,e),a.set(e,t);++h<o;){var p,g=t[h],f=e[h];if(void 0!==(p=n?s?n(f,g,h,e,t,a):n(g,f,h,t,e,a):p)){if(p)continue;u=!1;break}if(d){if(!Dz(e,function(t,e){if(!Bz(d,e)&&(g===t||i(g,t,r,n,a)))return d.push(e)})){u=!1;break}}else if(g!==f&&!i(g,f,r,n,a)){u=!1;break}}return a.delete(t),a.delete(e),u}var zz,Gz=b(()=>{Rz(),Oz(),$z(),me(Fz,"equalArrays"),zz=Fz});function Uz(t){var r=-1,n=Array(t.size);return t.forEach(function(t,e){n[++r]=[e,t]}),n}var qz,jz=b(()=>{me(Uz,"mapToArray"),qz=Uz});function Wz(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var Yz,Hz=b(()=>{me(Wz,"setToArray"),Yz=Wz});function Vz(t,e,r,n,i,a,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new x7(t),new x7(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ok(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=qz;case"[object Set]":var l,o=o||Yz;return!!(t.size==e.size||1&n)&&((l=s.get(t))?l==e:(n|=2,s.set(t,e),l=zz(o(t),o(e),n,i,a,s),s.delete(t),l));case"[object Symbol]":if(Kz)return Kz.call(t)==Kz.call(e)}return!1}var Xz,Kz,Zz,Qz=b(()=>{u6(),w7(),Pk(),Gz(),jz(),Hz(),Xz=Jw?Jw.prototype:void 0,Kz=Xz?Xz.valueOf:void 0,me(Vz,"equalByTag"),Zz=Vz});function Jz(t,e,r,n,i,a){var s=1&r,o=J$(t),l=o.length;if(l!=J$(e).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in e:eG.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++c<l;){var f,m=t[h=o[c]],y=e[h];if(!(void 0===(f=n?s?n(y,m,h,e,t,a):n(m,y,h,t,e,a):f)?m===y||i(m,y,r,n,a):f)){p=!1;break}g=g||"constructor"==h}return p&&!g&&(u=t.constructor)!=(d=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof u&&u instanceof u&&"function"==typeof d&&d instanceof d)&&(p=!1),a.delete(t),a.delete(e),p}var tG,eG,rG,nG=b(()=>{tF(),tG=Object.prototype,eG=tG.hasOwnProperty,me(Jz,"equalObjects"),rG=Jz});function iG(t,e,r,n,i,a){var s=n8(t),o=n8(e),l=s?sG:bF(t),o=o?sG:bF(e),c=(l=l==aG?oG:l)==oG,h=(o=o==aG?oG:o)==oG;if((o=l==o)&&b8(t)){if(!b8(e))return!1;c=!(s=!0)}return o&&!c?(a=a||new KT,s||U8(t)?zz(t,e,r,n,i,a):Zz(t,e,l,r,n,i,a)):1&r||(s=c&&cG.call(t,"__wrapped__"),l=h&&cG.call(e,"__wrapped__"),!s&&!l)?o&&(a=a||new KT,rG(t,e,r,n,i,a)):i(s?t.value():t,l?e.value():e,r,n,a=a||new KT)}var aG,sG,oG,lG,cG,hG,uG=b(()=>{JT(),Gz(),Qz(),nG(),CF(),s8(),k8(),W8(),aG="[object Arguments]",sG="[object Array]",oG="[object Object]",lG=Object.prototype,cG=lG.hasOwnProperty,me(iG,"baseIsEqualDeep"),hG=iG});function dG(t,e,r,n,i){return t===e||(null==t||null==e||!V7(t)&&!V7(e)?t!=t&&e!=e:hG(t,e,r,n,dG,i))}var pG,gG=b(()=>{uG(),X7(),me(dG,"baseIsEqual"),pG=dG});function fG(t,e,r,n){var i=r.length,a=i,s=!n;if(null==t)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<a;){var l=(o=r[i])[0],c=t[l],h=o[1];if(s&&o[2]){if(void 0===c&&!(l in t))return!1}else{var u,d=new KT;if(!(void 0===(u=n?n(c,h,l,t,e,d):u)?pG(h,c,3,n,d):u))return!1}}return!0}var mG,yG=b(()=>{JT(),gG(),me(fG,"baseIsMatch"),mG=fG});function vG(t){return t==t&&!L6(t)}var xG,bG=b(()=>{N6(),me(vG,"isStrictComparable"),xG=vG});function wG(t){for(var e=yB(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,xG(i)]}return e}var kG,TG=b(()=>{bG(),wB(),me(wG,"getMatchData"),kG=wG});function EG(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}}var CG,SG=b(()=>{me(EG,"matchesStrictComparable"),CG=EG});function _G(e){var r=kG(e);return 1==r.length&&r[0][2]?CG(r[0][0],r[0][1]):function(t){return t===e||mG(t,e,r)}}var AG,LG=b(()=>{yG(),TG(),SG(),me(_G,"baseMatches"),AG=_G});function NG(t,e){return null!=t&&e in Object(t)}var IG,RG=b(()=>{me(NG,"baseHasIn"),IG=NG});function MG(t,e,r){for(var n=-1,i=(e=zB(e,t)).length,a=!1;++n<i;){var s=qB(e[n]);if(!(a=null!=t&&r(t,s)))break;t=t[s]}return a||++n!=i?a:!!(i=null==t?0:t.length)&&l8(i)&&lE(s,i)&&(n8(t)||e8(t))}var DG,OG=b(()=>{GB(),a8(),s8(),cE(),c8(),jB(),me(MG,"hasPath"),DG=MG});function PG(t,e){return null!=t&&DG(t,e,IG)}var BG,$G=b(()=>{RG(),OG(),me(PG,"hasIn"),BG=PG});function FG(r,n){return SB(r)&&xG(n)?CG(qB(r),n):function(t){var e=XB(t,r);return void 0===e&&e===n?BG(t,r):pG(n,e,3)}}var zG,GG=b(()=>{gG(),KB(),$G(),_B(),bG(),SG(),jB(),me(FG,"baseMatchesProperty"),zG=FG});function UG(e){return function(t){return t?.[e]}}var qG,jG=b(()=>{me(UG,"baseProperty"),qG=UG});function WG(e){return function(t){return YB(t,e)}}var YG,HG=b(()=>{HB(),me(WG,"basePropertyDeep"),YG=WG});function VG(t){return SB(t)?qG(qB(t)):YG(t)}var XG,KG=b(()=>{jG(),HG(),_B(),jB(),me(VG,"property"),XG=VG});function ZG(t){return"function"==typeof t?t:null==t?PE:"object"==typeof t?n8(t)?zG(t[0],t[1]):AG(t):XG(t)}var QG,JG=b(()=>{LG(),GG(),BE(),s8(),KG(),me(ZG,"baseIteratee"),QG=ZG});function tU(t,e,r,n){for(var i=-1,a=null==t?0:t.length;++i<a;){var s=t[i];e(n,s,r(s),t)}return n}var eU,rU=b(()=>{me(tU,"arrayAggregator"),eU=tU});function nU(t,e){return t&&h7(t,e,yB)}var iU,aU=b(()=>{d7(),wB(),me(nU,"baseForOwn"),iU=nU});function sU(a,s){return function(t,e){if(null!=t){if(!u8(t))return a(t,e);for(var r=t.length,n=s?r:-1,i=Object(t);(s?n--:++n<r)&&!1!==e(i[n],n,i););}return t}}var oU,lU,cU,hU=b(()=>{d8(),me(sU,"createBaseEach"),oU=sU}),uU=b(()=>{aU(),hU(),lU=oU(iU),cU=lU});function dU(t,n,i,a){return cU(t,function(t,e,r){n(a,t,i(t),r)}),a}var pU,gU=b(()=>{uU(),me(dU,"baseAggregator"),pU=dU});function fU(i,a){return function(t,e){var r=n8(t)?eU:pU,n=a?a():{};return r(t,i,QG(e,2),n)}}var mU,yU,vU,xU,bU,wU,kU,TU=b(()=>{rU(),gU(),JG(),s8(),me(fU,"createAggregator"),mU=fU}),EU=b(()=>{h6(),yU=me(function(){return Zw.Date.now()},"now"),vU=yU}),CU=b(()=>{aC(),Pk(),lC(),CE(),xU=Object.prototype,bU=xU.hasOwnProperty,wU=iC(function(t,e){t=Object(t);var r=-1,n=e.length,i=2<n?e[2]:void 0;for(i&&oC(e[0],e[1],i)&&(n=1);++r<n;)for(var a=e[r],s=EE(a),o=-1,l=s.length;++o<l;){var c=s[o],h=t[c];(void 0===h||Ok(h,xU[c])&&!bU.call(t,c))&&(t[c]=a[c])}return t}),kU=wU});function SU(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var _U,AU=b(()=>{me(SU,"arrayIncludesWith"),_U=SU});function LU(t,e,r,n){var i=-1,a=sB,s=!0,o=t.length,l=[],c=e.length;if(o){r&&(e=lP(e,P8(r))),n?(a=_U,s=!1):200<=e.length&&(a=Bz,s=!1,e=new Iz(e));t:for(;++i<o;){var h=t[i],u=null==r?h:r(h),h=n||0!==h?h:0;if(s&&u==u){for(var d=c;d--;)if(e[d]===u)continue t;l.push(h)}else a(e,u,n)||l.push(h)}}return l}var NU,IU,RU,MU=b(()=>{Rz(),cB(),AU(),cP(),q8(),$z(),me(LU,"baseDifference"),NU=LU}),DU=b(()=>{MU(),s$(),aC(),f8(),IU=iC(function(t,e){return g8(t)?NU(t,a$(e,1,g8,!0)):[]}),RU=IU});function OU(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var PU,BU=b(()=>{me(OU,"last"),PU=OU});function $U(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:PP(e),g$(t,e<0?0:e,n)):[]}var FU,zU=b(()=>{f$(),FP(),me($U,"drop"),FU=$U});function GU(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:PP(e),g$(t,0,(e=n-e)<0?0:e)):[]}var UU,qU=b(()=>{f$(),FP(),me(GU,"dropRight"),UU=GU});function jU(t){return"function"==typeof t?t:PE}var WU,YU=b(()=>{BE(),me(jU,"castFunction"),WU=jU});function HU(t,e){return(n8(t)?WP:cU)(t,WU(e))}var v,VU=b(()=>{YP(),uU(),YU(),s8(),me(HU,"forEach"),v=HU}),XU=b(()=>{VU()});function KU(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var ZU,QU=b(()=>{me(KU,"arrayEvery"),ZU=KU});function JU(t,n){var i=!0;return cU(t,function(t,e,r){return i=!!n(t,e,r)}),i}var tq,eq=b(()=>{uU(),me(JU,"baseEvery"),tq=JU});function rq(t,e,r){var n=n8(t)?ZU:tq;return r&&oC(t,e,r)&&(e=void 0),n(t,QG(e,3))}var nq,iq=b(()=>{QU(),eq(),JG(),s8(),lC(),me(rq,"every"),nq=rq});function aq(t,n){var i=[];return cU(t,function(t,e,r){n(t,e,r)&&i.push(t)}),i}var sq,oq=b(()=>{uU(),me(aq,"baseFilter"),sq=aq});function lq(t,e){return(n8(t)?N$:sq)(t,QG(e,3))}var cq,hq=b(()=>{I$(),oq(),JG(),s8(),me(lq,"filter"),cq=lq});function uq(a){return function(t,e,r){var n,i=Object(t);return u8(t)||(n=QG(e,3),t=yB(t),e=me(function(t){return n(i[t],t,i)},"predicate")),-1<(e=a(t,e,r))?i[n?t[e]:e]:void 0}}var dq,pq=b(()=>{JG(),d8(),wB(),me(uq,"createFind"),dq=uq});function gq(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:PP(r))<0&&(r=fq(n+r,0)),VP(t,QG(e,3),r)):-1}var fq,mq,yq,vq,xq=b(()=>{XP(),JG(),FP(),fq=Math.max,me(gq,"findIndex"),mq=gq}),bq=b(()=>{pq(),xq(),yq=dq(mq),vq=yq});function wq(t){return t&&t.length?t[0]:void 0}var kq,Tq=b(()=>{me(wq,"head"),kq=wq}),Eq=b(()=>{Tq()});function Cq(t,n){var i=-1,a=u8(t)?Array(t.length):[];return cU(t,function(t,e,r){a[++i]=n(t,e,r)}),a}var Sq,_q=b(()=>{uU(),d8(),me(Cq,"baseMap"),Sq=Cq});function Aq(t,e){return(n8(t)?lP:Sq)(t,QG(e,3))}var x,Lq=b(()=>{cP(),JG(),_q(),s8(),me(Aq,"map"),x=Aq});function Nq(t,e){return a$(x(t,e),1)}var Iq,Rq=b(()=>{s$(),Lq(),me(Nq,"flatMap"),Iq=Nq});function Mq(t,e){return null==t?t:h7(t,WU(e),EE)}var Dq,Oq=b(()=>{d7(),YU(),CE(),me(Mq,"forIn"),Dq=Mq});function Pq(t,e){return t&&iU(t,WU(e))}var Bq,$q,Fq,zq,Gq=b(()=>{aU(),YU(),me(Pq,"forOwn"),Bq=Pq}),Uq=b(()=>{n7(),TU(),Fq=Object.prototype,$q=Fq.hasOwnProperty,Fq=mU(function(t,e,r){$q.call(t,r)?t[r].push(e):r7(t,r,[e])}),zq=Fq});function qq(t,e){return e<t}var jq,Wq=b(()=>{me(qq,"baseGt"),jq=qq});function Yq(t,e){return null!=t&&Vq.call(t,e)}var Hq,Vq,Xq,Kq=b(()=>{Hq=Object.prototype,Vq=Hq.hasOwnProperty,me(Yq,"baseHas"),Xq=Yq});function Zq(t,e){return null!=t&&DG(t,e,Xq)}var Qq,Jq=b(()=>{Kq(),OG(),me(Zq,"has"),Qq=Zq});function tj(t){return"string"==typeof t||!n8(t)&&V7(t)&&"[object String]"==S6(t)}var ej,rj=b(()=>{_6(),s8(),X7(),me(tj,"isString"),ej=tj});function nj(e,t){return lP(t,function(t){return e[t]})}var ij,aj=b(()=>{cP(),me(nj,"baseValues"),ij=nj});function sj(t){return null==t?[]:ij(t,yB(t))}var oj,lj=b(()=>{aj(),wB(),me(sj,"values"),oj=sj});function cj(t,e,r,n){return t=u8(t)?t:oj(t),r=r&&!n?PP(r):0,n=t.length,r<0&&(r=hj(n+r,0)),ej(t)?r<=n&&-1<t.indexOf(e,r):!!n&&-1<nB(t,e,r)}var hj,uj,dj=b(()=>{iB(),d8(),rj(),FP(),lj(),hj=Math.max,me(cj,"includes"),uj=cj});function pj(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:PP(r))<0&&(r=gj(n+r,0)),nB(t,e,r)):-1}var gj,fj,mj=b(()=>{iB(),FP(),gj=Math.max,me(pj,"indexOf"),fj=pj});function yj(t){if(null!=t){if(u8(t)&&(n8(t)||"string"==typeof t||"function"==typeof t.splice||b8(t)||U8(t)||e8(t)))return!t.length;var e,r=bF(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(U7(t))return!gB(t).length;for(e in t)if(xj.call(t,e))return!1}return!0}var vj,xj,bj,wj=b(()=>{fB(),CF(),a8(),s8(),d8(),k8(),q7(),W8(),vj=Object.prototype,xj=vj.hasOwnProperty,me(yj,"isEmpty"),bj=yj});function kj(t){return V7(t)&&"[object RegExp]"==S6(t)}var Tj,Ej,Cj,Sj=b(()=>{_6(),X7(),me(kj,"baseIsRegExp"),Tj=kj}),_j=b(()=>{Sj(),q8(),j8(),Ej=(Ej=z8&&z8.isRegExp)?P8(Ej):Tj,Cj=Ej});function Aj(t){return void 0===t}var Lj,Nj=b(()=>{me(Aj,"isUndefined"),Lj=Aj});function Ij(t,e){return t<e}var Rj,Mj=b(()=>{me(Ij,"baseLt"),Rj=Ij});function Dj(t,n){var i={};return n=QG(n,3),iU(t,function(t,e,r){r7(i,e,n(t,e,r))}),i}var Oj,Pj=b(()=>{n7(),aU(),JG(),me(Dj,"mapValues"),Oj=Dj});function Bj(t,e,r){for(var n=-1,i=t.length;++n<i;){var a,s,o=t[n],l=e(o);null!=l&&(void 0===a?l==l&&!aP(l):r(l,a))&&(a=l,s=o)}return s}var $j,Fj=b(()=>{sP(),me(Bj,"baseExtremum"),$j=Bj});function zj(t){return t&&t.length?$j(t,PE,jq):void 0}var Gj,Uj=b(()=>{Fj(),Wq(),BE(),me(zj,"max"),Gj=zj});function qj(t){return t&&t.length?$j(t,PE,Rj):void 0}var jj,Wj=b(()=>{Fj(),Mj(),BE(),me(qj,"min"),jj=qj});function Yj(t,e){return t&&t.length?$j(t,QG(e,2),Rj):void 0}var Hj,Vj=b(()=>{Fj(),JG(),Mj(),me(Yj,"minBy"),Hj=Yj});function Xj(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Kj,Zj=b(()=>{me(Xj,"negate"),Kj=Xj});function Qj(t,e,r,n){if(L6(t))for(var i=-1,a=(e=zB(e,t)).length,s=a-1,o=t;null!=o&&++i<a;){var l,c=qB(e[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;i!=s&&(l=o[c],void 0===(h=n?n(l,c,o):void 0))&&(h=L6(l)?l:lE(e[i+1])?[]:{}),Q8(o,c,h),o=o[c]}return t}var Jj,tW=b(()=>{J8(),GB(),cE(),N6(),jB(),me(Qj,"baseSet"),Jj=Qj});function eW(t,e,r){for(var n=-1,i=e.length,a={};++n<i;){var s=e[n],o=YB(t,s);r(o,s)&&Jj(a,zB(s,t),o)}return a}var rW,nW=b(()=>{HB(),tW(),GB(),me(eW,"basePickBy"),rW=eW});function iW(t,r){var e;return null==t?{}:(e=lP(rF(t),function(t){return[t]}),r=QG(r),rW(t,e,function(t,e){return r(t,e[0])}))}var aW,sW=b(()=>{cP(),JG(),nW(),wF(),me(iW,"pickBy"),aW=iW});function oW(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var lW,cW=b(()=>{me(oW,"baseSortBy"),lW=oW});function hW(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,a=aP(t),s=void 0!==e,o=null===e,l=e==e,c=aP(e);if(!o&&!c&&!a&&e<t||a&&s&&l&&!o&&!c||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!c&&t<e||c&&r&&i&&!n&&!a||o&&r&&i||!s&&i||!l)return-1}return 0}var uW,dW=b(()=>{sP(),me(hW,"compareAscending"),uW=hW});function pW(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,o=r.length;++n<s;){var l=uW(i[n],a[n]);if(l)return o<=n?l:l*("desc"==r[n]?-1:1)}return t.index-e.index}var gW,fW=b(()=>{dW(),me(pW,"compareMultiple"),gW=pW});function mW(t,n,r){n=n.length?lP(n,function(e){return n8(e)?function(t){return YB(t,1===e.length?e[0]:e)}:e}):[PE];var i=-1,t=(n=lP(n,P8(QG)),Sq(t,function(e,t,r){return{criteria:lP(n,function(t){return t(e)}),index:++i,value:e}}));return lW(t,function(t,e){return gW(t,e,r)})}var yW,vW,xW,bW=b(()=>{cP(),HB(),JG(),_q(),cW(),q8(),fW(),BE(),s8(),me(mW,"baseOrderBy"),yW=mW}),wW=b(()=>{jG(),vW=qG("length"),xW=vW});function kW(t){for(var e=NW.lastIndex=0;NW.test(t);)++e;return e}var TW,EW,CW,SW,_W,AW,LW,NW,IW,RW=b(()=>{TW="["+(SW="\\ud800-\\udfff")+"]",EW="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",CW="\\ud83c[\\udffb-\\udfff]",LW="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",AW="[\\ufe0e\\ufe0f]?",_W="(?:\\u200d(?:"+[SW="[^"+SW+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+AW+LW+")*",AW=AW+LW+_W,LW="(?:"+[SW+EW+"?",EW,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",TW].join("|")+")",NW=RegExp(CW+"(?="+CW+")|"+LW+AW,"g"),me(kW,"unicodeSize"),IW=kW});function MW(t){return(v$(t)?IW:xW)(t)}var DW,OW=b(()=>{wW(),x$(),RW(),me(MW,"stringSize"),DW=MW});function PW(r,t){return rW(r,t,function(t,e){return BG(r,e)})}var BW,$W,FW,zW=b(()=>{nW(),$G(),me(PW,"basePick"),BW=PW}),GW=b(()=>{zW(),d$(),$W=u$(function(t,e){return null==t?{}:BW(t,e)}),FW=$W});function UW(t,e,r,n){for(var i=-1,a=jW(qW((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var qW,jW,WW,YW=b(()=>{qW=Math.ceil,jW=Math.max,me(UW,"baseRange"),WW=UW});function HW(n){return function(t,e,r){return r&&"number"!=typeof r&&oC(t,e,r)&&(e=r=void 0),t=MP(t),void 0===e?(e=t,t=0):e=MP(e),r=void 0===r?t<e?1:-1:MP(r),WW(t,e,r,n)}}var VW,XW,KW,ZW=b(()=>{YW(),lC(),DP(),me(HW,"createRange"),VW=HW}),QW=b(()=>{ZW(),XW=VW(),KW=XW});function JW(t,n,i,a,e){return e(t,function(t,e,r){i=a?(a=!1,t):n(i,t,e,r)}),i}var tY,eY=b(()=>{me(JW,"baseReduce"),tY=JW});function rY(t,e,r){var n=n8(t)?w$:tY,i=arguments.length<3;return n(t,QG(e,4),r,i,cU)}var nY,iY=b(()=>{k$(),uU(),JG(),eY(),s8(),me(rY,"reduce"),nY=rY});function aY(t,e){return(n8(t)?N$:sq)(t,Kj(QG(e,3)))}var sY,oY=b(()=>{I$(),oq(),JG(),s8(),Zj(),me(aY,"reject"),sY=aY});function lY(t){var e;return null==t?0:u8(t)?ej(t)?DW(t):t.length:"[object Map]"==(e=bF(t))||"[object Set]"==e?t.size:gB(t).length}var cY,hY=b(()=>{fB(),CF(),d8(),rj(),OW(),me(lY,"size"),cY=lY});function uY(t,n){var i;return cU(t,function(t,e,r){return!(i=n(t,e,r))}),!!i}var dY,pY=b(()=>{uU(),me(uY,"baseSome"),dY=uY});function gY(t,e,r){var n=n8(t)?Dz:dY;return r&&oC(t,e,r)&&(e=void 0),n(t,QG(e,3))}var fY,mY,yY,vY,xY,bY=b(()=>{Oz(),JG(),pY(),s8(),lC(),me(gY,"some"),fY=gY}),wY=b(()=>{s$(),bW(),aC(),lC(),mY=iC(function(t,e){var r;return null==t?[]:(1<(r=e.length)&&oC(t,e[0],e[1])?e=[]:2<r&&oC(e[0],e[1],e[2])&&(e=[e[0]]),yW(t,a$(e,1),[]))}),yY=mY}),kY=b(()=>{EF(),qP(),Hz(),vY=lF&&1/Yz(new lF([,-0]))[1]==1/0?function(t){return new lF(t)}:UP,xY=vY});function TY(t,e,r){var n=-1,i=sB,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=_U;else if(200<=a){var c=e?null:xY(t);if(c)return Yz(c);s=!1,i=Bz,l=new Iz}else l=e?[]:o;t:for(;++n<a;){var h=t[n],u=e?e(h):h,h=r||0!==h?h:0;if(s&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue t;e&&l.push(u),o.push(h)}else i(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}var EY,CY,SY,_Y=b(()=>{Rz(),cB(),AU(),$z(),kY(),Hz(),me(TY,"baseUniq"),EY=TY}),AY=b(()=>{s$(),aC(),_Y(),f8(),CY=iC(function(t){return EY(a$(t,1,g8,!0))}),SY=CY});function LY(t){return t&&t.length?EY(t):[]}var NY,IY=b(()=>{_Y(),me(LY,"uniq"),NY=LY});function RY(t,e){return t&&t.length?EY(t,QG(e,2)):[]}var MY,DY=b(()=>{JG(),_Y(),me(RY,"uniqBy"),MY=RY});function OY(t){var e=++PY;return BB(t)+e}var PY,BY,$Y=b(()=>{$B(),PY=0,me(OY,"uniqueId"),BY=OY});function FY(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n<i;){var o=n<a?e[n]:void 0;r(s,t[n],o)}return s}var zY,GY=b(()=>{me(FY,"baseZipObject"),zY=FY});function UY(t,e){return zY(t||[],e||[],Q8)}var qY,jY=b(()=>{J8(),GY(),me(UY,"zipObject"),qY=UY}),WY=b(()=>{kB(),yz(),bz(),Tz(),VE(),CU(),DU(),zU(),qU(),XU(),iq(),hq(),bq(),Eq(),Rq(),c$(),VU(),Oq(),Gq(),Uq(),Jq(),BE(),dj(),mj(),s8(),wj(),O6(),N6(),_j(),rj(),Nj(),wB(),BU(),Lq(),Pj(),Uj(),gC(),Wj(),Vj(),qP(),EU(),GW(),sW(),QW(),iY(),oY(),hY(),bY(),wY(),AY(),IY(),$Y(),lj(),jY()});function YY(t,e){t[e]?t[e]++:t[e]=1}function HY(t,e){--t[e]||delete t[e]}function VY(t,e,r,n){return e=""+e,r=""+r,!t&&r<e&&(t=e,e=r,r=t),e+""+r+""+(Lj(n)?"\0":n)}function XY(t,e,r,n){return e=""+e,r=""+r,!t&&r<e&&(t=e,e=r,r=t),t={v:e,w:r},n&&(t.name=n),t}function KY(t,e){return VY(t,e.v,e.w,e.name)}var ZY,QY,JY=b(()=>{WY(),ZY="\0",(QY=class{static{me(this,"Graph")}constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=YE(void 0),this._defaultEdgeLabelFn=YE(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[ZY]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return R6(t)||(t=YE(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return yB(this._nodes)}sources(){var e=this;return cq(this.nodes(),function(t){return bj(e._in[t])})}sinks(){var e=this;return cq(this.nodes(),function(t){return bj(e._out[t])})}setNodes(t,e){var r=arguments,n=this;return v(t,function(t){1<r.length?n.setNode(t,e):n.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?1<arguments.length&&(this._nodes[t]=e):(this._nodes[t]=1<arguments.length?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=ZY,this._children[t]={},this._children[ZY][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount),this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){var e;return Object.prototype.hasOwnProperty.call(this._nodes,t)&&(e=me(t=>this.removeEdge(this._edgeObjs[t]),"removeEdge"),delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],v(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),v(yB(this._in[t]),e),delete this._in[t],delete this._preds[t],v(yB(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount),this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Lj(e))e=ZY;else{for(var r=e+="";!Lj(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound&&(t=this._parent[t])!==ZY)return t}children(t){var e;return Lj(t)&&(t=ZY),this._isCompound?(e=this._children[t])?yB(e):void 0:t===ZY?this.nodes():this.hasNode(t)?[]:void 0}predecessors(t){if(t=this._preds[t])return yB(t)}successors(t){if(t=this._sucs[t])return yB(t)}neighbors(t){var e=this.predecessors(t);if(e)return SY(e,this.successors(t))}isLeaf(t){return 0===(t=this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(r){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),i=(n.setGraph(this.graph()),this),a=(v(this._nodes,function(t,e){r(e)&&n.setNode(e,t)}),v(this._edgeObjs,function(t){n.hasNode(t.v)&&n.hasNode(t.w)&&n.setEdge(t,i.edge(t))}),{});function s(t){var e=i.parent(t);return void 0===e||n.hasNode(e)?a[t]=e:e in a?a[e]:s(e)}return me(s,"findParent"),this._isCompound&&v(n.nodes(),function(t){n.setParent(t,s(t))}),n}setDefaultEdgeLabel(t){return R6(t)||(t=YE(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return oj(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return nY(t,function(t,e){return 1<i.length?n.setEdge(t,e,r):n.setEdge(t,e),e}),this}setEdge(){var t,e,r=!1,n=("object"==typeof(n=arguments[0])&&null!==n&&"v"in n?(i=n.v,a=n.w,t=n.name,2===arguments.length&&(e=arguments[1],r=!0)):(i=n,a=arguments[1],t=arguments[3],2<arguments.length&&(e=arguments[2],r=!0)),i=""+i,a=""+a,Lj(t)||(t=""+t),VY(this._isDirected,i,a,t));if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))r&&(this._edgeLabels[n]=e);else{if(!Lj(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(a),this._edgeLabels[n]=r?e:this._defaultEdgeLabelFn(i,a,t);var i=(r=XY(this._isDirected,i,a,t)).v,a=r.w;Object.freeze(r),this._edgeObjs[n]=r,YY(this._preds[a],i),YY(this._sucs[i],a),this._in[a][n]=r,this._out[i][n]=r,this._edgeCount++}return this}edge(t,e,r){return t=1===arguments.length?KY(this._isDirected,t):VY(this._isDirected,t,e,r),this._edgeLabels[t]}hasEdge(t,e,r){return t=1===arguments.length?KY(this._isDirected,t):VY(this._isDirected,t,e,r),Object.prototype.hasOwnProperty.call(this._edgeLabels,t)}removeEdge(t,e,r){var r=1===arguments.length?KY(this._isDirected,arguments[0]):VY(this._isDirected,t,e,r),n=this._edgeObjs[r];return n&&(t=n.v,e=n.w,delete this._edgeLabels[r],delete this._edgeObjs[r],HY(this._preds[e],t),HY(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){if(t=this._in[t])return t=oj(t),e?cq(t,function(t){return t.v===e}):t}outEdges(t,e){if(t=this._out[t])return t=oj(t),e?cq(t,function(t){return t.w===e}):t}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}).prototype._nodeCount=0,QY.prototype._edgeCount=0,me(YY,"incrementOrInitEntry"),me(HY,"decrementOrRemoveEntry"),me(VY,"edgeArgsToId"),me(XY,"edgeArgsToObj"),me(KY,"edgeObjToId")}),tH=b(()=>{JY()});function eH(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function rH(t,e){if("_next"!==t&&"_prev"!==t)return e}var nH,iH=b(()=>{nH=class{static{me(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return eH(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&eH(t),t._next=e._next,e._next._prev=t,(e._next=t)._prev=e}toString(){for(var t=[],e=this._sentinel,r=e._prev;r!==e;)t.push(JSON.stringify(r,rH)),r=r._prev;return"["+t.join(", ")+"]"}},me(eH,"unlink"),me(rH,"filterOutLinks")});function aH(e,t){return e.nodeCount()<=1?[]:(t=sH((t=lH(e,t||hH)).graph,t.buckets,t.zeroIdx),l$(x(t,function(t){return e.outEdges(t.v,t.w)})))}function sH(t,e,r){for(var n,i=[],a=e[e.length-1],s=e[0];t.nodeCount();){for(;n=s.dequeue();)oH(t,e,r,n);for(;n=a.dequeue();)oH(t,e,r,n);if(t.nodeCount())for(var o=e.length-2;0<o;--o)if(n=e[o].dequeue()){i=i.concat(oH(t,e,r,n,!0));break}}return i}function oH(n,i,a,t,s){var o=s?[]:void 0;return v(n.inEdges(t.v),function(t){var e=n.edge(t),r=n.node(t.v);s&&o.push({v:t.v,w:t.w}),r.out-=e,cH(i,a,r)}),v(n.outEdges(t.v),function(t){var e=n.edge(t),t=t.w;(t=n.node(t)).in-=e,cH(i,a,t)}),n.removeNode(t.v),o}function lH(t,n){var i=new QY,a=0,s=0,e=(v(t.nodes(),function(t){i.setNode(t,{v:t,in:0,out:0})}),v(t.edges(),function(t){var e=i.edge(t.v,t.w)||0,r=n(t);i.setEdge(t.v,t.w,e+r),s=Math.max(s,i.node(t.v).out+=r),a=Math.max(a,i.node(t.w).in+=r)}),KW(s+a+3).map(function(){return new nH})),r=a+1;return v(i.nodes(),function(t){cH(e,r,i.node(t))}),{graph:i,buckets:e,zeroIdx:r}}function cH(t,e,r){(r.out?r.in?t[r.out-r.in+e]:t[t.length-1]:t[0]).enqueue(r)}var hH,uH=b(()=>{WY(),tH(),iH(),hH=YE(1),me(aH,"greedyFAS"),me(sH,"doGreedyFAS"),me(oH,"removeNode"),me(lH,"buildState"),me(cH,"assignBucket")});function dH(r){var t="greedy"===r.graph().acyclicer?aH(r,e(r)):pH(r);function e(e){return function(t){return e.edge(t).weight}}v(t,function(t){var e=r.edge(t);r.removeEdge(t),e.forwardName=t.name,e.reversed=!0,r.setEdge(t.w,t.v,e,BY("rev"))}),me(e,"weightFn")}function pH(e){var r=[],n={},i={};function a(t){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,n[t]=!0,v(e.outEdges(t),function(t){Object.prototype.hasOwnProperty.call(n,t.w)?r.push(t):a(t.w)}),delete n[t])}return me(a,"dfs"),v(e.nodes(),a),r}function gH(n){v(n.edges(),function(t){var e,r=n.edge(t);r.reversed&&(n.removeEdge(t),e=r.forwardName,delete r.reversed,delete r.forwardName,n.setEdge(t.w,t.v,r,e))})}var fH=b(()=>{WY(),uH(),me(dH,"run"),me(pH,"dfsFAS"),me(gH,"undo")});function mH(t,e,r,n){for(var i;i=BY(n),t.hasNode(i););return r.dummy=e,t.setNode(i,r),i}function yH(n){var i=(new QY).setGraph(n.graph());return v(n.nodes(),function(t){i.setNode(t,n.node(t))}),v(n.edges(),function(t){var e=i.edge(t.v,t.w)||{weight:0,minlen:1},r=n.edge(t);i.setEdge(t.v,t.w,{weight:e.weight+r.weight,minlen:Math.max(e.minlen,r.minlen)})}),i}function vH(e){var r=new QY({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(t){e.children(t).length||r.setNode(t,e.node(t))}),v(e.edges(),function(t){r.setEdge(t,e.edge(t))}),r}function xH(t,e){var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2;if(a||e)return t=Math.abs(e)*s>Math.abs(a)*t?(r=(t=e<0?-t:t)*a/e,t):(r=a<0?-s:s)*e/a,{x:n+r,y:i+t};throw new Error("Not possible to find intersection inside of the rectangle")}function bH(n){var i=x(KW(EH(n)+1),function(){return[]});return v(n.nodes(),function(t){var e=n.node(t),r=e.rank;Lj(r)||(i[r][e.order]=t)}),i}function wH(e){var r=jj(x(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(t){t=e.node(t),Qq(t,"rank")&&(t.rank-=r)})}function kH(r){var n=jj(x(r.nodes(),function(t){return r.node(t).rank})),i=[],a=(v(r.nodes(),function(t){var e=r.node(t).rank-n;i[e]||(i[e]=[]),i[e].push(t)}),0),s=r.graph().nodeRankFactor;v(i,function(t,e){Lj(t)&&e%s!=0?--a:a&&v(t,function(t){r.node(t).rank+=a})})}function TH(t,e,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),mH(t,"border",i,e)}function EH(e){return Gj(x(e.nodes(),function(t){if(t=e.node(t).rank,!Lj(t))return t}))}function CH(t,e){var r={lhs:[],rhs:[]};return v(t,function(t){(e(t)?r.lhs:r.rhs).push(t)}),r}function SH(t,e){var r=vU();try{return e()}finally{console.log(t+" time: "+(vU()-r)+"ms")}}function _H(t,e){return e()}var AH=b(()=>{WY(),tH(),me(mH,"addDummyNode"),me(yH,"simplify"),me(vH,"asNonCompoundGraph"),me(xH,"intersectRect"),me(bH,"buildLayerMatrix"),me(wH,"normalizeRanks"),me(kH,"removeEmptyRanks"),me(TH,"addBorderNode"),me(EH,"maxRank"),me(CH,"partition"),me(SH,"time"),me(_H,"notime")});function LH(a){function s(t){var e=a.children(t),r=a.node(t);if(e.length&&v(e,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var n=r.minRank,i=r.maxRank+1;n<i;++n)NH(a,"borderLeft","_bl",t,r,n),NH(a,"borderRight","_br",t,r,n)}}me(s,"dfs"),v(a.children(),s)}function NH(t,e,r,n,i,a){var s=i[e][a-1],r=mH(t,"border",{width:0,height:0,rank:a,borderType:e},r);i[e][a]=r,t.setParent(r,n),s&&t.setEdge(s,r,{weight:1})}var IH=b(()=>{WY(),AH(),me(LH,"addBorderSegments"),me(NH,"addBorderNode")});function RH(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||DH(t)}function MH(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||PH(t),"lr"!==e&&"rl"!==e||($H(t),DH(t))}function DH(e){v(e.nodes(),function(t){OH(e.node(t))}),v(e.edges(),function(t){OH(e.edge(t))})}function OH(t){var e=t.width;t.width=t.height,t.height=e}function PH(e){v(e.nodes(),function(t){BH(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,BH),Object.prototype.hasOwnProperty.call(t,"y")&&BH(t)})}function BH(t){t.y=-t.y}function $H(e){v(e.nodes(),function(t){FH(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,FH),Object.prototype.hasOwnProperty.call(t,"x")&&FH(t)})}function FH(t){var e=t.x;t.x=t.y,t.y=e}var zH=b(()=>{WY(),me(RH,"adjust"),me(MH,"undo"),me(DH,"swapWidthHeight"),me(OH,"swapWidthHeightOne"),me(PH,"reverseY"),me(BH,"reverseYOne"),me($H,"swapXY"),me(FH,"swapXYOne")});function GH(e){e.graph().dummyChains=[],v(e.edges(),function(t){UH(e,t)})}function UH(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==n+1){t.removeEdge(e);var c,h=void 0,u=0;for(++n;n<a;++u,++n)o.points=[],c=mH(t,"edge",h={width:0,height:0,edgeLabel:o,edgeObj:e,rank:n},"_d"),n===l&&(h.width=o.width,h.height=o.height,h.dummy="edge-label",h.labelpos=o.labelpos),t.setEdge(r,c,{weight:o.weight},s),0===u&&t.graph().dummyChains.push(c),r=c;t.setEdge(r,i,{weight:o.weight},s)}}function qH(i){v(i.graph().dummyChains,function(t){var e,r=i.node(t),n=r.edgeLabel;for(i.setEdge(r.edgeObj,n);r.dummy;)e=i.successors(t)[0],i.removeNode(t),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),r=i.node(t=e)})}var jH=b(()=>{WY(),AH(),me(GH,"run"),me(UH,"normalizeEdge"),me(qH,"undo")});function WH(r){var n={};function i(t){var e=r.node(t);return Object.prototype.hasOwnProperty.call(n,t)?e.rank:(n[t]=!0,(t=jj(x(r.outEdges(t),function(t){return i(t.w)-r.edge(t).minlen})))!==Number.POSITIVE_INFINITY&&null!=t||(t=0),e.rank=t)}me(i,"dfs"),v(r.sources(),i)}function YH(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var HH=b(()=>{WY(),me(WH,"longestPath"),me(YH,"slack")});function VH(t){var e,r=new QY({directed:!1}),n=t.nodes()[0],i=t.nodeCount();for(r.setNode(n,{});XH(r,t)<i;)e=KH(r,t),e=r.hasNode(e.v)?YH(t,e):-YH(t,e),ZH(r,t,e);return r}function XH(n,i){function a(r){v(i.nodeEdges(r),function(t){var e=t.v,e=r===e?t.w:e;n.hasNode(e)||YH(i,t)||(n.setNode(e,{}),n.setEdge(r,e,{}),a(e))})}return me(a,"dfs"),v(n.nodes(),a),n.nodeCount()}function KH(e,r){return Hj(r.edges(),function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return YH(r,t)})}function ZH(t,e,r){v(t.nodes(),function(t){e.node(t).rank+=r})}var QH=b(()=>{WY(),tH(),HH(),me(VH,"feasibleTree"),me(XH,"tightTree"),me(KH,"findMinSlackEdge"),me(ZH,"shiftRanks")}),JH=b(()=>{}),tV=b(()=>{}),eV=b(()=>{WY(),tV(),YE(1)}),rV=b(()=>{eV()}),nV=b(()=>{}),iV=b(()=>{nV()}),aV=b(()=>{WY(),YE(1)});function sV(e){var r={},n={},i=[];function a(t){if(Object.prototype.hasOwnProperty.call(n,t))throw new oV;Object.prototype.hasOwnProperty.call(r,t)||(n[t]=!0,r[t]=!0,v(e.predecessors(t),a),delete n[t],i.push(t))}if(me(a,"visit"),v(e.sinks(),a),cY(r)!==e.nodeCount())throw new oV;return i}function oV(){}var lV=b(()=>{WY(),sV.CycleException=oV,me(sV,"topsort"),me(oV,"CycleException"),oV.prototype=new Error}),cV=b(()=>{lV()});function hV(e,t,r){n8(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return v(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);uV(e,t,"post"===r,a,n,i)}),i}function uV(e,t,r,n,i,a){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||a.push(t),v(i(t),function(t){uV(e,t,r,n,i,a)}),r&&a.push(t))}var dV=b(()=>{WY(),me(hV,"dfs"),me(uV,"doDfs")});function pV(t,e){return hV(t,e,"post")}var gV=b(()=>{dV(),me(pV,"postorder")});function fV(t,e){return hV(t,e,"pre")}var mV=b(()=>{dV(),me(fV,"preorder")}),yV=b(()=>{tV(),JY()}),vV=b(()=>{JH(),eV(),rV(),iV(),aV(),cV(),gV(),mV(),yV(),nV(),lV()});function xV(t){WH(t=yH(t));var e,r=VH(t);for(TV(r),bV(r,t);e=CV(r);)_V(r,t,e,SV(r,t,e))}function bV(e,r){var t=(t=pV(e,e.nodes())).slice(0,t.length-1);v(t,function(t){wV(e,r,t)})}function wV(t,e,r){var n=t.node(r).parent;t.edge(r,n).cutvalue=kV(t,e,r)}function kV(n,i,a){var s=n.node(a).parent,o=!0,t=i.edge(a,s),l=0;return t||(o=!1,t=i.edge(s,a)),l=t.weight,v(i.nodeEdges(a),function(t){var e=t.v===a,r=e?t.w:t.v;r!==s&&(e=e===o,t=i.edge(t).weight,l+=e?t:-t,LV(n,a,r))&&(t=n.edge(a,r).cutvalue,l+=e?-t:t)}),l}function TV(t,e){arguments.length<2&&(e=t.nodes()[0]),EV(t,{},1,e)}function EV(e,r,n,i,t){var a=n,s=e.node(i);return r[i]=!0,v(e.neighbors(i),function(t){Object.prototype.hasOwnProperty.call(r,t)||(n=EV(e,r,n,t,i))}),s.low=a,s.lim=n++,t?s.parent=t:delete s.parent,n}function CV(e){return vq(e.edges(),function(t){return e.edge(t).cutvalue<0})}function SV(e,r,t){var n=t.v,i=t.w,t=(r.hasEdge(n,i)||(n=t.w,i=t.v),e.node(n)),n=e.node(i),a=t,s=!1,i=(t.lim>n.lim&&(a=n,s=!0),cq(r.edges(),function(t){return s===NV(0,e.node(t.v),a)&&s!==NV(0,e.node(t.w),a)}));return Hj(i,function(t){return YH(r,t)})}function _V(t,e,r,n){var i=r.v;t.removeEdge(i,r.w),t.setEdge(n.v,n.w,{}),TV(t),bV(t,e),AV(t,e)}function AV(i,a){var t=vq(i.nodes(),function(t){return!a.node(t).parent}),t=(t=fV(i,t)).slice(1);v(t,function(t){var e=i.node(t).parent,r=a.edge(t,e),n=!1;r||(r=a.edge(e,t),n=!0),a.node(t).rank=a.node(e).rank+(n?r.minlen:-r.minlen)})}function LV(t,e,r){return t.hasEdge(e,r)}function NV(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var IV=b(()=>{WY(),vV(),AH(),QH(),HH(),xV.initLowLimValues=TV,xV.initCutValues=bV,xV.calcCutValue=kV,xV.leaveEdge=CV,xV.enterEdge=SV,xV.exchangeEdges=_V,me(xV,"networkSimplex"),me(bV,"initCutValues"),me(wV,"assignCutValue"),me(kV,"calcCutValue"),me(TV,"initLowLimValues"),me(EV,"dfsAssignLowLim"),me(CV,"leaveEdge"),me(SV,"enterEdge"),me(_V,"exchangeEdges"),me(AV,"updateRanks"),me(LV,"isTreeEdge"),me(NV,"isDescendant")});function RV(t){switch(t.graph().ranker){case"network-simplex":DV(t);break;case"tight-tree":MV(t);break;case"longest-path":OV(t);break;default:DV(t)}}function MV(t){WH(t),VH(t)}function DV(t){xV(t)}var OV,PV=b(()=>{QH(),IV(),HH(),me(RV,"rank"),OV=WH,me(MV,"tightTreeRanker"),me(DV,"networkSimplexRanker")});function BV(e){var r=mH(e,"root",{},"_root"),n=FV(e),i=Gj(oj(n))-1,a=2*i+1,s=(e.graph().nestingRoot=r,v(e.edges(),function(t){e.edge(t).minlen*=a}),zV(e)+1);v(e.children(),function(t){$V(e,r,a,s,i,n,t)}),e.graph().nodeRankFactor=a}function $V(i,a,s,o,l,c,h){var u,d,t,e=i.children(h);e.length?(u=TH(i,"_bt"),d=TH(i,"_bb"),t=i.node(h),i.setParent(u,h),t.borderTop=u,i.setParent(d,h),t.borderBottom=d,v(e,function(t){$V(i,a,s,o,l,c,t);var e=i.node(t),r=e.borderTop||t,n=r!==(t=e.borderBottom||t)?1:l-c[h]+1;i.setEdge(u,r,{weight:e=e.borderTop?o:2*o,minlen:n,nestingEdge:!0}),i.setEdge(t,d,{weight:e,minlen:n,nestingEdge:!0})}),i.parent(h)||i.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&i.setEdge(a,h,{weight:0,minlen:s})}function FV(n){var i={};function a(t,e){var r=n.children(t);r&&r.length&&v(r,function(t){a(t,e+1)}),i[t]=e}return me(a,"dfs"),v(n.children(),function(t){a(t,1)}),i}function zV(r){return nY(r.edges(),function(t,e){return t+r.edge(e).weight},0)}function GV(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}var UV=b(()=>{WY(),AH(),me(BV,"run"),me($V,"dfs"),me(FV,"treeDepths"),me(zV,"sumWeights"),me(GV,"cleanup")});function qV(i,a,t){var s,o={};v(t,function(t){for(var e,r,n=i.parent(t);n;){if((e=i.parent(n))?(r=o[e],o[e]=n):(r=s,s=n),r&&r!==n)return void a.setEdge(r,n);n=e}})}var jV=b(()=>{WY(),me(qV,"addSubgraphConstraints")});function WV(i,r,a){var s=YV(i),o=new QY({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(t){return i.node(t)});return v(i.nodes(),function(n){var t=i.node(n),e=i.parent(n);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(o.setNode(n),o.setParent(n,e||s),v(i[a](n),function(t){var e=t.v===n?t.w:t.v,r=o.edge(e,n),r=Lj(r)?0:r.weight;o.setEdge(e,n,{weight:i.edge(t).weight+r})}),Object.prototype.hasOwnProperty.call(t,"minRank"))&&o.setNode(n,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]})}),o}function YV(t){for(var e;t.hasNode(e=BY("_root")););return e}var HV=b(()=>{WY(),tH(),me(WV,"buildLayerGraph"),me(YV,"createRootNode")});function VV(t,e){for(var r=0,n=1;n<e.length;++n)r+=XV(t,e[n-1],e[n]);return r}function XV(e,t,r){for(var n=qY(r,x(r,function(t,e){return e})),t=l$(x(t,function(t){return yY(x(e.outEdges(t),function(t){return{pos:n[t.w],weight:e.edge(t).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1,s=(--i,x(new Array(a),function(){return 0})),o=0;return v(t.forEach(function(t){var e=t.pos+i;s[e]+=t.weight;for(var r=0;0<e;)e%2&&(r+=s[e+1]),s[e=e-1>>1]+=t.weight;o+=t.weight*r})),o}var KV=b(()=>{WY(),me(VV,"crossCount"),me(XV,"twoLayerCrossCount")});function ZV(r){var n={},t=cq(r.nodes(),function(t){return!r.children(t).length}),e=Gj(x(t,function(t){return r.node(t).rank})),i=x(KW(e+1),function(){return[]});function a(t){var e;Qq(n,t)||(n[t]=!0,e=r.node(t),i[e.rank].push(t),v(r.successors(t),a))}return me(a,"dfs"),e=yY(t,function(t){return r.node(t).rank}),v(e,a),i}var QV=b(()=>{WY(),me(ZV,"initOrder")});function JV(n,t){return x(t,function(t){var e=n.inEdges(t);return e.length?{v:t,barycenter:(e=nY(e,function(t,e){var r=n.edge(e),e=n.node(e.v);return{sum:t.sum+r.weight*e.order,weight:t.weight+r.weight}},{sum:0,weight:0})).sum/e.weight,weight:e.weight}:{v:t}})}var tX=b(()=>{WY(),me(JV,"barycenter")});function eX(t,e){var n={};return v(t,function(t,e){e=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e},Lj(t.barycenter)||(e.barycenter=t.barycenter,e.weight=t.weight)}),v(e.edges(),function(t){var e=n[t.v],r=n[t.w];Lj(e)||Lj(r)||(r.indegree++,e.out.push(n[t.w]))}),rX(cq(n,function(t){return!t.indegree}))}function rX(r){var t=[];function e(e){return function(t){t.merged||(Lj(t.barycenter)||Lj(e.barycenter)||t.barycenter>=e.barycenter)&&nX(e,t)}}function n(e){return function(t){t.in.push(e),0==--t.indegree&&r.push(t)}}for(me(e,"handleIn"),me(n,"handleOut");r.length;){var i=r.pop();t.push(i),v(i.in.reverse(),e(i)),v(i.out,n(i))}return x(cq(t,function(t){return!t.merged}),function(t){return FW(t,["vs","i","barycenter","weight"])})}function nX(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var iX=b(()=>{WY(),me(eX,"resolveConflicts"),me(rX,"doResolveConflicts"),me(nX,"mergeEntries")});function aX(t,e){var r=(t=CH(t,function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")})).lhs,n=yY(t.rhs,function(t){return-t.i}),i=[],a=0,s=0,o=0,t=(r.sort(oX(!!e)),o=sX(i,n,o),v(r,function(t){o+=t.vs.length,i.push(t.vs),a+=t.barycenter*t.weight,s+=t.weight,o=sX(i,n,o)}),{vs:l$(i)});return s&&(t.barycenter=a/s,t.weight=s),t}function sX(t,e,r){for(var n;e.length&&(n=PU(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function oX(r){return function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:r?e.i-t.i:t.i-e.i}}var lX=b(()=>{WY(),AH(),me(aX,"sort"),me(sX,"consumeUnsortable"),me(oX,"compareWithBias")});function cX(r,t,n,i){var e,a=r.children(t),s=(t=r.node(t))?t.borderLeft:void 0,o=t?t.borderRight:void 0,l={},t=(s&&(a=cq(a,function(t){return t!==s&&t!==o})),JV(r,a));return v(t,function(t){var e;r.children(t.v).length&&(e=cX(r,t.v,n,i),l[t.v]=e,Object.prototype.hasOwnProperty.call(e,"barycenter"))&&uX(t,e)}),hX(a=eX(t,n),l),t=aX(a,i),s&&(t.vs=l$([s,t.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),e=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(t,"barycenter")||(t.barycenter=0,t.weight=0),t.barycenter=(t.barycenter*t.weight+a.order+e.order)/(t.weight+2),t.weight+=2),t}function hX(t,e){v(t,function(t){t.vs=l$(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}function uX(t,e){Lj(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var dX=b(()=>{WY(),tX(),iX(),lX(),me(cX,"sortSubgraph"),me(hX,"expandSubgraphs"),me(uX,"mergeBarycenters")});function pX(t){var e=EH(t),r=gX(t,KW(1,e+1),"inEdges"),n=gX(t,KW(e-1,-1,-1),"outEdges");mX(t,ZV(t));for(var i,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){fX(s%2?r:n,2<=s%4);var l,c=VV(t,l=bH(t));c<a&&(o=0,i=xz(l),a=c)}mX(t,i)}function gX(e,t,r){return x(t,function(t){return WV(e,t,r)})}function fX(t,e){var n=new QY;v(t,function(r){var t=r.graph().root,t=cX(r,t,n,e);v(t.vs,function(t,e){r.node(t).order=e}),qV(r,n,t.vs)})}function mX(r,t){v(t,function(t){v(t,function(t,e){r.node(t).order=e})})}var yX=b(()=>{WY(),tH(),AH(),jV(),HV(),KV(),QV(),dX(),me(pX,"order"),me(gX,"buildLayerGraphs"),me(fX,"sweepLayerGraphs"),me(mX,"assignOrder")});function vX(c){var h=bX(c);v(c.graph().dummyChains,function(t){for(var e,r=c.node(t).edgeObj,n=xX(c,h,r.v,r.w),i=n.path,a=n.lca,s=0,o=i[s],l=!0;t!==r.w;){if(e=c.node(t),l){for(;(o=i[s])!==a&&c.node(o).maxRank<e.rank;)s++;o===a&&(l=!1)}if(!l){for(;s<i.length-1&&c.node(o=i[s+1]).minRank<=e.rank;)s++;o=i[s]}c.setParent(t,o),t=c.successors(t)[0]}})}function xX(t,e,r,n){for(var i,a=[],s=[],o=Math.min(e[r].low,e[n].low),l=Math.max(e[r].lim,e[n].lim),c=r;c=t.parent(c),a.push(c),c&&(e[c].low>o||l>e[c].lim););for(i=c,c=n;(c=t.parent(c))!==i;)s.push(c);return{path:a.concat(s.reverse()),lca:i}}function bX(r){var n={},i=0;function a(t){var e=i;v(r.children(t),a),n[t]={low:e,lim:i++}}return me(a,"dfs"),v(r.children(),a),n}var wX=b(()=>{WY(),me(vX,"parentDummyChains"),me(xX,"findPath"),me(bX,"postorder")});function kX(c,t){var h={};function e(t,n){var a=0,s=0,o=t.length,l=PU(n);return v(n,function(t,e){var r=EX(c,t),i=r?c.node(r).order:o;!r&&t!==l||(v(n.slice(s,e+1),function(n){v(c.predecessors(n),function(t){var e=c.node(t),r=e.order;!(r<a||i<r)||e.dummy&&c.node(n).dummy||CX(h,t,n)})}),s=e+1,a=i)}),n}return me(e,"visitLayer"),nY(t,e),h}function TX(o,t){var s={};function l(e,t,r,n,i){var a;v(KW(t,r),function(t){a=e[t],o.node(a).dummy&&v(o.predecessors(a),function(t){var e=o.node(t);e.dummy&&(e.order<n||e.order>i)&&CX(s,t,a)})})}function e(r,n){var i,a=-1,s=0;return v(n,function(t,e){"border"===o.node(t).dummy&&(t=o.predecessors(t)).length&&(i=o.node(t[0]).order,l(n,s,e,a,i),s=e,a=i),l(n,s,n.length,i,r.length)}),n}return me(l,"scan"),me(e,"visitLayer"),nY(t,e),s}function EX(e,t){if(e.node(t).dummy)return vq(e.predecessors(t),function(t){return e.node(t).dummy})}function CX(t,e,r){r<e&&(n=e,e=r,r=n);var n=t[e];n||(t[e]=n={}),n[r]=!0}function SX(t,e,r){var n;return r<e&&(n=e,e=r,r=n),!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function _X(t,e,o,l){var c={},h={},u={};return v(e,function(t){v(t,function(t,e){u[h[c[t]=t]=t]=e})}),v(e,function(t){var s=-1;v(t,function(t){var e=l(t);if(e.length)for(var r=((e=yY(e,function(t){return u[t]})).length-1)/2,n=Math.floor(r),i=Math.ceil(r);n<=i;++n){var a=e[n];h[t]===t&&s<u[a]&&!SX(o,t,a)&&(h[a]=t,h[t]=c[t]=c[a],s=u[a])}})}),{root:c,align:h}}function AX(n,t,e,r,i){var a={},s=LX(n,t,e,i),o=i?"borderLeft":"borderRight";function l(t,e){for(var r=s.nodes(),n=r.pop(),i={};n;)i[n]?t(n):(i[n]=!0,r.push(n),r=r.concat(e(n))),n=r.pop()}function c(t){a[t]=s.inEdges(t).reduce(function(t,e){return Math.max(t,a[e.v]+s.edge(e))},0)}function h(t){var e=s.outEdges(t).reduce(function(t,e){return Math.min(t,a[e.w]-s.edge(e))},Number.POSITIVE_INFINITY),r=n.node(t);e!==Number.POSITIVE_INFINITY&&r.borderType!==o&&(a[t]=Math.max(a[t],e))}return me(l,"iterate"),me(c,"pass1"),me(h,"pass2"),l(c,s.predecessors.bind(s)),l(h,s.successors.bind(s)),v(r,function(t){a[t]=a[e[t]]}),a}function LX(a,t,s,e){var o=new QY,r=a.graph(),l=DX(r.nodesep,r.edgesep,e);return v(t,function(t){var i;v(t,function(t){var e,r,n=s[t];o.setNode(n),i&&(e=s[i],r=o.edge(e,n),o.setEdge(e,n,Math.max(l(a,t,i),r||0))),i=t})}),o}function NX(i,t){return Hj(oj(t),function(t){var r=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return Dq(t,function(t,e){e=OX(i,e)/2,r=Math.max(t+e,r),n=Math.min(t-e,n)}),r-n})}function IX(s,o){var t=oj(o),l=jj(t),c=Gj(t);v(["u","d"],function(a){v(["l","r"],function(t){var e,r,n=a+t,i=s[n];i!==o&&(e=oj(i),r="l"===t?l-jj(e):c-Gj(e))&&(s[n]=Oj(i,function(t){return t+r}))})})}function RX(r,n){return Oj(r.ul,function(t,e){return n?r[n.toLowerCase()][e]:((e=yY(x(r,e)))[1]+e[2])/2})}function MX(n){var i,t=bH(n),a=dC(kX(n,t),TX(n,t)),s={},e=(v(["u","d"],function(r){i="u"===r?t:oj(t).reverse(),v(["l","r"],function(t){"r"===t&&(i=x(i,function(t){return oj(t).reverse()}));var e=("u"===r?n.predecessors:n.successors).bind(n),e=_X(0,i,a,e),e=AX(n,i,e.root,e.align,"r"===t);"r"===t&&(e=Oj(e,function(t){return-t})),s[r+t]=e})}),NX(n,s));return IX(s,e),RX(s,n.graph().align)}function DX(s,o,l){return function(t,e,r){var n,i=t.node(e),a=t.node(r),e=0;if(e+=i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":n=-i.width/2;break;case"r":n=i.width/2}if(n&&(e+=l?n:-n),n=0,e=(e=(e+=(i.dummy?o:s)/2)+(a.dummy?o:s)/2)+a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":n=a.width/2;break;case"r":n=-a.width/2}return n&&(e+=l?n:-n),n=0,e}}function OX(t,e){return t.node(e).width}var PX=b(()=>{WY(),tH(),AH(),me(kX,"findType1Conflicts"),me(TX,"findType2Conflicts"),me(EX,"findOtherInnerSegmentNode"),me(CX,"addConflict"),me(SX,"hasConflict"),me(_X,"verticalAlignment"),me(AX,"horizontalCompaction"),me(LX,"buildBlockGraph"),me(NX,"findSmallestWidthAlignment"),me(IX,"alignCoordinates"),me(RX,"balance"),me(MX,"positionX"),me(DX,"sep"),me(OX,"width")});function BX(r){$X(r=vH(r)),Bq(MX(r),function(t,e){r.node(e).x=t})}function $X(r){var t=bH(r),n=r.graph().ranksep,i=0;v(t,function(t){var e=Gj(x(t,function(t){return r.node(t).height}));v(t,function(t){r.node(t).y=i+e/2}),i+=e+n})}var FX=b(()=>{WY(),AH(),PX(),me(BX,"position"),me($X,"positionY")});function zX(e,t){var r=t&&t.debugTiming?SH:_H;r("layout",()=>{var t=r(" buildLayoutGraph",()=>qX(e));r(" runLayout",()=>GX(t,r)),r(" updateInputGraph",()=>UX(e,t))})}function GX(t,e){e(" makeSpaceForEdgeLabels",()=>jX(t)),e(" removeSelfEdges",()=>JX(t)),e(" acyclic",()=>dH(t)),e(" nestingGraph.run",()=>BV(t)),e(" rank",()=>RV(vH(t))),e(" injectEdgeLabelProxies",()=>WX(t)),e(" removeEmptyRanks",()=>kH(t)),e(" nestingGraph.cleanup",()=>GV(t)),e(" normalizeRanks",()=>wH(t)),e(" assignRankMinMax",()=>YX(t)),e(" removeEdgeLabelProxies",()=>HX(t)),e(" normalize.run",()=>GH(t)),e(" parentDummyChains",()=>vX(t)),e(" addBorderSegments",()=>LH(t)),e(" order",()=>pX(t)),e(" insertSelfEdges",()=>tK(t)),e(" adjustCoordinateSystem",()=>RH(t)),e(" position",()=>BX(t)),e(" positionSelfEdges",()=>eK(t)),e(" removeBorderNodes",()=>QX(t)),e(" normalize.undo",()=>qH(t)),e(" fixupEdgeLabelCoords",()=>KX(t)),e(" undoCoordinateSystem",()=>MH(t)),e(" translateGraph",()=>VX(t)),e(" assignNodeIntersects",()=>XX(t)),e(" reversePoints",()=>ZX(t)),e(" acyclic.undo",()=>gH(t))}function UX(n,i){v(n.nodes(),function(t){var e=n.node(t),r=i.node(t);e&&(e.x=r.x,e.y=r.y,i.children(t).length)&&(e.width=r.width,e.height=r.height)}),v(n.edges(),function(t){var e=n.edge(t),t=i.edge(t);e.points=t.points,Object.prototype.hasOwnProperty.call(t,"x")&&(e.x=t.x,e.y=t.y)}),n.graph().width=i.graph().width,n.graph().height=i.graph().height}function qX(r){var n=new QY({multigraph:!0,compound:!0}),t=nK(r.graph());return n.setGraph(dC({},aK,rK(t,iK),FW(t,sK))),v(r.nodes(),function(t){var e=nK(r.node(t));n.setNode(t,kU(rK(e,oK),lK)),n.setParent(t,r.parent(t))}),v(r.edges(),function(t){var e=nK(r.edge(t));n.setEdge(t,dC({},hK,rK(e,cK),FW(e,uK)))}),n}function jX(e){var r=e.graph();r.ranksep/=2,v(e.edges(),function(t){(t=e.edge(t)).minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function WX(r){v(r.edges(),function(t){var e=r.edge(t);e.width&&e.height&&(e=r.node(t.v),e={rank:(r.node(t.w).rank-e.rank)/2+e.rank,e:t},mH(r,"edge-proxy",e,"_ep"))})}function YX(e){var r=0;v(e.nodes(),function(t){(t=e.node(t)).borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,r=Gj(r,t.maxRank))}),e.graph().maxRank=r}function HX(r){v(r.nodes(),function(t){var e=r.node(t);"edge-proxy"===e.dummy&&(r.edge(e.e).labelRank=e.rank,r.removeNode(t))})}function VX(e){var i=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,t=e.graph(),r=t.marginx||0,n=t.marginy||0;function l(t){var e=t.x,r=t.y,n=t.width,t=t.height;i=Math.min(i,e-n/2),a=Math.max(a,e+n/2),s=Math.min(s,r-t/2),o=Math.max(o,r+t/2)}me(l,"getExtremes"),v(e.nodes(),function(t){l(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),Object.prototype.hasOwnProperty.call(t,"x")&&l(t)}),i-=r,s-=n,v(e.nodes(),function(t){(t=e.node(t)).x-=i,t.y-=s}),v(e.edges(),function(t){t=e.edge(t),v(t.points,function(t){t.x-=i,t.y-=s}),Object.prototype.hasOwnProperty.call(t,"x")&&(t.x-=i),Object.prototype.hasOwnProperty.call(t,"y")&&(t.y-=s)}),t.width=a-i+r,t.height=o-s+n}function XX(a){v(a.edges(),function(t){var e,r=a.edge(t),n=a.node(t.v),t=a.node(t.w),i=r.points?(e=r.points[0],r.points[r.points.length-1]):(r.points=[],e=t,n);r.points.unshift(xH(n,e)),r.points.push(xH(t,i))})}function KX(r){v(r.edges(),function(t){var e=r.edge(t);if(Object.prototype.hasOwnProperty.call(e,"x"))switch("l"!==e.labelpos&&"r"!==e.labelpos||(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}})}function ZX(e){v(e.edges(),function(t){(t=e.edge(t)).reversed&&t.points.reverse()})}function QX(a){v(a.nodes(),function(t){var e,r,n,i;a.children(t).length&&(t=a.node(t),e=a.node(t.borderTop),r=a.node(t.borderBottom),n=a.node(PU(t.borderLeft)),i=a.node(PU(t.borderRight)),t.width=Math.abs(i.x-n.x),t.height=Math.abs(r.y-e.y),t.x=n.x+t.width/2,t.y=e.y+t.height/2)}),v(a.nodes(),function(t){"border"===a.node(t).dummy&&a.removeNode(t)})}function JX(r){v(r.edges(),function(t){var e;t.v===t.w&&((e=r.node(t.v)).selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:t,label:r.edge(t)}),r.removeEdge(t))})}function tK(i){var t=bH(i);v(t,function(t){var n=0;v(t,function(t,e){var r=i.node(t);r.order=e+n,v(r.selfEdges,function(t){mH(i,"selfedge",{width:t.label.width,height:t.label.height,rank:r.rank,order:e+ ++n,e:t.e,label:t.label},"_se")}),delete r.selfEdges})})}function eK(s){v(s.nodes(),function(t){var e,r,n,i,a=s.node(t);"selfedge"===a.dummy&&(e=(i=s.node(a.e.v)).x+i.width/2,r=i.y,n=a.x-e,i=i.height/2,s.setEdge(a.e,a.label),s.removeNode(t),a.label.points=[{x:e+2*n/3,y:r-i},{x:e+5*n/6,y:r-i},{x:e+n,y:r},{x:e+5*n/6,y:r+i},{x:e+2*n/3,y:r+i}],a.label.x=a.x,a.label.y=a.y)})}function rK(t,e){return Oj(FW(t,e),Number)}function nK(t){var r={};return v(t,function(t,e){r[e.toLowerCase()]=t}),r}var iK,aK,sK,oK,lK,cK,hK,uK,dK=b(()=>{WY(),tH(),IH(),zH(),fH(),jH(),PV(),UV(),yX(),wX(),FX(),AH(),me(zX,"layout"),me(GX,"runLayout"),me(UX,"updateInputGraph"),iK=["nodesep","edgesep","ranksep","marginx","marginy"],aK={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},sK=["acyclicer","ranker","rankdir","align"],oK=["width","height"],lK={width:0,height:0},cK=["minlen","weight","width","height","labeloffset"],hK={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},uK=["labelpos"],me(qX,"buildLayoutGraph"),me(jX,"makeSpaceForEdgeLabels"),me(WX,"injectEdgeLabelProxies"),me(YX,"assignRankMinMax"),me(HX,"removeEdgeLabelProxies"),me(VX,"translateGraph"),me(XX,"assignNodeIntersects"),me(KX,"fixupEdgeLabelCoords"),me(ZX,"reversePointsForReversedEdges"),me(QX,"removeBorderNodes"),me(JX,"removeSelfEdges"),me(tK,"insertSelfEdges"),me(eK,"positionSelfEdges"),me(rK,"selectNumberAttrs"),me(nK,"canonicalize")}),pK=b(()=>{fH(),dK(),jH(),PV()});function gK(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:fK(t),edges:mK(t)};return Lj(t.graph())||(e.value=mz(t.graph())),e}function fK(n){return x(n.nodes(),function(t){var e=n.node(t),r=n.parent(t),t={v:t};return Lj(e)||(t.value=e),Lj(r)||(t.parent=r),t})}function mK(n){return x(n.edges(),function(t){var e=n.edge(t),r={v:t.v,w:t.w};return Lj(t.name)||(r.name=t.name),Lj(e)||(r.value=e),r})}var yK,vK,xK,bK,wK,kK,TK,EK,CK,SK,_K,AK,LK,NK,IK,RK=b(()=>{WY(),JY(),me(gK,"write"),me(fK,"writeNodes"),me(mK,"writeEdges")}),MK=b(()=>{t(),tH(),RK(),yK=new Map,vK=new Map,xK=new Map,bK=me(()=>{vK.clear(),xK.clear(),yK.clear()},"clear"),wK=me((t,e)=>{var r=vK.get(e)||[];return D.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),kK=me((t,e)=>{var r=vK.get(e)||[];return D.info("Descendants of ",e," is ",r),D.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||wK(t.v,e)||wK(t.w,e)||r.includes(t.w):(D.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),TK=me((r,n,i,a)=>{D.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var t=n.children(r)||[];r!==a&&t.push(r),D.warn("Copying (nodes) clusterId",r,"nodes",t),t.forEach(t=>{var e;0<n.children(t).length?TK(t,n,i,a):(e=n.node(t),D.info("cp ",t," to ",a," with parent ",r),i.setNode(t,e),a!==n.parent(t)&&(D.warn("Setting parent",t,n.parent(t)),i.setParent(t,n.parent(t))),r!==a&&t!==r?(D.debug("Setting parent",t,r),i.setParent(t,r)):(D.info("In copy ",r,"root",a,"data",n.node(r),a),D.debug("Not Setting parent for node=",t,"cluster!==rootId",r!==a,"node!==clusterId",t!==r)),e=n.edges(t),D.debug("Copying Edges",e),e.forEach(t=>{D.info("Edge",t);var e=n.edge(t.v,t.w,t.name);D.info("Edge data",e,a);try{kK(t,a)?(D.info("Copying as ",t.v,t.w,e,t.name),i.setEdge(t.v,t.w,e,t.name),D.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):D.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",r)}catch(t){D.error(t)}})),D.debug("Removing node",t),n.removeNode(t)})},"copy"),EK=me((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)xK.set(i,t),n=[...n,...EK(i,e)];return n},"extractDescendants"),CK=me((t,e,r)=>{let n=t.edges().filter(t=>t.v===e||t.w===e),i=t.edges().filter(t=>t.v===r||t.w===r),a=n.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),s=i.map(t=>({v:t.v,w:t.w}));return a.filter(e=>s.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),SK=me((t,e,r)=>{var n,i=e.children(t);if(D.trace("Searching children of id ",t,i),i.length<1)return t;let a;for(n of i){var s=SK(n,e,r),o=CK(e,r,s);if(s){if(!(0<o.length))return s;a=s}}return a},"findNonClusterChild"),_K=me(t=>yK.has(t)&&yK.get(t).externalConnections&&yK.has(t)?yK.get(t).id:t,"getAnchorId"),AK=me((a,t)=>{if(!a||10<t)D.debug("Opting out, no graph ");else{D.debug("Opting in, graph "),a.nodes().forEach(function(t){0<a.children(t).length&&(D.warn("Cluster identified",t," Replacement id in edges: ",SK(t,a,t)),vK.set(t,EK(t,a)),yK.set(t,{id:SK(t,a,t),clusterData:a.node(t)}))}),a.nodes().forEach(function(e){var t=a.children(e),r=a.edges();0<t.length?(D.debug("Cluster identified",e,vK),r.forEach(t=>{wK(t.v,e)^wK(t.w,e)&&(D.warn("Edge: ",t," leaves cluster ",e),D.warn("Descendants of XXX ",e,": ",vK.get(e)),yK.get(e).externalConnections=!0)})):D.debug("Not a cluster ",e,vK)});for(var e of yK.keys()){var r=yK.get(e).id;(r=a.parent(r))!==e&&yK.has(r)&&!yK.get(r).externalConnections&&(yK.get(e).id=r)}a.edges().forEach(function(t){var e,r,n,i=a.edge(t);D.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),D.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(a.edge(t))),t.v,D.warn("Fix XXX",yK,"ids:",t.v,t.w,"Translating: ",yK.get(t.v)," --- ",yK.get(t.w)),(yK.get(t.v)||yK.get(t.w))&&(D.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),e=_K(t.v),r=_K(t.w),a.removeEdge(t.v,t.w,t.name),e!==t.v&&(n=a.parent(e),yK.get(n).externalConnections=!0,i.fromCluster=t.v),r!==t.w&&(n=a.parent(r),yK.get(n).externalConnections=!0,i.toCluster=t.w),D.warn("Fix Replacing with XXX",e,r,t.name),a.setEdge(e,r,i,t.name))}),D.warn("Adjusted Graph",gK(a)),LK(a,0),D.trace(yK)}},"adjustClustersAndEdges"),LK=me((r,n)=>{if(D.warn("extractor - ",n,gK(r),r.children("D")),10<n)D.error("Bailing out");else{let t=r.nodes(),e=!1;for(var i of t)i=r.children(i),e=e||0<i.length;if(e){D.debug("Nodes = ",t,n);for(var a of t)if(D.debug("Extracting node",a,yK,yK.has(a)&&!yK.get(a).externalConnections,!r.parent(a),r.node(a),r.children("D")," Depth ",n),yK.has(a))if(!yK.get(a).externalConnections&&r.children(a)&&0<r.children(a).length){D.warn("Cluster without external connections, without a parent and with children",a,n);let t="TB"===r.graph().rankdir?"LR":"TB";yK.get(a)?.clusterData?.dir&&(t=yK.get(a).clusterData.dir,D.warn("Fixing dir",yK.get(a).clusterData.dir,t));var s=new QY({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});D.warn("Old graph before copy",gK(r)),TK(a,r,s,a),r.setNode(a,{clusterNode:!0,id:a,clusterData:yK.get(a).clusterData,label:yK.get(a).label,graph:s}),D.warn("New graph after copy node: (",a,")",gK(s)),D.debug("Old graph after copy",gK(r))}else D.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!yK.get(a).externalConnections," no parent: ",!r.parent(a)," children ",r.children(a)&&0<r.children(a).length,r.children("D"),n),D.debug(yK);else D.debug("Not a cluster",a,n);t=r.nodes(),D.warn("New list of nodes",t);for(var o of t){var l=r.node(o);D.warn(" Now next level",o,l),l?.clusterNode&&LK(l.graph,n+1)}}else D.debug("Done, no node has children",r.nodes())}},"extractor"),NK=me((e,t)=>{if(0===t.length)return[];let r=Object.assign([],t);return t.forEach(t=>{t=e.children(t),t=NK(e,t),r=[...r,...t]}),r},"sorter"),IK=me(t=>NK(t,t.children()),"sortNodesByHierarchy")}),DK={};KBt(DK,{render:()=>PK});var OK,PK,BK=b(()=>{pK(),RK(),tH(),XO(),i(),MK(),rP(),sO(),VO(),t(),aO(),Tu(),OK=me(async(t,i,a,s,o,l)=>{D.warn("Graph in recursive render:XAX",gK(i),o);let c=i.graph().rankdir,n=(D.trace("Dir in recursive render - dir:",c),t=t.insert("g").attr("class","root"),i.nodes()?D.info("Recursive render XXX",i.nodes()):D.info("No nodes found for",i),0<i.edges().length&&D.info("Recursive edges",i.edge(i.edges()[0])),t.insert("g").attr("class","clusters")),h=t.insert("g").attr("class","edgePaths"),r=t.insert("g").attr("class","edgeLabels"),u=t.insert("g").attr("class","nodes"),d=(await Promise.all(i.nodes().map(async function(t){var e,r,n=i.node(t);void 0!==o&&(e=JSON.parse(JSON.stringify(o.clusterData)),D.trace(`Setting data for parent cluster XXX + Node.id = `,t,` + data=`,e.height,` +Parent cluster`,o.height),i.setNode(o.id,e),i.parent(t)||(D.trace("Setting parent",t,o.id),i.setParent(t,o.id,e))),D.info("(Insert) Node XXX"+t+": "+JSON.stringify(i.node(t))),n?.clusterNode?(D.info("Cluster identified XBX",t,n.width,i.node(t)),{ranksep:e,nodesep:r}=i.graph(),n.graph.setGraph({...n.graph.graph(),ranksep:e+25,nodesep:r}),r=(e=await OK(u,n.graph,a,s,i.node(t),l)).elem,aN(n,r),n.diff=e.diff||0,D.info("New compound node after recursive render XAX",t,"width",n.width,"height",n.height),QO(r,n)):0<i.children(t).length?(D.trace("Cluster - the non recursive path XBX",t,n.id,n,n.width,"Graph:",i),D.trace(SK(n.id,i)),yK.set(n.id,{id:SK(n.id,i),node:n})):(D.trace("Node - the non recursive path XAX",t,u,i.node(t),c),await KO(u,i.node(t),{config:l,dir:c}))})),await me(async()=>{var t=i.edges().map(async function(t){var e=i.edge(t.v,t.w,t.name);D.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),D.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),D.info("Fix",yK,"ids:",t.v,t.w,"Translating: ",yK.get(t.v),yK.get(t.w)),await kO(r,e)});await Promise.all(t)},"processEdges")(),D.info("Graph before layout:",JSON.stringify(gK(i))),D.info("############################################# XXX"),D.info("### Layout ### XXX"),D.info("############################################# XXX"),zX(i),D.info("Graph after layout:",JSON.stringify(gK(i))),0),p=YD(l).subGraphTitleTotalMargin;return await Promise.all(IK(i).map(async function(t){var e,r=i.node(t);D.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,D.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,i.parent(t)),yK.get(r.id).node=r,tP(r)):0<i.children(t).length?(D.info("A pure cluster node XBX1",t,r.id,r.x,r.y,r.width,r.height,i.parent(t)),r.height+=p,i.node(r.parentId),t=r?.padding/2||0,e=r?.labelBBox?.height||0,D.debug("OffsetY",e-t||0,"labelHeight",e,"halfPadding",t),await tO(n,r),yK.get(r.id).node=r):(e=i.node(r.parentId),r.y+=p/2,D.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",e,e?.offsetY,r),tP(r))})),i.edges().forEach(function(t){var e=i.edge(t),r=(D.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),i.node(t.v)),t=i.node(t.w),r=LO(h,e,yK,a,r,t,s);TO(e,r)}),i.nodes().forEach(function(t){var e=i.node(t);D.info(t,e.type,e.diff),e.isGroup&&(d=e.diff)}),D.warn("Returning from recursive render XAX",t,d),{elem:t,diff:d}},"recursiveRender"),PK=me(async(t,e)=>{let l=new QY({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=e.select("g");HO(r,t.markers,t.type,t.diagramId),JO(),bO(),eO(),bK(),t.nodes.forEach(t=>{l.setNode(t.id,{...t}),t.parentId&&l.setParent(t.id,t.parentId)}),D.debug("Edges:",t.edges),t.edges.forEach(t=>{var e,r,n,i,a,s,o;t.start===t.end?(r=(e=t.start)+"---"+e+"---1",n=e+"---"+e+"---2",i=l.node(e),l.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,i.parentId),l.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(n,i.parentId),a=structuredClone(t),s=structuredClone(t),o=structuredClone(t),a.label="",a.arrowTypeEnd="none",a.id=e+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-mid",o.label="",i.isGroup&&(a.fromCluster=e,o.toCluster=e),o.id=e+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(e,r,a,e+"-cyclic-special-0"),l.setEdge(r,n,s,e+"-cyclic-special-1"),l.setEdge(n,e,o,e+"-cyc<lic-special-2")):l.setEdge(t.start,t.end,{...t},t.id)}),D.warn("Graph at first:",JSON.stringify(gK(l))),AK(l),D.warn("Graph after XAX:",JSON.stringify(gK(l))),e=O(),await OK(r,l,t.type,t.diagramId,void 0,e)},"render")});function $K(t){return($K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function FK(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zK(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function GK(t,e,r){return e&&zK(t.prototype,e),r&&zK(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function UK(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qK(t,e){return YK(t)||VK(t,e)||XK(t,e)||QK()}function jK(t){return WK(t)||HK(t)||XK(t)||ZK()}function WK(t){if(Array.isArray(t))return KK(t)}function YK(t){if(Array.isArray(t))return t}function HK(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function VK(t,e){var r=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a=[],s=!0,o=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(o)throw i}}return a}}function XK(t,e){var r;if(t)return"string"==typeof t?KK(t,e):"Map"===(r="Object"===(r=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?KK(t,e):void 0}function KK(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ZK(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JK(t,e){var r,n,i,a,s=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s)return n=!(r=!0),{s:me(function(){s=s.call(t)},"s"),n:me(function(){var t=s.next();return r=t.done,t},"n"),e:me(function(t){n=!0,i=t},"e"),f:me(function(){try{r||null==s.return||s.return()}finally{if(n)throw i}},"f")};if(Array.isArray(t)||(s=XK(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),a=0,{s:e=me(function(){},"F"),n:me(function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:me(function(t){throw t},"e"),f:e};throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tZ(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function eZ(t,e){return t(e={exports:{}},e.exports),e.exports}function rZ(t){for(var e=t.length;e--&&Itt.test(t.charAt(e)););return e}function nZ(t){return t&&t.slice(0,Rtt(t)+1).replace(Mtt,"")}function iZ(t){var e=Ott.call(t,Btt),r=t[Btt];try{var n=!(t[Btt]=void 0)}catch{}var i=Ptt.call(t);return n&&(e?t[Btt]=r:delete t[Btt]),i}function aZ(t){return Ftt.call(t)}function sZ(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(Gtt&&Gtt in Object(t)?$tt:ztt)(t)}function oZ(t){return null!=t&&"object"==typeof t}function lZ(t){return"symbol"==typeof t||qtt(t)&&"[object Symbol]"==Utt(t)}function cZ(t){if("number"==typeof t)return t;if(jtt(t))return Wtt;if(_tt(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=_tt(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=Dtt(t);var e=Htt.test(t);return e||Vtt.test(t)?Xtt(t.slice(2),e?2:8):Ytt.test(t)?Wtt:+t}function hZ(n,r,t){var i,a,s,o,l,c,h=0,e=!1,u=!1,d=!0;if("function"!=typeof n)throw new TypeError("Expected a function");function p(t){var e=i,r=a;return i=a=void 0,h=t,o=n.apply(r,e)}function g(t){return h=t,l=setTimeout(y,r),e?p(t):o}function f(t){var e=r-(t-c);return u?Qtt(e,s-(t-h)):e}function m(t){var e=t-c;return void 0===c||r<=e||e<0||u&&s<=t-h}function y(){var t=Ntt();if(m(t))return v(t);l=setTimeout(y,f(t))}function v(t){return l=void 0,d&&i?p(t):(i=a=void 0,o)}function x(){void 0!==l&&clearTimeout(l),i=c=a=l=void(h=0)}function b(){return void 0===l?o:v(Ntt())}function w(){var t=Ntt(),e=m(t);if(i=arguments,a=this,c=t,e){if(void 0===l)return g(c);if(u)return clearTimeout(l),l=setTimeout(y,r),p(c)}return void 0===l&&(l=setTimeout(y,r)),o}return r=Ktt(r)||0,_tt(t)&&(e=!!t.leading,u="maxWait"in t,s=u?Ztt(Ktt(t.maxWait)||0,r):s,d="trailing"in t?!!t.trailing:d),me(p,"invokeFunc"),me(g,"leadingEdge"),me(f,"remainingWait"),me(m,"shouldInvoke"),me(y,"timerExpired"),me(v,"trailingEdge"),me(x,"cancel"),me(b,"flush"),me(w,"debounced"),w.cancel=x,w.flush=b,w}function uZ(t,e,r,n,i,a){var s=HJ(t)?t:_nt[t]||_nt.euclidean;return 0===e&&HJ(t)?s(i,a):s(e,r,n,i,a)}function dZ(t,e){var r;return!pit(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!jtt(t))||fit.test(t)||!git.test(t)||null!=e&&t in Object(e))}function pZ(t){return!!_tt(t)&&("[object Function]"==(t=Utt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function gZ(t){return!!vit&&vit in t}function fZ(t){if(null!=t){try{return bit.call(t)}catch{}try{return t+""}catch{}}return""}function mZ(t){return!(!_tt(t)||xit(t))&&(yit(t)?Tit:kit).test(wit(t))}function yZ(t,e){return t?.[e]}function vZ(t,e){return t=Cit(t,e),Eit(t)?t:void 0}function xZ(){this.__data__=_it?_it(null):{},this.size=0}function bZ(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function wZ(t){var e,r=this.__data__;return _it?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:Ait.call(r,t)?r[t]:void 0}function kZ(t){var e=this.__data__;return _it?void 0!==e[t]:Lit.call(e,t)}function TZ(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=_it&&void 0===e?"__lodash_hash_undefined__":e,this}function EZ(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function CZ(){this.__data__=[],this.size=0}function SZ(t,e){return t===e||t!=t&&e!=e}function _Z(t,e){for(var r=t.length;r--;)if(Iit(t[r][0],e))return r;return-1}function AZ(t){var e=this.__data__;return!((t=Rit(e,t))<0||(t==e.length-1?e.pop():Mit.call(e,t,1),--this.size,0))}function LZ(t){var e=this.__data__;return(t=Rit(e,t))<0?void 0:e[t][1]}function NZ(t){return-1<Rit(this.__data__,t)}function IZ(t,e){var r=this.__data__,n=Rit(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function RZ(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function MZ(){this.size=0,this.__data__={hash:new Nit,map:new(Oit||Dit),string:new Nit}}function DZ(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function OZ(t,e){return t=t.__data__,Pit(e)?t["string"==typeof e?"string":"hash"]:t.map}function PZ(t){return t=Bit(this,t).delete(t),this.size-=t?1:0,t}function BZ(t){return Bit(this,t).get(t)}function $Z(t){return Bit(this,t).has(t)}function FZ(t,e){var r=Bit(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function zZ(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function GZ(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(Fit);var a=me(function(){var t=arguments,e=i?i.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=n.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(GZ.Cache||$it),a}function UZ(t){var e=(t=zit(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}function qZ(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function jZ(t){var e;return"string"==typeof t?t:pit(t)?jit(t,jZ)+"":jtt(t)?Yit?Yit.call(t):"":"0"==(e=t+"")&&1/t==-Wit?"-0":e}function WZ(t){return null==t?"":Hit(t)}function YZ(t,e){return pit(t)?t:mit(t,e)?[t]:qit(Vit(t))}function HZ(t){var e;return"string"==typeof t||jtt(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}function VZ(t,e){for(var r=0,n=(e=Xit(e,t)).length;null!=t&&r<n;)t=t[Kit(e[r++])];return r&&r==n?t:void 0}function XZ(t,e,r){return void 0===(t=null==t?void 0:Zit(t,e))?r:t}function KZ(t,e,r){"__proto__"==e&&Jit?Jit(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ZZ(t,e,r){var n=t[e];eat.call(t,e)&&Iit(n,r)&&(void 0!==r||e in t)||tat(t,e,r)}function QZ(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&nat.test(t))&&-1<t&&t%1==0&&t<e}function JZ(t,e,r,n){if(_tt(t))for(var i=-1,a=(e=Xit(e,t)).length,s=a-1,o=t;null!=o&&++i<a;){var l,c=Kit(e[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;i!=s&&(l=o[c],void 0===(h=n?n(l,c,o):void 0))&&(h=_tt(l)?l:iat(e[i+1])?[]:{}),rat(o,c,h),o=o[c]}return t}function tQ(t,e,r){return null==t?t:aat(t,e,r)}function eQ(t,e){var r=-1,n=t.length;for(e=e||Array(n);++r<n;)e[r]=t[r];return e}function rQ(t){return pit(t)?jit(t,Kit):jtt(t)?[t]:oat(qit(Vit(t)))}function nQ(t,e,r,n){for(var i=[],a=new Get,s=t.cy().hasCompoundNodes(),o=0;o<t.length;o++){var l=t[o];r?i.push(l):s&&n(i,a,l)}for(;0<i.length;){var c=i.shift();e(c),a.add(c.id()),s&&n(i,a,c)}return t}function iQ(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i<n.length;i++){var a=n[i];e.has(a.id())||t.push(a)}}function aQ(t,e,r){r.isChild()&&(r=r._private.parent,e.has(r.id())||t.push(r))}function sQ(t,e,r){aQ(t,e,r),iQ(t,e,r)}function oQ(s){return function(t){if(void 0===t&&(t=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var e=0,r=this[0],n=r._private.edges,i=0;i<n.length;i++){var a=n[i];!t&&a.isLoop()||(e+=s(r,a))}return e}}}function lQ(a,s){return function(t){for(var e,r=this.nodes(),n=0;n<r.length;n++){var i=r[n][a](t);void 0===i||void 0!==e&&!s(i,e)||(e=i)}return e}}function cQ(){return!1}function hQ(){return!0}function uQ(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:tst,e=1<arguments.length?arguments[1]:void 0,r=0;r<Jat.length;r++){var n=Jat[r];this[n]=t[n]||Qat[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}function dQ(t,e,r){var n,i=r._private;return null==(n=(i=i.styleCache=i.styleCache||[])[t])?i[t]=e(r):n}function pQ(e,r){return e=pet(e),me(function(t){return dQ(e,r,t)},"cachedStyleFunction")}function gQ(e,r){e=pet(e);var n=me(function(t){return r.call(t)},"selfFn");return me(function(){var t=this[0];if(t)return dQ(e,n,t)},"cachedPrototypeStyleFunction")}function fQ(t,e){var r=t._private.data.parent?t.parents():null;if(r)for(var n=0;n<r.length;n++)if(!e(r[n]))return!1;return!0}function mQ(t){var n=t.ok,i=t.edgeOkViaNode||t.ok,a=t.parentOk||t.ok;return function(){var t,e,r=this.cy();return!r.styleEnabled()||(t=this[0],r=r.hasCompoundNodes(),t?(e=t._private,!!n(t)&&(t.isNode()?!r||fQ(t,a):(t=e.source,e=e.target,i(t)&&(!r||fQ(t,i))&&(t===e||i(e)&&(!r||fQ(e,i)))))):void 0)}}function yQ(l){return function(){var t=[];if(2===(e=arguments).length)this.on(l.event,e[0],e[1]);else if(1===e.length&&HJ(e[0]))this.on(l.event,e[0]);else if(0===e.length||1===e.length&&VJ(e[0])){for(var e=1===e.length?e[0]:null,r=0;r<this.length;r++){var n=this[r],i=!l.ableField||n._private[l.ableField],a=n._private[l.field]!=l.value;if(l.overrideAble){var s=l.overrideAble(n);if(void 0!==s&&!(i=s))return this}i&&(n._private[l.field]=l.value,a)&&t.push(n)}var o=this.spawn(t);o.updateStyle(),o.emit(l.event),e&&o.emit(e)}return this}}function vQ(r){hst[r.field]=function(){var t=this[0];if(t){if(r.overrideField){var e=r.overrideField(t);if(void 0!==e)return e}return t._private[r.field]}},hst[r.on]=yQ({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),hst[r.off]=yQ({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}function xQ(i){return me(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r]._private[i.attr];n&&e.push(n)}return this.spawn(e,!0).filter(t)},"sourceImpl")}function bQ(h){return me(function(t){var e=[],r=this._private.cy,n=h||{};YJ(t)&&(t=r.$(t));for(var i=0;i<t.length;i++)for(var a=t[i]._private.edges,s=0;s<a.length;s++){var o=a[s],l=o._private.data,c=this.hasElementWithId(l.source)&&t.hasElementWithId(l.target),l=t.hasElementWithId(l.source)&&this.hasElementWithId(l.target);!c&&!l||(n.thisIsSrc||n.thisIsTgt)&&(n.thisIsSrc&&!c||n.thisIsTgt&&!l)||e.push(o)}return this.spawn(e,!0)},"edgesWithImpl")}function wQ(f){return f=vtt({},{codirected:!1},f),me(function(t){for(var e=[],r=this.edges(),n=f,i=0;i<r.length;i++)for(var a=r[i]._private,s=a.source,o=s._private.data.id,l=a.data.target,c=s._private.edges,h=0;h<c.length;h++){var u=c[h],d=(p=u._private.data).target,p=p.source,g=d===l&&p===o;(n.codirected&&g||!n.codirected&&(g||o===d&&l===p))&&e.push(u)}return this.spawn(e,!0).filter(t)},"parallelEdgesImpl")}function kQ(s,e,o,r){var t=typeof Float32Array<"u";if(4!==arguments.length)return!1;for(var n=0;n<4;++n)if("number"!=typeof arguments[n]||isNaN(arguments[n])||!isFinite(arguments[n]))return!1;s=Math.min(s,1),o=Math.min(o,1),s=Math.max(s,0),o=Math.max(o,0);var a=new(t?Float32Array:Array)(11);function i(t,e){return 1-3*e+3*t}function l(t,e,r){return((i(e,r)*t+(3*r-6*e))*t+3*e)*t}function c(t,e,r){return 3*i(e,r)*t*t+2*(3*r-6*e)*t+3*e}function h(t,e){for(var r=0;r<4;++r){var n=c(e,s,o);if(0===n)return e;e-=(l(e,s,o)-t)/n}return e}function u(){for(var t=0;t<11;++t)a[t]=l(.1*t,s,o)}function d(t,e,r){for(var n,i,a=0;0<(n=l(i=e+(r-e)/2,s,o)-t)?r=i:e=i,1e-7<Math.abs(n)&&++a<10;);return i}function p(t){for(var e=0,r=1;10!==r&&a[r]<=t;++r)e+=.1;var n=e+(t-a[--r])/(a[r+1]-a[r])*.1,i=c(n,s,o);return.001<=i?h(t,n):0===i?n:d(t,e,e+.1)}me(i,"A"),me(function(t,e){return 3*e-6*t},"B"),me(function(t){return 3*t},"C"),me(l,"calcBezier"),me(c,"getSlope"),me(h,"newtonRaphsonIterate"),me(u,"calcSampleValues"),me(d,"binarySubdivide"),me(p,"getTForX");var g=!1;function f(){g=!0,s===e&&o===r||u()}me(f,"precompute"),(t=me(function(t){return g||f(),s===e&&o===r?t:0===t?0:1===t?1:l(p(t),e,r)},"f")).getControlPoints=function(){return[{x:s,y:e},{x:o,y:r}]};var m="generateBezier("+[s,e,o,r]+")";return t.toString=function(){return m},t}function TQ(t,e,r,n,i){return 1===n||e===r?r:(i=i(e,r,n),null!=t&&((t.roundValue||t.color)&&(i=Math.round(i)),void 0!==t.min&&(i=Math.max(i,t.min)),void 0!==t.max)?Math.min(i,t.max):i)}function EQ(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function CQ(t,e,r,n,i){var a=null!=i?i.type:null,s=(r<0?r=0:1<r&&(r=1),EQ(t,i)),o=EQ(e,i);if(at(s)&&at(o))return TQ(a,s,o,r,n);if(VJ(s)&&VJ(o)){for(var l=[],c=0;c<o.length;c++){var h=s[c],u=o[c];null!=h&&null!=u?(h=TQ(a,h,u,r,n),l.push(h)):l.push(u)}return l}}function SQ(t,e,r,n){var i=!n,a=t._private,s=e._private,e=s.easing,o=s.startTime,l=(n?t:t.cy()).style(),c=(s.easingImpl||(null==e?s.easingImpl=gst.linear:(e=YJ(e)?l.parse("transition-timing-function",e).value:e,0<(e=YJ(e)?(u=e,[]):(u=e[1],e.slice(2).map(function(t){return+t}))).length?("spring"===u&&e.push(s.duration),s.easingImpl=gst[u].apply(null,e)):s.easingImpl=gst[u])),s.easingImpl),h=0===s.duration?1:(r-o)/s.duration;if((h=s.applying?s.progress:h)<0?h=0:1<h&&(h=1),null==s.delay){var e=s.startPosition,o=((u=s.position)&&i&&!t.locked()&&(r={},_Q(e.x,u.x)&&(r.x=CQ(e.x,u.x,h,c)),_Q(e.y,u.y)&&(r.y=CQ(e.y,u.y,h,c)),t.position(r)),s.startPan),e=s.pan,u=a.pan,u=((r=null!=e&&n)&&(_Q(o.x,e.x)&&(u.x=CQ(o.x,e.x,h,c)),_Q(o.y,e.y)&&(u.y=CQ(o.y,e.y,h,c)),t.emit("pan")),s.startZoom),d=((e=null!=(o=s.zoom)&&n)&&(_Q(u,o)&&(a.zoom=frt(a.minZoom,CQ(u,o,h,c),a.maxZoom)),t.emit("zoom")),(r||e)&&t.emit("viewport"),s.style);if(d&&0<d.length&&i){for(var p=0;p<d.length;p++){var g=(m=d[p]).name,f=s.startStyle[g],m=CQ(f,m,h,c,l.properties[f.name]);l.overrideBypass(t,g,m)}t.emit("style")}}return s.progress=h}function _Q(t,e){return!(null==t||null==e||!(at(t)&&at(e)||t&&e))}function AQ(t,e,r,n){(e=e._private).started=!0,e.startTime=r-e.progress*e.duration}function LQ(h,t){var e=t._private.aniEles,u=[];function r(t,e){var r,n=(i=t._private).animation.current,i=i.animation.queue,a=!1;0===n.length&&(r=i.shift())&&n.push(r);for(var s=me(function(t){for(var e=t.length-1;0<=e;e--)(0,t[e])();t.splice(0,t.length)},"callbacks"),o=n.length-1;0<=o;o--){var l=n[o],c=l._private;c.stopped?(n.splice(o,1),c.hooked=!1,c.playing=!1,c.started=!1,s(c.frames)):(c.playing||c.applying)&&(c.playing&&c.applying&&(c.applying=!1),c.started||AQ(0,l,h),SQ(t,l,h,e),c.applying&&(c.applying=!1),s(c.frames),null!=c.step&&c.step(h),l.completed()&&(n.splice(o,1),c.hooked=!1,c.playing=!1,c.started=!1,s(c.completes)),a=!0)}return e||0!==n.length||0!==i.length||u.push(t),a}me(r,"stepOne");for(var n=!1,i=0;i<e.length;i++)var a=r(e[i]),n=n||a;var s=r(t,!0);(n||s)&&(0<e.length?t.notify("draw",e):t.notify("draw")),e.unmerge(u),t.emit("step")}function NQ(t){this.options=vtt({},Tst,Est,t)}function IQ(t){this.options=vtt({},_st,t)}function RQ(t){this.options=vtt({},Ast,t)}function MQ(t){this.options=vtt({},Nst,t);var i=(this.options.layout=this).options.eles.nodes(),t=this.options.eles.edges().filter(function(t){var e=t.source().data("id"),r=t.target().data("id"),t=i.some(function(t){return t.data("id")===e}),n=i.some(function(t){return t.data("id")===r});return!t||!n});this.options.eles=this.options.eles.not(t)}function DQ(t){this.options=vtt({},Kst,t)}function OQ(t){this.options=vtt({},Zst,t)}function PQ(t){this.options=vtt({},Qst,t)}function BQ(t){this.options=vtt({},Jst,t)}function $Q(t){this.options=t,this.notifications=0}function FQ(t,e){0===e.radius?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function zQ(t,e,r,n){return 0===n||0===e.radius?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(xot(t,e,r,n,!(4<arguments.length&&void 0!==arguments[4])||arguments[4]),{cx:eot,cy:rot,radius:lot,startX:dot,startY:pot,stopX:got,stopY:fot,startAngle:not.ang+Math.PI/2*aot,endAngle:iot.ang-Math.PI/2*aot,counterClockwise:sot})}function GQ(t){var e=[];if(null!=t){for(var r=0;r<t.length;r+=2)e.push({x:t[r],y:t[r+1]});return e}}function UQ(t,e,r){for(var n=me(function(t,e,r,n){return drt(t,e,r,n)},"qbezierAt$1"),i=e._private.rstyle.bezierPts,a=0;a<t.bezierProjPcts.length;a++){var s=t.bezierProjPcts[a];i.push({x:n(r[0],r[2],r[4],s),y:n(r[1],r[3],r[5],s)})}}function qQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y)}}function jQ(t,e,r){for(var n,i=0;i<e.length;i++){var a=e[i];0===i&&(n=a),t.lineTo(a.x,a.y)}t.quadraticCurveTo(r.x,r.y,n.x,n.y)}function WQ(t,e,r){t.beginPath&&t.beginPath();for(var n=e,i=0;i<n.length;i++){var a=n[i];t.lineTo(a.x,a.y)}var s=r,e=r[0];for(t.moveTo(e.x,e.y),i=1;i<s.length;i++)a=s[i],t.lineTo(a.x,a.y);t.closePath&&t.closePath()}function YQ(t,e,r,n,i){t.beginPath&&t.beginPath(),t.arc(r,n,i,0,2*Math.PI,!1);var a=e,r=a[0];t.moveTo(r.x,r.y);for(var s=0;s<a.length;s++){var o=a[s];t.lineTo(o.x,o.y)}t.closePath&&t.closePath()}function HQ(t,e,r,n){t.arc(e,r,n,0,2*Math.PI,!1)}function VQ(t,e,r,n,i){var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:5,s=6<arguments.length?arguments[6]:void 0;t.beginPath(),t.moveTo(e+a,r),t.lineTo(e+n-a,r),t.quadraticCurveTo(e+n,r,e+n,r+a),t.lineTo(e+n,r+i-a),t.quadraticCurveTo(e+n,r+i,e+n-a,r+i),t.lineTo(e+a,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a),t.lineTo(e,r+a),t.quadraticCurveTo(e,r,e+a,r),t.closePath(),s?t.stroke():t.fill()}function XQ(t,e,r){if(e=t.createShader(e),t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS))return e;throw new Error(t.getShaderInfoLog(e))}function KQ(t,e,r){var e=XQ(t,t.VERTEX_SHADER,e),r=XQ(t,t.FRAGMENT_SHADER,r),n=t.createProgram();if(t.attachShader(n,e),t.attachShader(n,r),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS))return n;throw new Error("Could not initialize shaders")}function ZQ(t,e,r){var n=t.makeOffscreenCanvas(e,r=void 0===r?e:r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function QQ(t){var e=t.pixelRatio;return{zoom:t.cy.zoom()*e,pan:{x:(t=t.cy.pan()).x*e,y:t.y*e}}}function JQ(t,e,r,n,i){return n=n*r+e.x,i=i*r+e.y,[n,Math.round(t.canvasHeight-i)]}function tJ(t,e,r){var n=t[0]/255,i=t[1]/255,t=t[2]/255;return(r=r||new Array(4))[0]=n*e,r[1]=i*e,r[2]=t*e,r[3]=e,r}function eJ(t,e){return(e=e||new Array(4))[0]=(t>>0&255)/255,e[1]=(t>>8&255)/255,e[2]=(t>>16&255)/255,e[3]=(t>>24&255)/255,e}function rJ(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function nJ(e,t){var r=e.createTexture();return r.buffer=function(t){e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},r.deleteTexture=function(){e.deleteTexture(r)},r}function iJ(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function aJ(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function sJ(t,e,r,n,i,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*n,i);case t.INT:return new Int32Array(r.buffer,a*n,i)}}function oJ(t,e,r,n){var i=(e=qK(iJ(t,e),2))[0],n=aJ(t,e=e[1],n),a=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW),e===t.FLOAT?t.vertexAttribPointer(r,i,e,!1,0,0):e===t.INT&&t.vertexAttribIPointer(r,i,e,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),a}function lJ(e,t,r,n){var i=(r=qK(iJ(e,r),3))[0],a=r[1],r=r[2],s=aJ(e,a,t*i),o=i*r,l=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,t*o,e.DYNAMIC_DRAW),e.enableVertexAttribArray(n),a===e.FLOAT?e.vertexAttribPointer(n,i,a,!1,o,0):a===e.INT&&e.vertexAttribIPointer(n,i,a,o,0),e.vertexAttribDivisor(n,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var c=new Array(t),h=0;h<t;h++)c[h]=sJ(e,a,s,o,i,h);return l.dataArray=s,l.stride=o,l.size=i,l.getView=function(t){return c[t]},l.setPoint=function(t,e,r){(t=c[t])[0]=e,t[1]=r},l.bufferSubData=function(t){e.bindBuffer(e.ARRAY_BUFFER,l),t?e.bufferSubData(e.ARRAY_BUFFER,0,s,0,t*i):e.bufferSubData(e.ARRAY_BUFFER,0,s)},l}function cJ(r){var t=r.createFramebuffer(),n=(r.bindFramebuffer(r.FRAMEBUFFER,t),r.createTexture());return r.bindTexture(r.TEXTURE_2D,n),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n,0),r.bindFramebuffer(r.FRAMEBUFFER,null),t.setFramebufferAttachmentSizes=function(t,e){r.bindTexture(r.TEXTURE_2D,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,t,e,0,r.RGBA,r.UNSIGNED_BYTE,null)},t}function hJ(){var t=new Qot(9);return Qot!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function uJ(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function dJ(t,e,r){var n=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],e=e[8],u=r[0],d=r[1],p=r[2],g=r[3],f=r[4],m=r[5],y=r[6],v=r[7],r=r[8];return t[0]=u*n+d*s+p*c,t[1]=u*i+d*o+p*h,t[2]=u*a+d*l+p*e,t[3]=g*n+f*s+m*c,t[4]=g*i+f*o+m*h,t[5]=g*a+f*l+m*e,t[6]=y*n+v*s+r*c,t[7]=y*i+v*o+r*h,t[8]=y*a+v*l+r*e,t}function pJ(t,e,r){var n=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],e=e[8],u=r[0],r=r[1];return t[0]=n,t[1]=i,t[2]=a,t[3]=s,t[4]=o,t[5]=l,t[6]=u*n+r*s+c,t[7]=u*i+r*o+h,t[8]=u*a+r*l+e,t}function gJ(t,e,r){var n=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],e=e[8],u=Math.sin(r),r=Math.cos(r);return t[0]=r*n+u*s,t[1]=r*i+u*o,t[2]=r*a+u*l,t[3]=r*s-u*n,t[4]=r*o-u*i,t[5]=r*l-u*a,t[6]=c,t[7]=h,t[8]=e,t}function fJ(t,e,r){var n=r[0],r=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function mJ(t,e,r){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function yJ(t,e){return t.intersection?t.intersection(e):new Set(jK(t).filter(function(t){return e.has(t)}))}function vJ(t,e){return"rgba(".concat(t[0],", ").concat(t[1],", ").concat(t[2],", ").concat(e,")")}function xJ(t){return t=t&&t.style&&t.style.backgroundColor||"white",Ttt(t)}function bJ(i){var r=i.render,e=(i.render=function(t){t=t||{};var e=i.cy;i.webgl&&(7.99<e.zoom()?(wJ(i),r.call(i,t)):(kJ(i),NJ(i,t,Jot.SCREEN)))},i.matchCanvasSize),t=(i.matchCanvasSize=function(t){e.call(i,t),i.pickingFrameBuffer.setFramebufferAttachmentSizes(i.canvasWidth,i.canvasHeight),i.pickingFrameBuffer.needsDraw=!0},i.findNearestElements=function(t,e,r,n){return LJ(i,t,e)},i.invalidateCachedZSortedEles),n=(i.invalidateCachedZSortedEles=function(){t.call(i),i.pickingFrameBuffer.needsDraw=!0},i.notify);i.notify=function(t,e){n.call(i,t,e),"viewport"===t||"bounds"===t?i.pickingFrameBuffer.needsDraw=!0:"background"===t&&i.eleDrawing.invalidate(e,{type:"node-body"})}}function wJ(t){(t=t.data.contexts[t.WEBGL]).clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function kJ(e){var t=me(function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()},"clear");t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}function TJ(t){var e=t.canvasWidth,r=t.canvasHeight,n=(t=QQ(t)).pan,t=t.zoom,i=hJ();return pJ(i,i,[n.x,n.y]),fJ(i,i,[t,t]),mJ(n=hJ(),e,r),dJ(t=hJ(),n,i),t}function EJ(t,e){var r=t.canvasWidth,n=t.canvasHeight,i=(t=QQ(t)).pan,t=t.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,n),e.translate(i.x,i.y),e.scale(t,t)}function CJ(e,t){e.drawSelectionRectangle(t,function(t){return EJ(e,t)})}function SJ(t){var e=t.data.contexts[t.NODE];e.save(),EJ(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function _J(u){var t=me(function(t,e,r){for(var t=t.atlasManager.getRenderTypeOpts(e),n=u.data.contexts[u.NODE],i=t.atlasCollection.atlases,a=0;a<i.length;a++){var s=i[a].canvas,o=s.width,l=s.height,c=o*a,h=s.height*r;n.save(),n.scale(.125,.125),n.drawImage(s,c,h),n.strokeStyle="black",n.rect(c,h,o,l),n.stroke(),n.restore()}},"draw");t(u.eleDrawing,"node-body",0),t(u.eleDrawing,"node-label",1)}function AJ(t,e,r,n,i){var a,s,o,l=(c=QQ(t)).pan,c=c.zoom;if(i=void 0===n||void 0===i?(a=(s=qK(JQ(t,l,c,e,r),2))[0]-3,s=s[1]-3,o=6):(r=(e=qK(JQ(t,l,c,e,r),2))[0],e=e[1],c=(l=qK(JQ(t,l,c,n,i),2))[0],a=r,s=n=l[1],o=Math.abs(c-r),Math.abs(n-e)),0===o||0===i)return[];(l=t.data.contexts[t.WEBGL]).bindFramebuffer(l.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(l.viewport(0,0,l.canvas.width,l.canvas.height),NJ(t,null,Jot.PICKING),t.pickingFrameBuffer.needsDraw=!1);var h=o*i,u=new Uint8Array(4*h);l.readPixels(a,s,o,i,l.RGBA,l.UNSIGNED_BYTE,u),l.bindFramebuffer(l.FRAMEBUFFER,null);for(var d=new Set,p=0;p<h;p++){var g=rJ(u.slice(4*p,4*p+4))-1;0<=g&&d.add(g)}return d}function LJ(t,e,r){var n,i,a,e=AJ(t,e,r),s=t.getCachedZSortedEles(),o=JK(e);try{for(o.s();!(a=o.n()).done;){var l=s[a.value];if(!n&&l.isNode()&&(n=l),!i&&l.isEdge()&&(i=l),n&&i)break}}catch(t){o.e(t)}finally{o.f()}return[n,i].filter(Boolean)}function NJ(t,e,r){t.webglDebug&&(i=[],n=performance.now());var n,i,a=t.eleDrawing,s=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&CJ(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var o=me(function(t,e){e+=1,t.isNode()?(a.drawTexture(t,e,"node-underlay"),a.drawTexture(t,e,"node-body"),a.drawTexture(t,e,"node-label"),a.drawTexture(t,e,"node-overlay")):(a.drawEdgeLine(t,e),a.drawEdgeArrow(t,e,"source"),a.drawEdgeArrow(t,e,"target"),a.drawTexture(t,e,"edge-label"))},"draw"),e=t.data.contexts[t.WEBGL],e=(r.screen?(e.clearColor(0,0,0,0),e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)):e.disable(e.BLEND),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.viewport(0,0,e.canvas.width,e.canvas.height),TJ(t)),l=t.getCachedZSortedEles(),s=l.length;if(a.startFrame(e,i,r),r.screen){for(var c=0;c<l.nondrag.length;c++)o(l.nondrag[c],c);for(var h=0;h<l.drag.length;h++)o(l.drag[h],-1)}else if(r.picking)for(var u=0;u<l.length;u++)o(l[u],u);a.endFrame(),t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,a.gc()),r.screen&&t.webglDebugShowAtlases&&(SJ(t),_J(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var d,e=performance.now(),p=0,g=0,f=JK(i);try{for(f.s();!(d=f.n()).done;)p++,g+=d.value.count}catch(t){f.e(t)}finally{f.f()}Math.ceil(e-n),t="".concat(s," elements, ").concat(g," rectangles, ").concat(p," batches"),console.log("WebGL (".concat(r.name,") - ").concat(t))}}function IJ(t,e){for(var r=atob(t),t=new ArrayBuffer(r.length),n=new Uint8Array(t),i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new Blob([t],{type:e})}function RJ(t){var e=t.indexOf(",");return t.substr(e+1)}function MJ(t,n,i){var e=me(function(){return n.toDataURL(i,t.quality)},"getB64Uri");switch(t.output){case"blob-promise":return new uit(function(e,r){try{n.toBlob(function(t){null!=t?e(t):r(new Error("`canvas.toBlob()` sent a null value in its callback"))},i,t.quality)}catch(t){r(t)}});case"blob":return IJ(RJ(e()),i);case"base64":return RJ(e());default:return e()}}function DJ(t){var a=this,e=a.cy.window().document,r=(t.webgl&&(ylt.CANVAS_LAYERS=a.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),a.data={canvases:new Array(ylt.CANVAS_LAYERS),contexts:new Array(ylt.CANVAS_LAYERS),canvasNeedsRedraw:new Array(ylt.CANVAS_LAYERS),bufferCanvases:new Array(ylt.BUFFER_COUNT),bufferContexts:new Array(ylt.CANVAS_LAYERS)},"-webkit-tap-highlight-color"),n="rgba(0,0,0,0)",i=(a.data.canvasContainer=e.createElement("div"),a.data.canvasContainer.style),s=(a.data.canvasContainer.style[r]=n,i.position="relative",i.zIndex="0",i.overflow="hidden",(i=t.cy.container()).appendChild(a.data.canvasContainer),i.style[r]=n,{"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"});ctt()&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var o=0;o<ylt.CANVAS_LAYERS;o++){var l=a.data.canvases[o]=e.createElement("canvas"),c=ylt.CANVAS_TYPES[o];a.data.contexts[o]=l.getContext(c),a.data.contexts[o]||Eet("Could not create canvas of type "+c),Object.keys(s).forEach(function(t){l.style[t]=s[t]}),l.style.position="absolute",l.setAttribute("data-id","layer"+o),l.style.zIndex=String(ylt.CANVAS_LAYERS-o),a.data.canvasContainer.appendChild(l),a.data.canvasNeedsRedraw[o]=!1}for(a.data.topCanvas=a.data.canvases[0],a.data.canvases[ylt.NODE].setAttribute("data-id","layer"+ylt.NODE+"-node"),a.data.canvases[ylt.SELECT_BOX].setAttribute("data-id","layer"+ylt.SELECT_BOX+"-selectbox"),a.data.canvases[ylt.DRAG].setAttribute("data-id","layer"+ylt.DRAG+"-drag"),a.data.canvases[ylt.WEBGL]&&a.data.canvases[ylt.WEBGL].setAttribute("data-id","layer"+ylt.WEBGL+"-webgl"),o=0;o<ylt.BUFFER_COUNT;o++)a.data.bufferCanvases[o]=e.createElement("canvas"),a.data.bufferContexts[o]=a.data.bufferCanvases[o].getContext("2d"),a.data.bufferCanvases[o].style.position="absolute",a.data.bufferCanvases[o].setAttribute("data-id","buffer"+o),a.data.bufferCanvases[o].style.zIndex=String(-o-1),a.data.bufferCanvases[o].style.visibility="hidden";a.pathsEnabled=!0;var h=mrt(),u=me(function(t){return{x:(t.x1+t.x2)/2,y:(t.y1+t.y2)/2}},"getBoxCenter"),d=me(function(t){return{x:-t.w/2,y:-t.h/2}},"getCenterOffset"),i=me(function(t){return!((t=t[0]._private).oldBackgroundTimestamp===t.backgroundTimestamp)},"backgroundTimestampHasChanged"),r=me(function(t){return t[0]._private.nodeKey},"getStyleKey"),n=me(function(t){return t[0]._private.labelStyleKey},"getLabelKey"),p=me(function(t){return t[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),g=me(function(t){return t[0]._private.targetLabelStyleKey},"getTargetLabelKey"),f=me(function(t,e,r,n,i){return a.drawElement(t,e,r,!1,!1,i)},"drawElement"),m=me(function(t,e,r,n,i){return a.drawElementText(t,e,r,n,"main",i)},"drawLabel"),y=me(function(t,e,r,n,i){return a.drawElementText(t,e,r,n,"source",i)},"drawSourceLabel"),v=me(function(t,e,r,n,i){return a.drawElementText(t,e,r,n,"target",i)},"drawTargetLabel"),x=me(function(t){return t.boundingBox(),t[0]._private.bodyBounds},"getElementBox"),b=me(function(t){return t.boundingBox(),t[0]._private.labelBounds.main||h},"getLabelBox"),w=me(function(t){return t.boundingBox(),t[0]._private.labelBounds.source||h},"getSourceLabelBox"),k=me(function(t){return t.boundingBox(),t[0]._private.labelBounds.target||h},"getTargetLabelBox"),T=me(function(t,e){return e},"isLabelVisibleAtScale"),E=me(function(t){return u(x(t))},"getElementRotationPoint"),C=me(function(t,e,r){return{x:e.x+r.pstyle((t=t?t+"-":"")+"text-margin-x").pfValue,y:e.y+r.pstyle(t+"text-margin-y").pfValue}},"addTextMargin"),S=me(function(t,e,r){return{x:(t=t[0]._private.rscratch)[e],y:t[r]}},"getRsPt"),_=me(function(t){return C("",S(t,"labelX","labelY"),t)},"getLabelRotationPoint"),A=me(function(t){return C("source",S(t,"sourceLabelX","sourceLabelY"),t)},"getSourceLabelRotationPoint"),P=me(function(t){return C("target",S(t,"targetLabelX","targetLabelY"),t)},"getTargetLabelRotationPoint"),L=me(function(t){return d(x(t))},"getElementRotationOffset"),B=me(function(t){return d(w(t))},"getSourceLabelRotationOffset"),$=me(function(t){return d(k(t))},"getTargetLabelRotationOffset"),N=me(function(t){var e=b(t),r=d(b(t));if(t.isNode()){switch(t.pstyle("text-halign").value){case"left":r.x=-e.w-(e.leftPad||0);break;case"right":r.x=-(e.rightPad||0)}switch(t.pstyle("text-valign").value){case"top":r.y=-e.h-(e.topPad||0);break;case"bottom":r.y=-(e.botPad||0)}}return r},"getLabelRotationOffset"),I=a.data.eleTxrCache=new Iot(a,{getKey:r,doesEleInvalidateKey:i,drawElement:f,getBoundingBox:x,getRotationPoint:E,getRotationOffset:L,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),R=a.data.lblTxrCache=new Iot(a,{getKey:n,drawElement:m,getBoundingBox:b,getRotationPoint:_,getRotationOffset:N,isVisible:T}),M=a.data.slbTxrCache=new Iot(a,{getKey:p,drawElement:y,getBoundingBox:w,getRotationPoint:A,getRotationOffset:B,isVisible:T}),D=a.data.tlbTxrCache=new Iot(a,{getKey:g,drawElement:v,getBoundingBox:k,getRotationPoint:P,getRotationOffset:$,isVisible:T}),O=a.data.lyrTxrCache=new Rot(a),i=(a.onUpdateEleCalcs(me(function(t,e){I.invalidateElements(e),R.invalidateElements(e),M.invalidateElements(e),D.invalidateElements(e),O.invalidateElements(e);for(var r=0;r<e.length;r++){var n=e[r]._private;n.oldBackgroundTimestamp=n.backgroundTimestamp}},"invalidateTextureCaches")),me(function(t){for(var e=0;e<t.length;e++)O.enqueueElementRefinement(t[e].ele)},"refineInLayers"));I.onDequeue(i),R.onDequeue(i),M.onDequeue(i),D.onDequeue(i),t.webgl&&a.initWebgl(t,{getStyleKey:r,getLabelKey:n,drawElement:f,drawLabel:m,getElementBox:x,getLabelBox:b,getElementRotationPoint:E,getElementRotationOffset:L,getLabelRotationPoint:_,getLabelRotationOffset:N})}function OJ(e,r,n){var t=n,i=me(function(t){_et("Can not register `"+r+"` for `"+e+"` since `"+t+"` already exists in the prototype and can not be overridden")},"overrideErr");if("core"===e){if(wst.prototype[r])return i(r);wst.prototype[r]=n}else if("collection"===e){if(ust.prototype[r])return i(r);ust.prototype[r]=n}else if("layout"===e){for(var a=(g=me(function(t){this.options=t,n.call(this,t),XJ(this._private)||(this._private={}),this._private.cy=t.cy,this._private.listeners=[],this.createEmitter()},"Layout")).prototype=Object.create(n.prototype),s=[],o=0;o<s.length;o++){var l=s[o];a[l]=a[l]||function(){return this}}a.start&&!a.run?a.run=function(){return this.start(),this}:!a.start&&a.run&&(a.start=function(){return this.run(),this});var c=n.prototype.stop,h=(a.stop=function(){var t=this.options;if(t&&t.animate){var e=this.animations;if(e)for(var r=0;r<e.length;r++)e[r].stop()}return c?c.call(this):this.emit("layoutstop"),this},a.destroy||(a.destroy=function(){return this}),a.cy=function(){return this._private.cy},me(function(t){return t._private.cy},"getCy")),u={addEventFields:me(function(t,e){e.layout=t,e.cy=h(t),e.target=t},"addEventFields"),bubble:me(function(){return!0},"bubble"),parent:me(function(t){return h(t)},"parent")};vtt(a,{createEmitter:me(function(){return this._private.emitter=new uQ(u,this),this},"createEmitter"),emitter:me(function(){return this._private.emitter},"emitter"),on:me(function(t,e){return this.emitter().on(t,e),this},"on"),one:me(function(t,e){return this.emitter().one(t,e),this},"one"),once:me(function(t,e){return this.emitter().one(t,e),this},"once"),removeListener:me(function(t,e){return this.emitter().removeListener(t,e),this},"removeListener"),removeAllListeners:me(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),emit:me(function(t,e){return this.emitter().emit(t,e),this},"emit")}),cat.eventAliasesOn(a),t=g}else if("renderer"===e&&"null"!==r&&"base"!==r){var d,p,g,f=PJ("renderer","base"),m=f.prototype,y=n,v=n.prototype,x=(g=me(function(){f.apply(this,arguments),y.apply(this,arguments)},"Renderer")).prototype;for(d in m){var b=m[d];if(null!=v[d])return i(d);x[d]=b}for(p in v)x[p]=v[p];m.clientFunctions.forEach(function(t){x[t]=x[t]||function(){Eet("Renderer does not implement `renderer."+t+"()` on its prototype")}}),t=g}else if("__proto__"===e||"constructor"===e||"prototype"===e)return Eet(e+" is an illegal type to be registered, possibly lead to prototype pollutions");return Ctt({map:blt,keys:[e,r],value:t})}function PJ(t,e){return Stt({map:blt,keys:[t,e]})}function BJ(t,e,r,n,i){return Ctt({map:wlt,keys:[t,e,r,n],value:i})}function $J(t,e,r,n){return Stt({map:wlt,keys:[t,e,r,n]})}var FJ,zJ,GJ,UJ,qJ,jJ,WJ,YJ,HJ,VJ,XJ,KJ,at,ZJ,QJ,JJ,ttt,ett,rtt,ntt,itt,att,stt,ott,ltt,ctt,htt,utt,dtt,ptt,gtt,ftt,mtt,ytt,vtt,xtt,btt,wtt,ktt,Ttt,Ett,Ctt,Stt,_tt,Att,Ltt,Ntt,Itt,Rtt,Mtt,Dtt,Ott,Ptt,Btt,$tt,Ftt,ztt,Gtt,Utt,qtt,jtt,Wtt,Ytt,Htt,Vtt,Xtt,Ktt,Ztt,Qtt,Jtt,tet,eet,ret,net,iet,aet,set,oet,cet,het,uet,det,pet,get,fet,met,yet,vet,xet,bet,wet,ket,Tet,Eet,Cet,_et,Aet,Let,Net,Iet,Ret,Met,Det,Oet,Pet,Bet,$et,Fet,zet,Get,Uet,qet,jet,Wet,Yet,Het,Vet,Xet,Ket,Zet,Qet,Jet,trt,ert,rrt,nrt,irt,art,srt,ort,lrt,crt,hrt,urt,drt,prt,grt,frt,mrt,yrt,vrt,xrt,brt,wrt,krt,Trt,Ert,Crt,Srt,_rt,Art,Lrt,Nrt,Irt,Rrt,Mrt,Drt,Ort,Prt,Brt,$rt,Frt,zrt,Grt,Urt,qrt,jrt,Wrt,Yrt,Hrt,Vrt,Xrt,Krt,Zrt,Qrt,Jrt,tnt,ent,rnt,nnt,ant,snt,ont,lnt,cnt,hnt,unt,dnt,pnt,gnt,fnt,mnt,ynt,vnt,xnt,bnt,wnt,knt,Tnt,Ent,Cnt,Snt,_nt,Ant,Lnt,Nnt,Int,Rnt,Mnt,Dnt,Ont,Pnt,Bnt,$nt,Fnt,znt,Gnt,Unt,qnt,jnt,Wnt,Ynt,Hnt,Vnt,Xnt,Knt,Znt,Qnt,Jnt,tit,eit,rit,nit,iit,ait,sit,oit,lit,cit,hit,uit,dit,pit,git,fit,mit,yit,vit,xit,bit,wit,kit,Tit,Eit,Cit,Sit,_it,Ait,Lit,Nit,Iit,Rit,Mit,Dit,Oit,Pit,Bit,$it,Fit,zit,Git,Uit,qit,jit,Wit,Yit,Hit,Vit,Xit,Kit,Zit,Qit,Jit,tat,eat,rat,nat,iat,aat,sat,oat,lat,cat,hat,uat,J,dat,pat,gat,fat,mat,yat,vat,xat,bat,wat,kat,Tat,Eat,Cat,Sat,_at,Aat,Lat,Nat,Iat,Rat,Mat,Dat,Oat,Pat,Bat,$at,Fat,zat,Gat,Uat,qat,jat,Wat,Yat,Hat,Vat,Xat,Kat,Zat,Qat,Jat,tst,est,rst,nst,ist,ast,sst,ost,lst,cst,hst,ust,dst,pst,gst,fst,mst,yst,vst,xst,bst,wst,kst,Tst,Est,Cst,Sst,_st,Ast,Lst,Nst,Ist,Rst,Mst,Dst,Ost,Pst,Bst,$st,Fst,zst,Gst,Ust,qst,jst,Wst,Yst,Hst,Vst,Xst,Kst,Zst,Qst,Jst,tot,eot,rot,not,iot,aot,sot,oot,lot,cot,hot,uot,dot,pot,got,fot,mot,yot,vot,xot,bot,wot,kot,Tot,Eot,Cot,Sot,_ot,Aot,Lot,Not,Iot,Rot,Mot,Dot,Oot,Pot,Bot,$ot,Fot,zot,Got,Uot,qot,jot,Wot,Yot,Hot,Vot,Xot,Kot,Zot,Qot,Jot,tlt,elt,rlt,nlt,ilt,alt,slt,olt,llt,clt,hlt,ult,dlt,plt,glt,flt,mlt,ylt,vlt,xlt,blt,wlt,klt,Tlt,Elt,Clt,Slt=b(()=>{function n(t){if(FK(this,n),this._obj=Object.create(null),this.size=0,null!=t)for(var e=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t,r=0;r<e.length;r++)this.add(e[r])}function t(){FK(this,t),this._obj={}}me($K,"_typeof"),me(FK,"_classCallCheck"),me(zK,"_defineProperties"),me(GK,"_createClass"),me(UK,"_defineProperty$1"),me(qK,"_slicedToArray"),me(jK,"_toConsumableArray"),me(WK,"_arrayWithoutHoles"),me(YK,"_arrayWithHoles"),me(HK,"_iterableToArray"),me(VK,"_iterableToArrayLimit"),me(XK,"_unsupportedIterableToArray"),me(KK,"_arrayLikeToArray"),me(ZK,"_nonIterableSpread"),me(QK,"_nonIterableRest"),me(JK,"_createForOfIteratorHelper"),FJ="u"<typeof window?null:window,zJ=FJ?FJ.navigator:null,FJ&&FJ.document,GJ=$K(""),UJ=$K({}),qJ=$K(function(){}),jJ="u"<typeof HTMLElement?"undefined":$K(HTMLElement),WJ=me(function(t){return t&&t.instanceString&&HJ(t.instanceString)?t.instanceString():null},"instanceStr"),YJ=me(function(t){return null!=t&&$K(t)==GJ},"string"),HJ=me(function(t){return null!=t&&$K(t)===qJ},"fn"),VJ=me(function(t){return!JJ(t)&&(Array.isArray?Array.isArray(t):null!=t&&t instanceof Array)},"array"),XJ=me(function(t){return null!=t&&$K(t)===UJ&&!VJ(t)&&t.constructor===Object},"plainObject"),KJ=me(function(t){return null!=t&&$K(t)===UJ},"object"),at=me(function(t){return null!=t&&$K(t)===$K(1)&&!isNaN(t)},"number"),ZJ=me(function(t){return at(t)&&Math.floor(t)===t},"integer"),QJ=me(function(t){if("undefined"!==jJ)return null!=t&&t instanceof HTMLElement},"htmlElement"),JJ=me(function(t){return ttt(t)||ett(t)},"elementOrCollection"),ttt=me(function(t){return"collection"===WJ(t)&&t._private.single},"element"),ett=me(function(t){return"collection"===WJ(t)&&!t._private.single},"collection"),rtt=me(function(t){return"core"===WJ(t)},"core"),ntt=me(function(t){return"stylesheet"===WJ(t)},"stylesheet"),itt=me(function(t){return"event"===WJ(t)},"event"),att=me(function(t){return null==t||!(""!==t&&!t.match(/^\s+$/))},"emptyString"),stt=me(function(t){return!("u"<typeof HTMLElement)&&t instanceof HTMLElement},"domElement"),ott=me(function(t){return XJ(t)&&at(t.x1)&&at(t.x2)&&at(t.y1)&&at(t.y2)},"boundingBox"),ltt=me(function(t){return KJ(t)&&HJ(t.then)},"promise"),ctt=me(function(){return zJ&&zJ.userAgent.match(/msie|trident|edge/i)},"ms"),htt=me(function(i,a){a=a||me(function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return t.join("$")},"keyFn");var t=me(function t(){var e=arguments,r=a.apply(this,e),n=t.cache;return n[r]||(n[r]=i.apply(this,e))},"memoizedFn");return t.cache={},t},"memoize"),utt=htt(function(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}),dtt=htt(function(t){return t.replace(/(-\w)/g,function(t){return t[1].toUpperCase()})}),ptt=htt(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),gtt=me(function(t){return att(t)?t:t.charAt(0).toUpperCase()+t.substring(1)},"capitalize"),ftt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",mtt=me(function(t,e){return t<e?-1:e<t?1:0},"ascending"),ytt=me(function(t,e){return-1*mtt(t,e)},"descending"),vtt=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(null!=n)for(var i=Object.keys(n),a=0;a<i.length;a++){var s=i[a];t[s]=n[s]}}return t},xtt=me(function(t){var e,r;if((4===t.length||7===t.length)&&"#"===t[0])return t=4===t.length?(e=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)):(e=parseInt(t[1]+t[2],16),r=parseInt(t[3]+t[4],16),parseInt(t[5]+t[6],16)),[e,r,t]},"hex2tuple"),btt=me(function(t){var e,r,n,i,a,s,o;function l(t,e,r){return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(me(l,"hue2rgb"),t=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(t)){if((e=parseInt(t[1]))<0?e=(360- -1*e%360)%360:360<e&&(e%=360),e/=360,(r=parseFloat(t[2]))<0||100<r||(r/=100,(i=parseFloat(t[3]))<0)||100<i||(i/=100,void 0!==(n=t[4])&&((n=parseFloat(n))<0||1<n)))return;0===r?a=s=o=Math.round(255*i):(i=2*i-(t=i<.5?i*(1+r):i+r-i*r),a=Math.round(255*l(i,t,e+1/3)),s=Math.round(255*l(i,t,e)),o=Math.round(255*l(i,t,e-1/3))),r=[a,s,o,n]}return r},"hsl2tuple"),wtt=me(function(t){var e=new RegExp("^rgb[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(t);if(e){for(var r=[],n=[],i=1;i<=3;i++){var a=e[i];if("%"===a[a.length-1]&&(n[i]=!0),a=parseFloat(a),(a=n[i]?a/100*255:a)<0||255<a)return;r.push(Math.floor(a))}if((n[1]||n[2]||n[3])&&!(n[1]&&n[2]&&n[3]))return;if(void 0!==(t=e[4])){if((t=parseFloat(t))<0||1<t)return;r.push(t)}}return r},"rgb2tuple"),ktt=me(function(t){return Ett[t.toLowerCase()]},"colorname2tuple"),Ttt=me(function(t){return(VJ(t)?t:null)||ktt(t)||xtt(t)||wtt(t)||btt(t)},"color2tuple"),Ett={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Ctt=me(function(t){for(var e=t.map,r=t.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(XJ(a))throw Error("Tried to set map with object key");i<r.length-1?(null==e[a]&&(e[a]={}),e=e[a]):e[a]=t.value}},"setMap"),Stt=me(function(t){for(var e=t.map,r=t.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(XJ(a))throw Error("Tried to get map with object key");if(null==(e=e[a]))return e}return e},"getMap"),me(tZ,"isObject"),_tt=tZ,Att=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},me(eZ,"createCommonjsModule"),bet="object"==typeof Att&&Att&&Att.Object===Object&&Att,Xot="object"==typeof self&&self&&self.Object===Object&&self,bet=bet||Xot||Function("return this")(),Ltt=bet,Xot=me(function(){return Ltt.Date.now()},"now"),Ntt=Xot,Itt=/\s/,me(rZ,"trimmedEndIndex"),Rtt=rZ,Mtt=/^\s+/,me(nZ,"baseTrim"),Dtt=nZ,bet=Ltt.Symbol,Xot=bet,Ott=(bet=Object.prototype).hasOwnProperty,Ptt=bet.toString,Btt=Xot?Xot.toStringTag:void 0,me(iZ,"getRawTag"),$tt=iZ,Ftt=Object.prototype.toString,me(aZ,"objectToString"),ztt=aZ,Gtt=Xot?Xot.toStringTag:void 0,me(sZ,"baseGetTag"),Utt=sZ,me(oZ,"isObjectLike"),qtt=oZ,me(lZ,"isSymbol"),jtt=lZ,Wtt=NaN,Ytt=/^[-+]0x[0-9a-f]+$/i,Htt=/^0b[01]+$/i,Vtt=/^0o[0-7]+$/i,Xtt=parseInt,me(cZ,"toNumber"),Ktt=cZ,Ztt=Math.max,Qtt=Math.min,me(hZ,"debounce"),Jtt=hZ,tet=FJ?FJ.performance:null,eet=tet&&tet.now?function(){return tet.now()}:function(){return Date.now()},ret=(()=>{if(FJ){if(FJ.requestAnimationFrame)return function(t){FJ.requestAnimationFrame(t)};if(FJ.mozRequestAnimationFrame)return function(t){FJ.mozRequestAnimationFrame(t)};if(FJ.webkitRequestAnimationFrame)return function(t){FJ.webkitRequestAnimationFrame(t)};if(FJ.msRequestAnimationFrame)return function(t){FJ.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(eet())},1e3/60)}})(),net=me(function(t){return ret(t)},"requestAnimationFrame"),iet=eet,aet=me(function(t){for(var e,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261;!(e=t.next()).done;)r=65599*r+e.value|0;return r},"hashIterableInts"),set=me(function(t){return 65599*(1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261)+t|0},"hashInt"),oet=me(function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5381;return(e<<5)+e+t|0},"hashIntAlt"),cet=me(function(t,e){return 2097152*t+e},"combineHashes"),het=me(function(t){return 2097152*t[0]+t[1]},"combineHashesArray"),uet=me(function(t,e){return[set(t[0],e[0]),oet(t[1],e[1])]},"hashArrays"),det=me(function(t,e){var r={value:0,done:!1},n=0,i=t.length,a={next:me(function(){return n<i?r.value=t[n++]:r.done=!0,r},"next")};return aet(a,e)},"hashIntsArray"),pet=me(function(t,e){var r={value:0,done:!1},n=0,i=t.length,a={next:me(function(){return n<i?r.value=t.charCodeAt(n++):r.done=!0,r},"next")};return aet(a,e)},"hashString"),get=me(function(){return fet(arguments)},"hashStrings"),fet=me(function(t){for(var e=0;e<t.length;e++)var r=t[e],n=0===e?pet(r):pet(r,n);return n},"hashStringsArray"),met=!0,yet=null!=console.warn,vet=null!=console.trace,xet=Number.MAX_SAFE_INTEGER||9007199254740991,bet=me(function(){return!0},"trueify"),wet=me(function(){return!1},"falsify"),ket=me(function(){return 0},"zeroify"),Tet=me(function(){},"noop"),Eet=me(function(t){throw new Error(t)},"error"),Cet=me(function(t){if(void 0===t)return met;met=!!t},"warnings"),_et=me(function(t){Cet()&&(yet?console.warn(t):(console.log(t),vet&&console.trace()))},"warn"),Aet=me(function(t){return vtt({},t)},"clone"),Let=me(function(t){return null==t?t:VJ(t)?t.slice():XJ(t)?Aet(t):t},"copy"),Net=me(function(t){return t.slice()},"copyArray"),Iet=me(function(t,e){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e},"uuid"),Ret={},Met=me(function(){return Ret},"staticEmptyObject"),Det=me(function(a){var s=Object.keys(a);return function(t){for(var e={},r=0;r<s.length;r++){var n=s[r],i=t?.[n];e[n]=void 0===i?a[n]:i}return e}},"defaults"),Oet=me(function(t,e,r){for(var n=t.length-1;0<=n&&(t[n]!==e||(t.splice(n,1),!r));n--);},"removeFromArray"),Pet=me(function(t){t.splice(0,t.length)},"clearArray"),Bet=me(function(t,e){for(var r=0;r<e.length;r++)t.push(e[r])},"push"),$et=me(function(t,e,r){return t[e=r?ptt(r,e):e]},"getPrefixedProperty"),Fet=me(function(t,e,r,n){t[e=r?ptt(r,e):e]=n},"setPrefixedProperty"),me(t,"ObjectMap"),GK(t,[{key:"set",value:me(function(t,e){return this._obj[t]=e,this},"set")},{key:"delete",value:me(function(t){return this._obj[t]=void 0,this},"_delete")},{key:"clear",value:me(function(){this._obj={}},"clear")},{key:"has",value:me(function(t){return void 0!==this._obj[t]},"has")},{key:"get",value:me(function(t){return this._obj[t]},"get")}]),mlt=t,zet=typeof Map<"u"?Map:mlt,me(n,"ObjectSet"),GK(n,[{key:"instanceString",value:me(function(){return"set"},"instanceString")},{key:"add",value:me(function(t){var e=this._obj;1!==e[t]&&(e[t]=1,this.size++)},"add")},{key:"delete",value:me(function(t){var e=this._obj;1===e[t]&&(e[t]=0,this.size--)},"_delete")},{key:"clear",value:me(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:me(function(t){return 1===this._obj[t]},"has")},{key:"toArray",value:me(function(){var e=this;return Object.keys(this._obj).filter(function(t){return e.has(t)})},"toArray")},{key:"forEach",value:me(function(t,e){return this.toArray().forEach(t,e)},"forEach")}]),mlt=n,Get="undefined"!==("u"<typeof Set?"undefined":$K(Set))?Set:mlt,Uet=me(function(t,e){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&rtt(t)){var n=e.group;if("nodes"!==(n=null==n?e.data&&null!=e.data.source&&null!=e.data.target?"edges":"nodes":n)&&"edges"!==n)Eet("An element must be of type `nodes` or `edges`; you specified `"+n+"`");else{this.length=1;var i,a=(this[0]=this)._private={cy:t,single:!0,data:e.data||{},position:e.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!e.selected,selectable:void 0===e.selectable||!!e.selectable,locked:!!e.locked,grabbed:!1,grabbable:void 0===e.grabbable||!!e.grabbable,pannable:void 0===e.pannable?"edges"===n:!!e.pannable,active:!1,classes:new Get,animation:{current:[],queue:[]},rscratch:{},scratch:e.scratch||{},edges:[],children:[],parent:e.parent&&e.parent.isNode()?e.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}},s=(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),e.renderedPosition&&(n=e.renderedPosition,i=t.pan(),t=t.zoom(),a.position={x:(n.x-i.x)/t,y:(n.y-i.y)/t}),[]);VJ(e.classes)?s=e.classes:YJ(e.classes)&&(s=e.classes.split(/\s+/));for(var o=0,l=s.length;o<l;o++){var c=s[o];c&&""!==c&&a.classes.add(c)}this.createEmitter(),(n=e.style||e.css)&&(_et("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(n)),void 0!==r&&!r||this.restore()}}else Eet("An element must have a core reference and parameters set")},"Element"),(mlt={breadthFirstSearch:(mlt=me(function(T){return T={bfs:T.bfs||!T.dfs,dfs:T.dfs||!T.bfs},me(function(t,u,d){XJ(t)&&!JJ(t)&&(t=(e=t).roots||e.root,u=e.visit,d=e.directed),d=2!==arguments.length||HJ(u)?d:u,u=HJ(u)?u:function(){};for(var p,e=this._private.cy,r=t=YJ(t)?this.filter(t):t,g=[],f=[],m={},y={},v={},x=0,t=this.byGroup(),b=t.nodes,w=t.edges,n=0;n<r.length;n++){var i=r[n],a=i.id();i.isNode()&&(g.unshift(i),T.bfs&&(v[a]=!0,f.push(i)),y[a]=0)}for(var s=me(function(){var e=T.bfs?g.shift():g.pop(),t=e.id();if(T.dfs){if(v[t])return"continue";v[t]=!0,f.push(e)}var r=y[t],n=m[t],i=null!=n?n.source():null,a=null!=n?n.target():null,a=null==n?void 0:(e.same(i)?a:i)[0];if(!0===(i=u(e,n,a,x++,r)))return p=e,"break";if(!1===i)return"break";for(var s=e.connectedEdges().filter(function(t){return(!d||t.source().same(e))&&w.has(t)}),o=0;o<s.length;o++){var l=s[o],c=l.connectedNodes().filter(function(t){return!t.same(e)&&b.has(t)}),h=c.id();0===c.length||v[h]||(c=c[0],g.push(c),T.bfs&&(v[h]=!0,f.push(c)),m[h]=l,y[h]=y[t]+1)}},"_loop");0!==g.length;){var o=s();if("continue"!==o&&"break"===o)break}for(var l=e.collection(),c=0;c<f.length;c++){var h=f[c],k=m[h.id()];null!=k&&l.push(k),l.push(h)}return{path:e.collection(l),found:e.collection(p)}},"searchFn")},"defineSearch"))({bfs:!0}),depthFirstSearch:mlt({dfs:!0})}).bfs=mlt.breadthFirstSearch,mlt.dfs=mlt.depthFirstSearch,Hot=eZ(function(s,t){!function(){var d,l,p,g,e,c,r,f,m,t,n,i,h,u;function a(t){this.cmp=t??d,this.nodes=[]}l=Math.floor,m=Math.min,d=me(function(t,e){return t<e?-1:e<t?1:0},"defaultCmp"),f=me(function(t,e,r,n,i){var a;if(null==i&&(i=d),(r=null==r?0:r)<0)throw new Error("lo must be non-negative");for(null==n&&(n=t.length);r<n;)i(e,t[a=l((r+n)/2)])<0?n=a:r=a+1;return[].splice.apply(t,[r,r-r].concat(e)),e},"insort"),e=me(function(t,e,r){return null==r&&(r=d),t.push(e),h(t,0,t.length-1,r)},"heappush"),g=me(function(t,e){var r,n;return null==e&&(e=d),r=t.pop(),t.length?(n=t[0],t[0]=r,u(t,0,e)):n=r,n},"heappop"),r=me(function(t,e,r){var n;return null==r&&(r=d),n=t[0],t[0]=e,u(t,0,r),n},"heapreplace"),c=me(function(t,e,r){var n;return null==r&&(r=d),t.length&&r(t[0],e)<0&&(e=(n=[t[0],e])[0],t[0]=n[1],u(t,0,r)),e},"heappushpop"),p=me(function(r,t){var e,n,i,a,s,o;for(null==t&&(t=d),s=[],n=0,i=(a=function(){o=[];for(var t=0,e=l(r.length/2);0<=e?t<e:e<t;0<=e?t++:t--)o.push(t);return o}.apply(this).reverse()).length;n<i;n++)e=a[n],s.push(u(r,e,t));return s},"heapify"),i=me(function(t,e,r){if(null==r&&(r=d),-1!==(e=t.indexOf(e)))return h(t,0,e,r),u(t,e,r)},"updateItem"),t=me(function(t,e,r){var n,i,a,s,o;if(null==r&&(r=d),!(i=t.slice(0,e)).length)return i;for(p(i,r),a=0,s=(o=t.slice(e)).length;a<s;a++)n=o[a],c(i,n,r);return i.sort(r).reverse()},"nlargest"),n=me(function(t,e,r){var n,i,a,s,o,l,c,h,u;if(null==r&&(r=d),10*e<=t.length){if((a=t.slice(0,e).sort(r)).length)for(i=a[a.length-1],s=0,l=(c=t.slice(e)).length;s<l;s++)r(n=c[s],i)<0&&(f(a,n,0,null,r),a.pop(),i=a[a.length-1]);return a}for(p(t,r),u=[],o=0,h=m(e,t.length);0<=h?o<h:h<o;0<=h?++o:--o)u.push(g(t,r));return u},"nsmallest"),h=me(function(t,e,r,n){var i,a,s;for(null==n&&(n=d),i=t[r];e<r&&n(i,a=t[s=r-1>>1])<0;)t[r]=a,r=s;return t[r]=i},"_siftdown"),u=me(function(t,e,r){var n,i,a,s,o;for(null==r&&(r=d),i=t.length,a=t[o=e],n=2*e+1;n<i;)(s=n+1)<i&&!(r(t[n],t[s])<0)&&(n=s),t[e]=t[n],n=2*(e=n)+1;return t[e]=a,h(t,o,e,r)},"_siftup"),a.push=e,a.pop=g,a.replace=r,a.pushpop=c,a.heapify=p,a.updateItem=i,a.nlargest=t,a.nsmallest=n,me(a,"Heap"),a.prototype.push=function(t){return e(this.nodes,t,this.cmp)},a.prototype.pop=function(){return g(this.nodes,this.cmp)},a.prototype.peek=function(){return this.nodes[0]},a.prototype.contains=function(t){return-1!==this.nodes.indexOf(t)},a.prototype.replace=function(t){return r(this.nodes,t,this.cmp)},a.prototype.pushpop=function(t){return c(this.nodes,t,this.cmp)},a.prototype.heapify=function(){return p(this.nodes,this.cmp)},a.prototype.updateItem=function(t){return i(this.nodes,t,this.cmp)},a.prototype.clear=function(){return this.nodes=[]},a.prototype.empty=function(){return 0===this.nodes.length},a.prototype.size=function(){return this.nodes.length},a.prototype.clone=function(){var t=new a;return t.nodes=this.nodes.slice(0),t},a.prototype.toArray=function(){return this.nodes.slice(0)},a.prototype.insert=a.prototype.push,a.prototype.top=a.prototype.peek,a.prototype.front=a.prototype.peek,a.prototype.has=a.prototype.contains,a.prototype.copy=a.prototype.clone,s.exports=a}.call(Att)}),qet=Hot,jet=Det({root:null,weight:me(function(t){return 1},"weight"),directed:!1}),Hot={dijkstra:me(function(t){XJ(t)||(t={root:(e=arguments)[0],weight:e[1],directed:e[2]});var e=jet(t),t=e.root,l=e.directed,a=this,c=e.weight,r=(YJ(t)?this.filter(t):t)[0],n={},s={},i={},o=(e=this.byGroup()).nodes,h=e.edges;h.unmergeBy(function(t){return t.isLoop()});for(var u=me(function(t){return n[t.id()]},"getDist"),d=me(function(t,e){n[t.id()]=e,p.updateItem(t)},"setDist"),p=new qet(function(t,e){return u(t)-u(e)}),g=0;g<o.length;g++){var f=o[g];n[f.id()]=f.same(r)?0:1/0,p.push(f)}for(var m=me(function(t,e){for(var r,n=(l?t.edgesTo(e):t.edgesWith(e)).intersect(h),i=1/0,a=0;a<n.length;a++){var s=n[a],o=c(s);(o<i||!r)&&(i=o,r=s)}return{edge:r,dist:i}},"distBetween");0<p.size();){var y=p.pop(),v=u(y),x=y.id();if((i[x]=v)!==1/0)for(var b=y.neighborhood().intersect(o),w=0;w<b.length;w++){var k=b[w],T=k.id(),E=m(y,k),C=v+E.dist;C<u(k)&&(d(k,C),s[T]={node:y,edge:E.edge})}}return{distanceTo:me(function(t){return t=(YJ(t)?o.filter(t):t)[0],i[t.id()]},"distanceTo"),pathTo:me(function(t){var e=[],r=t=(YJ(t)?o.filter(t):t)[0],n=r.id();if(0<t.length)for(e.unshift(t);s[n];){var i=s[n];e.unshift(i.edge),e.unshift(i.node),n=(r=i.node).id()}return a.spawn(e)},"pathTo")}},"dijkstra")},Elt={kruskal:me(function(r){r=r||function(t){return 1};for(var t=(e=this.byGroup()).nodes,e=e.edges,n=t.length,i=new Array(n),a=t,s=me(function(t){for(var e=0;e<i.length;e++)if(i[e].has(t))return e},"findSetIndex"),o=0;o<n;o++)i[o]=this.spawn(t[o]);for(var l=e.sort(function(t,e){return r(t)-r(e)}),c=0;c<l.length;c++){var h=l[c],u=h.source()[0],d=h.target()[0],u=s(u),d=s(d),p=i[u],g=i[d];u!==d&&(a.merge(h),p.merge(g),i.splice(d,1))}return a},"kruskal")},Wet=Det({root:null,goal:null,weight:me(function(t){return 1},"weight"),heuristic:me(function(t){return 0},"heuristic"),directed:!1}),Kot={aStar:me(function(t){var e,r,n=this.cy(),i=(t=Wet(t)).root,a=t.goal,s=t.heuristic,o=t.directed,l=t.weight,i=n.collection(i)[0],a=n.collection(a)[0],t=i.id(),c=a.id(),h={},u={},d={},p=new qet(function(t,e){return u[t.id()]-u[e.id()]}),g=new Get,f={},m={},y=me(function(t,e){p.push(t),g.add(e)},"addToOpenSet"),v=me(function(){e=p.pop(),r=e.id(),g.delete(r)},"popFromOpenSet"),x=me(function(t){return g.has(t)},"isInOpenSet");y(i,t),h[t]=0,u[t]=s(i);for(var b=0;0<p.size();){if(v(),b++,r===c){for(var w=[],k=a,T=c,E=m[T];w.unshift(k),null!=E&&w.unshift(E),null!=(k=f[T]);)E=m[T=k.id()];return{found:!0,distance:h[r],path:this.spawn(w),steps:b}}d[r]=!0;for(var C=e._private.edges,S=0;S<C.length;S++){var _,A,L,N=C[S];!this.hasElementWithId(N.id())||o&&N.data("source")!==r||(_=N.source(),A=N.target(),A=(_=_.id()!==r?_:A).id(),this.hasElementWithId(A)&&!d[A]&&(L=h[r]+l(N),x(A)?L<h[A]&&(u[A]=(h[A]=L)+s(_),f[A]=e,m[A]=N):(u[A]=(h[A]=L)+s(_),y(_,A),f[A]=e,m[A]=N)))}}return{found:!1,distance:void 0,path:void 0,steps:b}},"aStar")},Yet=Det({weight:me(function(t){return 1},"weight"),directed:!1}),olt={floydWarshall:me(function(t){for(var s=this.cy(),e=(t=Yet(t)).weight,r=t.directed,n=e,i=(t=this.byGroup()).nodes,a=t.edges,o=i.length,l=o*o,c=me(function(t){return i.indexOf(t)},"indexOf"),h=me(function(t){return i[t]},"atIndex"),u=new Array(l),d=0;d<l;d++){var p=d%o;u[d]=(d-p)/o==p?0:1/0}for(var g=new Array(l),f=new Array(l),m=0;m<a.length;m++){var y,v,x=a[m],b=x.source()[0],w=x.target()[0];b!==w&&(b=c(b),w=c(w),v=b*o+w,y=n(x),u[v]>y&&(u[v]=y,g[v]=w,f[v]=x),r||(v=w*o+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}for(var k=0;k<o;k++)for(var T=0;T<o;T++)for(var E=T*o+k,C=0;C<o;C++){var S=T*o+C,_=k*o+C;u[E]+u[_]<u[S]&&(u[S]=u[E]+u[_],g[S]=g[E])}var A=me(function(t){return(YJ(t)?s.filter(t):t)[0]},"getArgEle"),L=me(function(t){return c(A(t))},"indexOfArgEle");return{distance:me(function(t,e){return t=L(t),e=L(e),u[t*o+e]},"distance"),path:me(function(t,e){var r=L(t),n=L(e),t=h(r);if(r===n)return t.collection();if(null==g[r*o+n])return s.collection();var i,a=s.collection();for(a.merge(t);r!==n;)r=g[(i=r)*o+n],i=f[i*o+r],a.merge(i),a.merge(h(r));return a},"path")}},"floydWarshall")},Het=Det({weight:me(function(t){return 1},"weight"),directed:!1,root:null}),jot={bellmanFord:me(function(t){var P=this,e=(m=Het(t)).weight,r=m.directed,s=m.root,n=e,o=this,i=this.cy(),a=(m=this.byGroup()).edges,l=m.nodes,c=l.length,h=new zet,u=!1,d=[],s=i.collection(s)[0];a.unmergeBy(function(t){return t.isLoop()});for(var p=a.length,g=me(function(t){var e=h.get(t.id());return e||(e={},h.set(t.id(),e)),e},"getInfo"),f=me(function(t){return(YJ(t)?i.$(t):t)[0]},"getNodeFromTo"),e=me(function(t){return g(f(t)).dist},"distanceTo"),m=me(function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s,r=[],n=f(t);;){if(null==n)return P.spawn();var i=(a=g(n)).edge,a=a.pred;if(r.unshift(n[0]),n.same(e)&&0<r.length)break;null!=i&&r.unshift(i),n=a}return o.spawn(r)},"pathTo"),y=0;y<c;y++){var v=l[y],x=g(v);v.same(s)?x.dist=0:x.dist=1/0,x.pred=null,x.edge=null}for(var b=!1,B=me(function(t,e,r,n,i,a){(a=n.dist+a)<i.dist&&!r.same(n.edge)&&(i.dist=a,i.pred=t,i.edge=r,b=!0)},"checkForEdgeReplacement"),$=1;$<c;$++){for(var b=!1,w=0;w<p;w++){var k=a[w],T=k.source(),E=k.target(),F=n(k),z=g(T),G=g(E);B(T,E,k,z,G,F),r||B(E,T,k,G,z,F)}if(!b)break}if(b)for(var U=[],C=0;C<p;C++){var q=(S=a[C]).source(),j=S.target(),S=n(S),_=g(q).dist,A=g(j).dist;if(_+S<A||!r&&A+S<_){if(u||(_et("Graph contains a negative weight cycle for Bellman-Ford"),u=!0),!1===t.findNegativeWeightCycles)break;var L=[];_+S<A&&L.push(q),!r&&A+S<_&&L.push(j);for(var W=L.length,N=0;N<W;N++){var I=L[N],R=[I];R.push(g(I).edge);for(var M=g(I).pred;-1===R.indexOf(M);)R.push(M),R.push(g(M).edge),M=g(M).pred;for(var Y=(R=R.slice(R.indexOf(M)))[0].id(),D=0,O=2;O<R.length;O+=2)R[O].id()<Y&&(Y=R[O].id(),D=O);(R=R.slice(D).concat(R.slice(0,D))).push(R[0]),I=R.map(function(t){return t.id()}).join(","),-1===U.indexOf(I)&&(d.push(o.spawn(R)),U.push(I))}}}return{distanceTo:e,pathTo:m,hasNegativeWeightCycle:u,negativeWeightCycles:d}},"bellmanFord")},Vet=Math.sqrt(2),Xet=me(function(t,e,r){0===r.length&&Eet("Karger-Stein must be run on a connected (sub)graph");for(var n=e[(t=r[t])[1]],i=e[t[2]],a=r,s=a.length-1;0<=s;s--){var o=(l=a[s])[1],l=l[2];(e[o]===n&&e[l]===i||e[o]===i&&e[l]===n)&&a.splice(s,1)}for(var c=0;c<a.length;c++){var h=a[c];h[1]===i?(a[c]=h.slice(),a[c][1]=n):h[2]===i&&(a[c]=h.slice(),a[c][2]=n)}for(var u=0;u<e.length;u++)e[u]===i&&(e[u]=n);return a},"collapse"),Ket=me(function(t,e,r,n){for(;n<r;){var i=Math.floor(Math.random()*e.length);e=Xet(i,t,e),r--}return e},"contractUntil"),Vot={kargerStein:me(function(){var r=this,t=this.byGroup(),e=t.nodes,n=t.edges,i=(n.unmergeBy(function(t){return t.isLoop()}),e.length),a=n.length,s=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),o=Math.floor(i/Vet);if(!(i<2)){for(var l=[],c=0;c<a;c++){var h=n[c];l.push([c,e.indexOf(h.source()),e.indexOf(h.target())])}for(var u=1/0,d=[],p=new Array(i),g=new Array(i),f=new Array(i),m=me(function(t,e){for(var r=0;r<i;r++)e[r]=t[r]},"copyNodesMap"),y=0;y<=s;y++){for(var v=0;v<i;v++)g[v]=v;var x=(b=Ket(g,l.slice(),i,o)).slice(),b=(m(g,f),Ket(g,b,o,2)),x=Ket(f,x,o,2);b.length<=x.length&&b.length<u?(u=b.length,d=b,m(g,p)):x.length<=b.length&&x.length<u&&(u=x.length,d=x,m(f,p))}for(var w=this.spawn(d.map(function(t){return n[t[0]]})),k=this.spawn(),T=this.spawn(),E=p[0],C=0;C<p.length;C++){var S=p[C],_=e[C];(S===E?k:T).merge(_)}return t=[(t=me(function(t){var e=r.spawn();return t.forEach(function(t){e.merge(t),t.connectedEdges().forEach(function(t){r.contains(t)&&!w.contains(t)&&e.merge(t)})}),e},"constructComponent"))(k),t(T)],{cut:w,components:t,partition1:k,partition2:T}}Eet("At least 2 nodes are required for Karger-Stein algorithm")},"kargerStein")},Zet=me(function(t){return{x:t.x,y:t.y}},"copyPosition"),Qet=me(function(t,e,r){return{x:t.x*e+r.x,y:t.y*e+r.y}},"modelToRenderedPosition"),Jet=me(function(t,e,r){return{x:(t.x-r.x)/e,y:(t.y-r.y)/e}},"renderedToModelPosition"),trt=me(function(t){return{x:t[0],y:t[1]}},"array2point"),ert=me(function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.length,n=1/0,i=e;i<r;i++){var a=t[i];isFinite(a)&&(n=Math.min(a,n))}return n},"min"),rrt=me(function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.length,n=-1/0,i=e;i<r;i++){var a=t[i];isFinite(a)&&(n=Math.max(a,n))}return n},"max"),nrt=me(function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.length,n=0,i=0,a=e;a<r;a++){var s=t[a];isFinite(s)&&(n+=s,i++)}return n/i},"mean"),irt=me(function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.length,n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],i=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];n?t=t.slice(e,r):(r<t.length&&t.splice(r,t.length-r),0<e&&t.splice(0,e));for(var s=0,o=t.length-1;0<=o;o--){var l=t[o];a?isFinite(l)||(t[o]=-1/0,s++):t.splice(o,1)}return i&&t.sort(function(t,e){return t-e}),n=t.length,r=Math.floor(n/2),n%2!=0?t[r+1+s]:(t[r-1+s]+t[r+s])/2},"median"),art=me(function(t){return Math.PI*t/180},"deg2rad"),srt=me(function(t,e){return Math.atan2(e,t)-Math.PI/2},"getAngleFromDisp"),ort=Math.log2||function(t){return Math.log(t)/Math.log(2)},lrt=me(function(t){return 0<t?1:t<0?-1:0},"signum"),crt=me(function(t,e){return Math.sqrt(hrt(t,e))},"dist"),hrt=me(function(t,e){var r=e.x-t.x;return r*r+(e=e.y-t.y)*e},"sqdist"),urt=me(function(t){for(var e=t.length,r=0,n=0;n<e;n++)r+=t[n];for(var i=0;i<e;i++)t[i]=t[i]/r;return t},"inPlaceSumNormalize"),drt=me(function(t,e,r,n){return(1-n)*(1-n)*t+2*(1-n)*n*e+n*n*r},"qbezierAt"),prt=me(function(t,e,r,n){return{x:drt(t.x,e.x,r.x,n),y:drt(t.y,e.y,r.y,n)}},"qbezierPtAt"),grt=me(function(t,e,r,n){var i=e.x-t.x,a=e.y-t.y,e=crt(t,e);return r=r??0,{x:t.x+i/e*(n=n??r*e),y:t.y+a/e*n}},"lineAt"),frt=me(function(t,e,r){return Math.max(t,Math.min(r,e))},"bound"),mrt=me(function(t){return null==t?{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0}:null!=t.x1&&null!=t.y1?null!=t.x2&&null!=t.y2&&t.x2>=t.x1&&t.y2>=t.y1?{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1}:null!=t.w&&null!=t.h&&0<=t.w&&0<=t.h?{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}:void 0:void 0},"makeBoundingBox"),yrt=me(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),vrt=me(function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},"clearBoundingBox"),xrt=me(function(t,e,r){return{x1:t.x1+e,x2:t.x2+e,y1:t.y1+r,y2:t.y2+r,w:t.w,h:t.h}},"shiftBoundingBox"),brt=me(function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},"updateBoundingBox"),wrt=me(function(t,e,r){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r),t.y2=Math.max(t.y2,r),t.h=t.y2-t.y1},"expandBoundingBoxByPoint"),krt=me(function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},"expandBoundingBox"),Trt=me(function(t){var e,r,n,i,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0];return 1===a.length?e=r=n=i=a[0]:2===a.length?(e=n=a[0],i=r=a[1]):4===a.length&&(e=(a=qK(a,4))[0],r=a[1],n=a[2],i=a[3]),t.x1-=i,t.x2+=r,t.y1-=e,t.y2+=n,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},"expandBoundingBoxSides"),Ert=me(function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},"assignBoundingBox"),Crt=me(function(t,e){return!(t.x1>e.x2||e.x1>t.x2||t.x2<e.x1||e.x2<t.x1||t.y2<e.y1||e.y2<t.y1||t.y1>e.y2||e.y1>t.y2)},"boundingBoxesIntersect"),Srt=me(function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},"inBoundingBox"),_rt=me(function(t,e){return Srt(t,e.x,e.y)},"pointInBoundingBox"),Art=me(function(t,e){return Srt(t,e.x1,e.y1)&&Srt(t,e.x2,e.y2)},"boundingBoxInBoundingBox"),Lrt=me(function(t,e,r,n,i,a,s){var o,l="auto"===(l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:"auto")?Qrt(i,a):l,i=i/2,a=a/2,c=(l=Math.min(l,i,a))!==i,h=l!==a;if(c){var u=n-a-s;if(0<(u=Wrt(t,e,r,n,r-i+l-s,u,r+i-l+s,u,!1)).length)return u}return h&&0<(u=Wrt(t,e,r,n,o=r+i+s,n-a+l-s,o,n+a-l+s,!1)).length||c&&0<(u=Wrt(t,e,r,n,r-i+l-s,o=n+a+s,r+i-l+s,o,!1)).length||h&&0<(u=Wrt(t,e,r,n,c=r-i-s,n-a+l-s,c,n+a-l+s,!1)).length?u:0<(c=qrt(t,e,r,n,o=r-i+l,h=n-a+l,l+s)).length&&c[0]<=o&&c[1]<=h||0<(c=qrt(t,e,r,n,u=r+i-l,o=n-a+l,l+s)).length&&c[0]>=u&&c[1]<=o||0<(c=qrt(t,e,r,n,h=r+i-l,u=n+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=qrt(t,e,r,n,o=r-i+l,h=n+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),Nrt=me(function(t,e,r,n,i,a,s){var o=Math.min(r,i),r=Math.max(r,i),i=Math.min(n,a),n=Math.max(n,a);return o-s<=t&&t<=r+s&&i-s<=e&&e<=n+s},"inLineVicinity"),Irt=me(function(t,e,r,n,i,a,s,o,l){var c=Math.min(r,s,i)-l,r=Math.max(r,s,i)+l,s=Math.min(n,o,a)-l,i=Math.max(n,o,a)+l;return!(t<c||r<t||e<s||i<e)},"inBezierVicinity"),Rrt=me(function(t,e,r,n){return(n=e*e-4*t*(r-=n))<0?[]:[(-e+(r=Math.sqrt(n)))/(n=2*t),(-e-r)/n]},"solveQuadratic"),Mrt=me(function(t,e,r,n,i){var a,s,o;n=-27*(n/=t=0===t?1e-5:t)+(e/=t)*(9*(r/=t)-e*e*2),r=(t=(3*r-e*e)/9)*t*t+(n/=54)*n,e/=3,(i[1]=0)<r?(a=(a=n+Math.sqrt(r))<0?-Math.pow(-a,1/3):Math.pow(a,1/3),s=(s=n-Math.sqrt(r))<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=-e+a+s,i[4]=i[2]=-(e+=(a+s)/2),e=Math.sqrt(3)*(-s+a)/2,i[3]=e,i[5]=-e):(i[5]=i[3]=0)==r?(o=n<0?-Math.pow(-n,1/3):Math.pow(n,1/3),i[0]=2*o-e,i[4]=i[2]=-(o+e)):(t=-t,s=Math.acos(n/Math.sqrt(t*t*t)),o=2*Math.sqrt(t),i[0]=-e+o*Math.cos(s/3),i[2]=-e+o*Math.cos((s+2*Math.PI)/3),i[4]=-e+o*Math.cos((s+4*Math.PI)/3))},"solveCubic"),Drt=me(function(t,e,r,n,i,a,s,o){var l=[];Mrt(+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s+n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o,9*r*i-3*r*r-3*r*s-6*i*i+3*i*s+9*n*a-3*n*n-3*n*o-6*a*a+3*a*o,3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t+3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e,+r*i-r*r+r*t-i*t+n*a-n*n+n*e-a*e,l);for(var c=[],h=0;h<6;h+=2)Math.abs(l[h+1])<1e-7&&0<=l[h]&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var u,d,p=-1,g=0;g<c.length;g++)d=Math.pow(1-c[g],2)*r+2*(1-c[g])*c[g]*i+c[g]*c[g]*s,u=Math.pow(1-c[g],2)*n+2*(1-c[g])*c[g]*a+c[g]*c[g]*o,d=Math.pow(d-t,2)+Math.pow(u-e,2),0<=p&&!(d<p)||(p=d);return p},"sqdistToQuadraticBezier"),Ort=me(function(t,e,r,n,i,a){var s=[t-r,e-n],n=(r=[i-r,a-n])[0]*r[0]+r[1]*r[1],o=s[0]*s[0]+s[1]*s[1],r=(s=s[0]*r[0]+s[1]*r[1])*s/n;return s<0?o:n<r?(t-i)*(t-i)+(e-a)*(e-a):o-r},"sqdistToFiniteLine"),Prt=me(function(t,e,r){for(var n,i,a,s,o=0,l=0;l<r.length/2;l++)if(i=r[2*l+1],s=l+1<r.length/2?(a=r[2*(l+1)],r[2*(l+1)+1]):(a=r[2*(l+1-r.length/2)],r[2*(l+1-r.length/2)+1]),(n=r[2*l])!=t||a!=t){if(!(t<=n&&a<=t||n<=t&&t<=a))continue;e<(t-n)/(a-n)*(s-i)+i&&o++}return o%2!=0},"pointInsidePolygonPoints"),Brt=me(function(t,e,r,n,i,a,s,o,l){var c=new Array(r.length);null!=o[0]?(h=Math.atan(o[1]/o[0]),o[0]<0?h+=Math.PI/2:h=-h-Math.PI/2):h=o;for(var h,u=Math.cos(-h),d=Math.sin(-h),p=0;p<c.length/2;p++)c[2*p]=a/2*(r[2*p]*u-r[2*p+1]*d),c[2*p+1]=s/2*(r[2*p+1]*u+r[2*p]*d),c[2*p]+=n,c[2*p+1]+=i;return h=0<l?(o=zrt(c,-l),Frt(o)):c,Prt(t,e,h)},"pointInsidePolygon"),$rt=me(function(t,e,r,n,i,a,s,o){for(var l=new Array(2*r.length),c=0;c<o.length;c++){var h=o[c];if(l[4*c+0]=h.startX,l[4*c+1]=h.startY,l[4*c+2]=h.stopX,l[4*c+3]=h.stopY,Math.pow(h.cx-t,2)+Math.pow(h.cy-e,2)<=Math.pow(h.radius,2))return!0}return Prt(t,e,l)},"pointInsideRoundPolygon"),Frt=me(function(t){for(var e,r,n,i=new Array(t.length/2),a=0;a<t.length/4;a++){var s=a<t.length/4-1?(e=t[4*(a+1)],r=t[4*(a+1)+1],n=t[4*(a+1)+2],t[4*(a+1)+3]):(e=t[0],r=t[1],n=t[2],t[3]),s=Wrt(t[4*a],t[4*a+1],t[4*a+2],t[4*a+3],e,r,n,s,!0);i[2*a]=s[0],i[2*a+1]=s[1]}return i},"joinLines"),zrt=me(function(t,e){for(var r,n=new Array(2*t.length),i=0;i<t.length/2;i++){var a,s,o,l=(o=i<t.length/2-1?(r=t[2*(i+1)],t[2*(i+1)+1]):(r=t[0],t[1]))-(s=t[2*i+1]),c=-(r-(a=t[2*i])),h=Math.sqrt(l*l+c*c),c=c/h;n[4*i]=a+(l/=h)*e,n[4*i+1]=s+c*e,n[4*i+2]=r+l*e,n[4*i+3]=o+c*e}return n},"expandPolygon"),Grt=me(function(t,e,r,n,i,a){var s=r-t,o=n-e;return s/=i,o/=a,(a=(i=Math.sqrt(s*s+o*o))-1)<0?[]:[(r-t)*(s=a/i)+t,(n-e)*s+e]},"intersectLineEllipse"),Urt=me(function(t,e,r,n,i,a,s){return(t=(t-i)/(r/2+s))*t+(e=(e-a)/(n/2+s))*e<=1},"checkInEllipse"),qrt=me(function(t,e,r,n,i,a,s){return r=[r-t,n-e],n=[t-i,e-a],i=r[0]*r[0]+r[1]*r[1],(n=(a=2*(n[0]*r[0]+n[1]*r[1]))*a-4*i*(n[0]*n[0]+n[1]*n[1]-s*s))<0||(s=(-a+Math.sqrt(n))/(2*i),a=(-a-Math.sqrt(n))/(2*i),n=Math.min(s,a),i=Math.max(s,a),s=[],0<=n&&n<=1&&s.push(n),0<=i&&i<=1&&s.push(i),0===s.length)?[]:(a=s[0]*r[0]+t,n=s[0]*r[1]+e,1<s.length&&s[0]!=s[1]?[a,n,s[1]*r[0]+t,s[1]*r[1]+e]:[a,n])},"intersectLineCircle"),jrt=me(function(t,e,r){return e<=t&&t<=r||r<=t&&t<=e?t:t<=e&&e<=r||r<=e&&e<=t?e:r},"midOfThree"),Wrt=me(function(t,e,r,n,i,a,s,o,l){var c=t-i,h=r-t,u=s-i,d=n-e,p=o-a,g=u*(f=e-a)-p*c,f=h*f-d*c;return 0!=(c=p*h-u*d)?(p=f/c,-.001<=(u=g/c)&&u<=1.001&&-.001<=p&&p<=1.001||l?[t+u*h,e+u*d]:[]):0==g||0==f?jrt(t,r,s)===s?[s,o]:jrt(t,r,i)===i?[i,a]:jrt(i,s,r)===r?[r,n]:[]:[]},"finiteLinesIntersect"),Yrt=me(function(t,e,r,n,i,a,s,o){var l=[],c=new Array(r.length);if(null!=a){for(var h,u=0;u<c.length/2;u++)c[2*u]=r[2*u]*a+n,c[2*u+1]=r[2*u+1]*s+i;h=0<o?(o=zrt(c,-o),Frt(o)):c}else h=r;for(var d,p,g,f,m=0;m<h.length/2;m++)d=h[2*m],p=h[2*m+1],f=m<h.length/2-1?(g=h[2*(m+1)],h[2*(m+1)+1]):(g=h[0],h[1]),0!==(d=Wrt(t,e,n,i,d,p,g,f)).length&&l.push(d[0],d[1]);return l},"polygonIntersectLine"),Hrt=me(function(r,n,t,i,a,e,s,o,l){var c,h=[],u=new Array(2*t.length);l.forEach(function(t,e){0===e?(u[u.length-2]=t.startX,u[u.length-1]=t.startY):(u[4*e-2]=t.startX,u[4*e-1]=t.startY),u[4*e]=t.stopX,u[4*e+1]=t.stopY,0!==(c=qrt(r,n,i,a,t.cx,t.cy,t.radius)).length&&h.push(c[0],c[1])});for(var d=0;d<u.length/4;d++)0!==(c=Wrt(r,n,i,a,u[4*d],u[4*d+1],u[4*d+2],u[4*d+3],!1)).length&&h.push(c[0],c[1]);if(2<h.length){for(var p=[h[0],h[1]],g=Math.pow(p[0]-r,2)+Math.pow(p[1]-n,2),f=1;f<h.length/2;f++){var m=Math.pow(h[2*f]-r,2)+Math.pow(h[2*f+1]-n,2);m<=g&&(p[0]=h[2*f],p[1]=h[2*f+1],g=m)}return p}return h},"roundPolygonIntersectLine"),Vrt=me(function(t,e,r){var t=[t[0]-e[0],t[1]-e[1]],n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),r=(n-r)/n;return[e[0]+(r=r<0?1e-5:r)*t[0],e[1]+r*t[1]]},"shortenIntersection"),Xrt=me(function(t,e){return t=Zrt(t,e),Krt(t)},"generateUnitNgonPointsFitToSquare"),Krt=me(function(t){for(var e,r,n=t.length/2,i=1/0,a=1/0,s=-1/0,o=-1/0,l=0;l<n;l++)e=t[2*l],r=t[2*l+1],i=Math.min(i,e),s=Math.max(s,e),a=Math.min(a,r),o=Math.max(o,r);for(var c=2/(s-i),h=2/(o-a),u=0;u<n;u++)e=t[2*u]=t[2*u]*c,r=t[2*u+1]=t[2*u+1]*h,i=Math.min(i,e),s=Math.max(s,e),a=Math.min(a,r),o=Math.max(o,r);if(a<-1)for(var d=0;d<n;d++)r=t[2*d+1]=t[2*d+1]+(-1-a);return t},"fitPolygonToSquare"),Zrt=me(function(t,e){var r=1/t*2*Math.PI,n=t%2==0?Math.PI/2+r/2:Math.PI/2;n+=e;for(var i,a=new Array(2*t),s=0;s<t;s++)i=s*r+n,a[2*s]=Math.cos(i),a[2*s+1]=Math.sin(-i);return a},"generateUnitNgonPoints"),Qrt=me(function(t,e){return Math.min(t/4,e/4,8)},"getRoundRectangleRadius"),Jrt=me(function(t,e){return Math.min(t/10,e/10,8)},"getRoundPolygonRadius"),tnt=me(function(){return 8},"getCutRectangleCornerLength"),ent=me(function(t,e,r){return[t-2*e+r,2*(e-t),t]},"bezierPtsToQuadCoeff"),rnt=me(function(t,e){return{heightOffset:Math.min(15,.05*e),widthOffset:Math.min(100,.25*t),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),nnt=Det({dampingFactor:.8,precision:1e-6,iterations:200,weight:me(function(t){return 1},"weight")}),tot={pageRank:me(function(t){for(var e=(t=nnt(t)).dampingFactor,r=t.precision,n=t.iterations,i=t.weight,a=this._private.cy,s=(t=this.byGroup()).nodes,o=t.edges,l=s.length,c=o.length,h=new Array(l*l),u=new Array(l),d=(1-e)/l,p=0;p<l;p++){for(var g=0;g<l;g++)h[p*l+g]=0;u[p]=0}for(var f=0;f<c;f++){var m=o[f],y=m.data("source"),v=m.data("target");y!==v&&(y=s.indexOfId(y),v=s.indexOfId(v),m=i(m),h[v*l+y]+=m,u[y]+=m)}for(var x=1/l+d,b=0;b<l;b++)if(0===u[b])for(var w=0;w<l;w++)h[w*l+b]=x;else for(var k=0;k<l;k++){var T=k*l+b;h[T]=h[T]/u[b]+d}for(var E=new Array(l),C=new Array(l),S=0;S<l;S++)E[S]=1;for(var _=0;_<n;_++){for(var A=0;A<l;A++)C[A]=0;for(var L=0;L<l;L++)for(var N=0;N<l;N++)C[L]+=h[L*l+N]*E[N];urt(C);for(var I=E,E=C,C=I,R=0,M=0;M<l;M++){var D=I[M]-E[M];R+=D*D}if(R<r)break}return{rank:me(function(t){return t=a.collection(t)[0],E[s.indexOf(t)]},"rank")}},"pageRank")},ant=Det({root:null,weight:me(function(t){return 1},"weight"),directed:!1,alpha:0}),(Tlt={degreeCentralityNormalized:me(function(t){t=ant(t);var e=this.cy(),r=this.nodes(),n=r.length;if(t.directed){for(var i={},a={},s=0,o=0,l=0;l<n;l++){var c=(h=r[l]).id(),h=(t.root=h,this.degreeCentrality(t));s<h.indegree&&(s=h.indegree),o<h.outdegree&&(o=h.outdegree),i[c]=h.indegree,a[c]=h.outdegree}return{indegree:me(function(t){return 0==s?0:(YJ(t)&&(t=e.filter(t)),i[t.id()]/s)},"indegree"),outdegree:me(function(t){return 0===o?0:(YJ(t)&&(t=e.filter(t)),a[t.id()]/o)},"outdegree")}}for(var u={},d=0,p=0;p<n;p++){var g=r[p],f=(t.root=g,this.degreeCentrality(t));d<f.degree&&(d=f.degree),u[g.id()]=f.degree}return{degree:me(function(t){return 0===d?0:(YJ(t)&&(t=e.filter(t)),u[t.id()]/d)},"degree")}},"degreeCentralityNormalized"),degreeCentrality:me(function(t){t=ant(t);var e=this.cy(),r=this,n=t.root,i=t.weight,a=t.directed,t=t.alpha,n=e.collection(n)[0];if(a){for(var s=(e=n.connectedEdges()).filter(function(t){return t.target().same(n)&&r.has(t)}),o=e.filter(function(t){return t.source().same(n)&&r.has(t)}),a=s.length,e=o.length,l=0,c=0,h=0;h<s.length;h++)l+=i(s[h]);for(var u=0;u<o.length;u++)c+=i(o[u]);return{indegree:Math.pow(a,1-t)*Math.pow(l,t),outdegree:Math.pow(e,1-t)*Math.pow(c,t)}}for(var d=n.connectedEdges().intersection(r),a=d.length,p=0,g=0;g<d.length;g++)p+=i(d[g]);return{degree:Math.pow(a,1-t)*Math.pow(p,t)}},"degreeCentrality")}).dc=Tlt.degreeCentrality,Tlt.dcn=Tlt.degreeCentralityNormalised=Tlt.degreeCentralityNormalized,snt=Det({harmonic:!0,weight:me(function(){return 1},"weight"),directed:!1,root:null}),(Wot={closenessCentralityNormalized:me(function(t){for(var e=(t=snt(t)).harmonic,r=t.weight,t=t.directed,n=this.cy(),i={},a=0,s=this.nodes(),o=this.floydWarshall({weight:r,directed:t}),l=0;l<s.length;l++){for(var c,h=0,u=s[l],d=0;d<s.length;d++)l!==d&&(c=o.distance(u,s[d]),h+=e?1/c:c);a<(h=e?h:1/h)&&(a=h),i[u.id()]=h}return{closeness:me(function(t){return 0==a?0:(t=(YJ(t)?n.filter(t)[0]:t).id(),i[t]/a)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:me(function(t){for(var e=(t=snt(t)).root,r=t.weight,n=t.directed,i=t.harmonic,e=this.filter(e)[0],a=this.dijkstra({root:e,weight:r,directed:n}),s=0,o=this.nodes(),l=0;l<o.length;l++){var c=o[l];c.same(e)||(c=a.distanceTo(c),s+=i?1/c:c)}return i?s:1/s},"closenessCentrality")}).cc=Wot.closenessCentrality,Wot.ccn=Wot.closenessCentralityNormalised=Wot.closenessCentralityNormalized,ont=Det({weight:null,directed:!1}),(glt={betweennessCentrality:me(function(t){for(var e=(t=ont(t)).directed,w=t.weight,k=null!=w,T=this.cy(),E=this.nodes(),C={},r={},n=0,S={set:me(function(t,e){n<(r[t]=e)&&(n=e)},"set"),get:me(function(t){return r[t]},"get")},i=0;i<E.length;i++){var a=E[i],s=a.id();C[s]=(e?a.outgoers():a.openNeighborhood()).nodes(),S.set(s,0)}for(var o=me(function(t){for(var e=E[t].id(),r=[],n={},i={},a={},s=new qet(function(t,e){return a[t]-a[e]}),o=0;o<E.length;o++){var l=E[o].id();n[l]=[],a[l]=1/(i[l]=0)}for(i[e]=1,a[e]=0,s.push(e);!s.empty();){var c=s.pop();if(r.push(c),k)for(var h=0;h<C[c].length;h++){var u=C[c][h],d=(0<(p=T.getElementById(c)).edgesTo(u).length?p.edgesTo(u):u.edgesTo(p))[0],p=w(d),u=u.id();a[c]+p<a[u]&&(a[u]=a[c]+p,s.nodes.indexOf(u)<0?s.push(u):s.updateItem(u),i[u]=0,n[u]=[]),a[u]==a[c]+p&&(i[u]=i[u]+i[c],n[u].push(c))}else for(var g=0;g<C[c].length;g++){var f=C[c][g].id();a[f]==1/0&&(s.push(f),a[f]=a[c]+1),a[f]==a[c]+1&&(i[f]=i[f]+i[c],n[f].push(c))}}for(var m={},y=0;y<E.length;y++)m[E[y].id()]=0;for(;0<r.length;){for(var v=r.pop(),x=0;x<n[v].length;x++){var b=n[v][x];m[b]=m[b]+i[b]/i[v]*(1+m[v])}v!=E[t].id()&&S.set(v,S.get(v)+m[v])}},"_loop"),l=0;l<E.length;l++)o(l);return(t={betweenness:me(function(t){return t=T.collection(t).id(),S.get(t)},"betweenness"),betweennessNormalized:me(function(t){return 0==n?0:(t=T.collection(t).id(),S.get(t)/n)},"betweennessNormalized")}).betweennessNormalised=t.betweennessNormalized,t},"betweennessCentrality")}).bc=glt.betweennessCentrality,lnt=Det({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),cnt=me(function(t){return lnt(t)},"setOptions"),hnt=me(function(t,e){for(var r=0,n=0;n<e.length;n++)r+=e[n](t);return r},"getSimilarity"),unt=me(function(t,e,r){for(var n=0;n<e;n++)t[n*e+n]=r},"addLoops"),dnt=me(function(t,e){for(var r=0;r<e;r++){for(var n=0,i=0;i<e;i++)n+=t[i*e+r];for(var a=0;a<e;a++)t[a*e+r]=t[a*e+r]/n}},"normalize"),pnt=me(function(t,e,r){for(var n=new Array(r*r),i=0;i<r;i++){for(var a=0;a<r;a++)n[i*r+a]=0;for(var s=0;s<r;s++)for(var o=0;o<r;o++)n[i*r+o]+=t[i*r+s]*e[s*r+o]}return n},"mmult"),gnt=me(function(t,e,r){for(var n=t.slice(0),i=1;i<r;i++)t=pnt(t,n,e);return t},"expand"),fnt=me(function(t,e,r){for(var n=new Array(e*e),i=0;i<e*e;i++)n[i]=Math.pow(t[i],r);return dnt(n,e),n},"inflate"),mnt=me(function(t,e,r,n){for(var i=0;i<r;i++)if(Math.round(t[i]*Math.pow(10,n))/Math.pow(10,n)!=Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n))return!1;return!0},"hasConverged"),ynt=me(function(t,e,r,n){for(var i=[],a=0;a<e;a++){for(var s=[],o=0;o<e;o++)0<Math.round(1e3*t[a*e+o])/1e3&&s.push(r[o]);0!==s.length&&i.push(n.collection(s))}return i},"assign"),vnt=me(function(t,e){for(var r=0;r<t.length;r++)if(!e[r]||t[r].id()!==e[r].id())return!1;return!0},"isDuplicate"),xnt=me(function(t){for(var e=0;e<t.length;e++)for(var r=0;r<t.length;r++)e!=r&&vnt(t[e],t[r])&&t.splice(r,1);return t},"removeDuplicates"),Sot={markovClustering:Sot=me(function(t){for(var e=this.nodes(),r=this.edges(),n=this.cy(),i=cnt(t),a={},s=0;s<e.length;s++)a[e[s].id()]=s;for(var o,l=e.length,c=l*l,h=new Array(c),u=0;u<c;u++)h[u]=0;for(var d=0;d<r.length;d++){var p=a[(f=r[d]).source().id()],g=a[f.target().id()],f=hnt(f,i.attributes);h[p*l+g]+=f,h[g*l+p]+=f}unt(h,l,i.multFactor),dnt(h,l);for(var m=!0,y=0;m&&y<i.maxIterations;)m=!1,o=gnt(h,l,i.expandFactor),h=fnt(o,l,i.inflateFactor),mnt(h,o,c,4)||(m=!0),y++;return t=ynt(h,l,e,n),xnt(t)},"markovClustering"),mcl:Sot},bnt=me(function(t){return t},"identity"),wnt=me(function(t,e){return Math.abs(e-t)},"absDiff"),knt=me(function(t,e,r){return t+wnt(e,r)},"addAbsDiff"),Tnt=me(function(t,e,r){return t+Math.pow(r-e,2)},"addSquaredDiff"),Ent=me(function(t){return Math.sqrt(t)},"sqrt"),Cnt=me(function(t,e,r){return Math.max(t,wnt(e,r))},"maxAbsDiff"),Snt=me(function(t,e,r,n,i){for(var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:bnt,s=n,o=0;o<t;o++)s=i(s,e(o),r(o));return a(s)},"getDistance"),(_nt={euclidean:me(function(t,e,r){return 2<=t?Snt(t,e,r,0,Tnt,Ent):Snt(t,e,r,0,knt)},"euclidean"),squaredEuclidean:me(function(t,e,r){return Snt(t,e,r,0,Tnt)},"squaredEuclidean"),manhattan:me(function(t,e,r){return Snt(t,e,r,0,knt)},"manhattan"),max:me(function(t,e,r){return Snt(t,e,r,-1/0,Cnt)},"max")})["squared-euclidean"]=_nt.squaredEuclidean,_nt.squaredeuclidean=_nt.squaredEuclidean,me(uZ,"clusteringDistance"),Ant=Det({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Lnt=me(function(t){return Ant(t)},"setOptions"),Nnt=me(function(t,e,r,n,i){var i="kMedoids"!==i?function(t){return r[t]}:function(t){return n[t](r)},a=me(function(t){return n[t](e)},"getQ");return uZ(t,n.length,i,a,r,e)},"getDist"),Int=me(function(t,e,r){for(var n=r.length,i=new Array(n),a=new Array(n),s=new Array(e),o=null,l=0;l<n;l++)i[l]=t.min(r[l]).value,a[l]=t.max(r[l]).value;for(var c=0;c<e;c++){for(var o=[],h=0;h<n;h++)o[h]=Math.random()*(a[h]-i[h])+i[h];s[c]=o}return s},"randomCentroids"),Rnt=me(function(t,e,r,n,i){for(var a=1/0,s=0,o=0;o<e.length;o++){var l=Nnt(r,t,e[o],n,i);l<a&&(a=l,s=o)}return s},"classify"),Mnt=me(function(t,e,r){for(var n=[],i=null,a=0;a<e.length;a++)r[(i=e[a]).id()]===t&&n.push(i);return n},"buildCluster"),Dnt=me(function(t,e,r){return Math.abs(e-t)<=r},"haveValuesConverged"),Ont=me(function(t,e,r){for(var n=0;n<t.length;n++)for(var i=0;i<t[n].length;i++)if(r<Math.abs(t[n][i]-e[n][i]))return!1;return!0},"haveMatricesConverged"),Pnt=me(function(t,e,r){for(var n=0;n<r;n++)if(t===e[n])return!0;return!1},"seenBefore"),Bnt=me(function(t,e){var r=new Array(e);if(t.length<50)for(var n=0;n<e;n++){for(var i=t[Math.floor(Math.random()*t.length)];Pnt(i,r,n);)i=t[Math.floor(Math.random()*t.length)];r[n]=i}else for(var a=0;a<e;a++)r[a]=t[Math.floor(Math.random()*t.length)];return r},"randomMedoids"),$nt=me(function(t,e,r){for(var n=0,i=0;i<e.length;i++)n+=Nnt("manhattan",e[i],t,r,"kMedoids");return n},"findCost"),Oot=me(function(t){for(var e=this.cy(),r=this.nodes(),n=null,i=Lnt(t),a=new Array(i.k),s={},o=i.testMode?"number"==typeof i.testCentroids?(i.testCentroids,Int(r,i.k,i.attributes)):"object"===$K(i.testCentroids)?i.testCentroids:Int(r,i.k,i.attributes):Int(r,i.k,i.attributes),l=!0,c=0;l&&c<i.maxIterations;){for(var h=0;h<r.length;h++)s[(n=r[h]).id()]=Rnt(n,o,i.distance,i.attributes,"kMeans");for(var l=!1,u=0;u<i.k;u++){var d=Mnt(u,r,s);if(0!==d.length){for(var p=i.attributes.length,g=o[u],f=new Array(p),m=new Array(p),y=0;y<p;y++){for(var v=m[y]=0;v<d.length;v++)n=d[v],m[y]+=i.attributes[y](n);f[y]=m[y]/d.length,Dnt(f[y],g[y],i.sensitivityThreshold)||(l=!0)}o[u]=f,a[u]=e.collection(d)}}c++}return a},"kMeans"),flt=me(function(t){var e,r,n=this.cy(),i=this.nodes(),a=null,s=Lnt(t),o=new Array(s.k),l={},c=new Array(s.k);s.testMode?"number"!=typeof s.testCentroids&&(e="object"===$K(s.testCentroids)?s.testCentroids:Bnt(i,s.k)):e=Bnt(i,s.k);for(var h=!0,u=0;h&&u<s.maxIterations;){for(var d=0;d<i.length;d++)l[(a=i[d]).id()]=Rnt(a,e,s.distance,s.attributes,"kMedoids");for(var h=!1,p=0;p<e.length;p++){var g=Mnt(p,i,l);if(0!==g.length){c[p]=$nt(e[p],g,s.attributes);for(var f=0;f<g.length;f++)(r=$nt(g[f],g,s.attributes))<c[p]&&(c[p]=r,e[p]=g[f],h=!0);o[p]=n.collection(g)}}u++}return o},"kMedoids"),Fnt=me(function(t,e,r,n,i){for(var a=0;a<e.length;a++)for(var s=0;s<t.length;s++)n[a][s]=Math.pow(r[a][s],i.m);for(var o=0;o<t.length;o++)for(var l=0;l<i.attributes.length;l++){for(var c=0,h=0,u=0;u<e.length;u++)c+=n[u][o]*i.attributes[l](e[u]),h+=n[u][o];t[o][l]=c/h}},"updateCentroids"),znt=me(function(t,e,r,n,i){for(var a=0;a<t.length;a++)e[a]=t[a].slice();for(var s,o,l=2/(i.m-1),c=0;c<r.length;c++)for(var h=0;h<n.length;h++){for(var u=0,d=0;d<r.length;d++)s=Nnt(i.distance,n[h],r[c],i.attributes,"cmeans"),o=Nnt(i.distance,n[h],r[d],i.attributes,"cmeans"),u+=Math.pow(s/o,l);t[h][c]=1/u}},"updateMembership"),Gnt=me(function(t,e,r,n){for(var i=new Array(r.k),a=0;a<i.length;a++)i[a]=[];for(var s=0;s<e.length;s++){for(var o=-1/0,l=-1,c=0;c<e[0].length;c++)e[s][c]>o&&(o=e[s][c],l=c);i[l].push(t[s])}for(var h=0;h<i.length;h++)i[h]=n.collection(i[h]);return i},"assign"),Yot=me(function(t){for(var e=this.cy(),r=this.nodes(),n=Lnt(t),i=new Array(r.length),a=0;a<r.length;a++)i[a]=new Array(n.k);for(var s=new Array(r.length),o=0;o<r.length;o++)s[o]=new Array(n.k);for(var l=0;l<r.length;l++){for(var c=0,h=0;h<n.k;h++)s[l][h]=Math.random(),c+=s[l][h];for(var u=0;u<n.k;u++)s[l][u]=s[l][u]/c}for(var d=new Array(n.k),p=0;p<n.k;p++)d[p]=new Array(n.attributes.length);for(var g=new Array(r.length),f=0;f<r.length;f++)g[f]=new Array(n.k);for(var m=!0,y=0;m&&y<n.maxIterations;)m=!1,Fnt(d,r,s,g,n),znt(s,i,d,r,n),Ont(s,i,n.sensitivityThreshold)||(m=!0),y++;return{clusters:Gnt(r,s,n,e),degreeOfMembership:s}},"fuzzyCMeans"),Unt=Det({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!(Oot={kMeans:Oot,kMedoids:flt,fuzzyCMeans:Yot,fcm:Yot}),dendrogramDepth:0,attributes:[]}),qnt={single:"min",complete:"max"},jnt=me(function(t){var t=Unt(t),e=qnt[t.linkage];return null!=e&&(t.linkage=e),t},"setOptions"),Wnt=me(function(t,e,r,n,i){for(var a,s=0,o=1/0,l=i.attributes,c=me(function(e,r){return uZ(i.distance,l.length,function(t){return l[t](e)},function(t){return l[t](r)},e,r)},"getDist"),h=0;h<t.length;h++){var u=t[h].key,d=r[u][n[u]];d<o&&(s=u,o=d)}if("threshold"===i.mode&&o>=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var p=e[s],g=e[n[s]],f="dendrogram"===i.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};t[p.index]=f,t.splice(g.index,1),e[p.key]=f;for(var m=0;m<t.length;m++){var y=t[m];p.key===y.key?a=1/0:"min"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]>r[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]<r[g.key][y.key]&&(a=r[g.key][y.key])):a="mean"===i.linkage?(r[p.key][y.key]*p.size+r[g.key][y.key]*g.size)/(p.size+g.size):"dendrogram"===i.mode?c(y.value,p.value):c(y.value[0],p.value[0]),r[p.key][y.key]=r[y.key][p.key]=a}for(var v=0;v<t.length;v++){var x=t[v].key;if(n[x]===p.key||n[x]===g.key){for(var b=x,w=0;w<t.length;w++){var k=t[w].key;r[x][k]<r[x][b]&&(b=k)}n[x]=b}t[v].index=v}return!(p.key=g.key=p.index=g.index=null)},"mergeClosest"),Ynt=me(function t(e,r,n){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},"getAllChildren"),Hnt=me(function t(e,r){var n,i,a;return e?e.left&&e.right?(n=t(e.left,r),i=t(e.right,r),a=r.add({group:"nodes",data:{id:n+","+i}}),r.add({group:"edges",data:{source:n,target:a.id()}}),r.add({group:"edges",data:{source:i,target:a.id()}}),a.id()):e.value?e.value.id():void 0:""},"buildDendrogram"),Vnt=me(function t(e,r,n){var i,a,s;return e?(i=[],a=[],0===r?(e.left&&Ynt(e.left,i),e.right&&Ynt(e.right,a),s=i.concat(a),[n.collection(s)]):1===r?e.value?[n.collection(e.value)]:(e.left&&Ynt(e.left,i),e.right&&Ynt(e.right,a),[n.collection(i),n.collection(a)]):e.value?[n.collection(e.value)]:(e.left&&(i=t(e.left,r-1,n)),e.right&&(a=t(e.right,r-1,n)),i.concat(a))):[]},"buildClustersFromTree"),flt=me(function(t){for(var r=this.cy(),e=this.nodes(),n=jnt(t),i=n.attributes,a=me(function(e,r){return uZ(n.distance,i.length,function(t){return i[t](e)},function(t){return i[t](r)},e,r)},"getDist"),s=[],o=[],l=[],c=[],h=0;h<e.length;h++){var u={value:"dendrogram"===n.mode?e[h]:[e[h]],key:h,index:h};c[h]=s[h]=u,o[h]=[],l[h]=0}for(var d=0;d<s.length;d++)for(var p=0;p<=d;p++){var g="dendrogram"===n.mode?d===p?1/0:a(s[d].value,s[p].value):d===p?1/0:a(s[d].value[0],s[p].value[0]);o[d][p]=g,(o[p][d]=g)<o[d][l[d]]&&(l[d]=p)}for(var f,m=Wnt(s,c,o,l,n);m;)m=Wnt(s,c,o,l,n);return"dendrogram"===n.mode?(f=Vnt(s[0],n.dendrogramDepth,r),n.addDendrogram&&Hnt(s[0],r)):(f=new Array(s.length),s.forEach(function(t,e){t.key=t.index=null,f[e]=r.collection(t.value)})),f},"hierarchicalClustering"),Yot={hierarchicalClustering:flt,hca:flt},Xnt=Det({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Knt=me(function(t){var e=t.damping,r=t.preference;return.5<=e&&e<1||Eet("Damping must range on [0.5, 1). Got: ".concat(e)),(e=["median","mean","min","max"]).some(function(t){return t===r})||at(r)||Eet("Preference must be one of [".concat(e.map(function(t){return"'".concat(t,"'")}).join(", "),"] or a number. Got: ").concat(r)),Xnt(t)},"setOptions"),Znt=me(function(t,e,r,n){var i=me(function(t,e){return n[e](t)},"attr");return-uZ(t,n.length,function(t){return i(e,t)},function(t){return i(r,t)},e,r)},"getSimilarity"),Qnt=me(function(t,e){return"median"===e?irt(t):"mean"===e?nrt(t):"min"===e?ert(t):"max"===e?rrt(t):e},"getPreference"),Jnt=me(function(t,e,r){for(var n=[],i=0;i<t;i++)0<e[i*t+i]+r[i*t+i]&&n.push(i);return n},"findExemplars"),tit=me(function(t,e,r){for(var n=[],i=0;i<t;i++){for(var a=-1,s=-1/0,o=0;o<r.length;o++){var l=r[o];e[i*t+l]>s&&(s=e[i*t+(a=l)])}0<a&&n.push(a)}for(var c=0;c<r.length;c++)n[r[c]]=r[c];return n},"assignClusters"),eit=me(function(t,e,r){for(var n=tit(t,e,r),i=0;i<r.length;i++){for(var a=[],s=0;s<n.length;s++)n[s]===r[i]&&a.push(s);for(var o=-1,l=-1/0,c=0;c<a.length;c++){for(var h=0,u=0;u<a.length;u++)h+=e[a[u]*t+a[c]];l<h&&(o=c,l=h)}r[i]=a[o]}return tit(t,e,r)},"assign"),flt=me(function(P){for(var B=this.cy(),t=this.nodes(),e=Knt(P),$={},r=0;r<t.length;r++)$[t[r].id()]=r;for(var n,i=(n=t.length)*n,a=new Array(i),s=0;s<i;s++)a[s]=-1/0;for(var o=0;o<n;o++)for(var l=0;l<n;l++)o!==l&&(a[o*n+l]=Znt(e.distance,t[o],t[l],e.attributes));for(var F=Qnt(a,e.preference),c=0;c<n;c++)a[c*n+c]=F;for(var h=new Array(i),u=0;u<i;u++)h[u]=0;for(var d=new Array(i),p=0;p<i;p++)d[p]=0;for(var g=new Array(n),f=new Array(n),m=new Array(n),y=0;y<n;y++)g[y]=0,f[y]=0,m[y]=0;for(var v,x=new Array(n*e.minIterations),z=0;z<x.length;z++)x[z]=0;for(v=0;v<e.maxIterations;v++){for(var b=0;b<n;b++){for(var w,k=-1/0,T=-1/0,E=-1,C=0;C<n;C++)g[C]=h[b*n+C],k<=(w=d[b*n+C]+a[b*n+C])?(T=k,k=w,E=C):T<w&&(T=w);for(var S=0;S<n;S++)h[b*n+S]=(1-e.damping)*(a[b*n+S]-k)+e.damping*g[S];h[b*n+E]=(1-e.damping)*(a[b*n+E]-T)+e.damping*g[E]}for(var _=0;_<n;_++){for(var A=0,L=0;L<n;L++)g[L]=d[L*n+_],f[L]=Math.max(0,h[L*n+_]),A+=f[L];A-=f[_],f[_]=h[_*n+_],A+=f[_];for(var N=0;N<n;N++)d[N*n+_]=(1-e.damping)*Math.min(0,A-f[N])+e.damping*g[N];d[_*n+_]=(1-e.damping)*(A-f[_])+e.damping*g[_]}for(var G=0,I=0;I<n;I++){var U=0<d[I*n+I]+h[I*n+I]?1:0;G+=x[v%e.minIterations*n+I]=U}if(0<G&&(v>=e.minIterations-1||v==e.maxIterations-1)){for(var q=0,R=0;R<n;R++){for(var j=m[R]=0;j<e.minIterations;j++)m[R]+=x[j*n+R];0!==m[R]&&m[R]!==e.minIterations||q++}if(q===n)break}}for(var M=Jnt(n,h,d),W=eit(n,a,M),Y={},H=0;H<M.length;H++)Y[M[H]]=[];for(var D=0;D<t.length;D++){var V=W[$[t[D].id()]];null!=V&&Y[V].push(t[D])}for(var X=new Array(M.length),O=0;O<M.length;O++)X[O]=B.collection(Y[M[O]]);return X},"affinityPropagation"),rit=Det({root:void 0,directed:!(flt={affinityPropagation:flt,ap:flt})}),Bot={hierholzer:me(function(t){XJ(t)||(t={root:(r=arguments)[0],directed:r[1]});var a,s,e,r=rit(t),t=r.root,o=r.directed,l=!1,c=(t&&(e=(YJ(t)?this.filter(t):t)[0].id()),{}),h={},n=(o?this.forEach(function(t){var e,r,n,i=t.id();t.isNode()?(r=t.indegree(!0),n=(e=t.outdegree(!0))-r,1==(r-=e)?a?l=!0:a=i:1==n?s?l=!0:s=i:(1<n||1<r)&&(l=!0),c[i]=[],t.outgoers().forEach(function(t){t.isEdge()&&c[i].push(t.id())})):h[i]=[void 0,t.target().id()]}):this.forEach(function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(a?s?l=!0:s=e:a=e),c[e]=[],t.connectedEdges().forEach(function(t){return c[e].push(t.id())})):h[e]=[t.source().id(),t.target().id()]}),{found:!1,trail:void 0});if(!l){if(s&&a)if(o){if(e&&s!=e)return n;e=s}else{if(e&&s!=e&&a!=e)return n;e=e||s}else e=e||this[0].id();for(var i,u=me(function(t){for(var e,r,n,i=t,a=[t];c[i].length;)e=c[i].shift(),r=h[e][0],i!=(n=h[e][1])?(c[n]=c[n].filter(function(t){return t!=e}),i=n):o||i==r||(c[r]=c[r].filter(function(t){return t!=e}),i=r),a.unshift(e),a.unshift(i);return a},"walk"),d=[],p=[],p=u(e);1!=p.length;)0==c[p[0]].length?(d.unshift(this.getElementById(p.shift())),d.unshift(this.getElementById(p.shift()))):p=u(p.shift()).concat(p);for(i in d.unshift(this.getElementById(p.shift())),c)if(c[i].length)return n;n.found=!0,n.trail=this.spawn(d,!0)}return n},"hierholzer")},slt={hopcroftTarjanBiconnected:slt=me(function(){var o=this,l={},c=0,h=0,u=[],d=[],p={},g=me(function(t,e){for(var r=d.length-1,n=[],i=o.spawn();d[r].x!=t||d[r].y!=e;)n.push(d.pop().edge),r--;n.push(d.pop().edge),n.forEach(function(t){var e=t.connectedNodes().intersection(o);i.merge(t),e.forEach(function(t){var e=t.id(),r=t.connectedEdges().intersection(o);i.merge(t),l[e].cutVertex?i.merge(r.filter(function(t){return t.isLoop()})):i.merge(r)})}),u.push(i)},"buildComponent"),e=me(function e(r,n,i){r===i&&(h+=1),l[n]={id:c,low:c++,cutVertex:!1};var a,s,t=o.getElementById(n).connectedEdges().intersection(o);0===t.size()?u.push(o.spawn(o.getElementById(n))):t.forEach(function(t){s=t.source().id(),a=t.target().id(),(a=s===n?a:s)!==i&&(s=t.id(),p[s]||(p[s]=!0,d.push({x:n,y:a,edge:t})),a in l?l[n].low=Math.min(l[n].low,l[a].id):(e(r,a,n),l[n].low=Math.min(l[n].low,l[a].low),l[n].id<=l[a].low&&(l[n].cutVertex=!0,g(n,a))))})},"biconnectedSearch"),t=(o.forEach(function(t){!t.isNode()||(t=t.id())in l||(h=0,e(t,t),l[t].cutVertex=1<h)}),Object.keys(l).filter(function(t){return l[t].cutVertex}).map(function(t){return o.getElementById(t)}));return{cut:o.spawn(t),components:u}},"hopcroftTarjanBiconnected"),htbc:slt,htb:slt,hopcroftTarjanBiconnectedComponents:slt},xlt=me(function(){var a=this,s={},o=0,l=[],c=[],h=a.spawn(a),e=me(function e(r){if(c.push(r),s[r]={index:o,low:o++,explored:!1},a.getElementById(r).connectedEdges().intersection(a).forEach(function(t){(t=t.target().id())!==r&&(t in s||e(t),s[t].explored||(s[r].low=Math.min(s[r].low,s[t].low)))}),s[r].index===s[r].low){for(var t=a.spawn();;){var n=c.pop();if(t.merge(a.getElementById(n)),s[n].low=s[r].index,s[n].explored=!0,n===r)break}var i=t.edgesWith(t),i=t.merge(i);l.push(i),h=h.difference(i)}},"stronglyConnectedSearch");return a.forEach(function(t){!t.isNode()||(t=t.id())in s||e(t)}),{cut:h,components:l}},"tarjanStronglyConnected"),nit={},[mlt,Hot,Elt,Kot,olt,jot,Vot,tot,Tlt,Wot,glt,Sot,Oot,Yot,flt,Bot,slt,{tarjanStronglyConnected:xlt,tsc:xlt,tscc:xlt,tarjanStronglyConnectedComponents:xlt}].forEach(function(t){vtt(nit,t)}),iit=0,(ait=me(function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=iit,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api")).prototype={fulfill:me(function(t){return sit(this,1,"fulfillValue",t)},"fulfill"),reject:me(function(t){return sit(this,2,"rejectReason",t)},"reject"),then:me(function(t,e){var r=new ait;return this.onFulfilled.push(cit(t,r,"fulfill")),this.onRejected.push(cit(e,r,"reject")),oit(this),r.proxy},"then")},sit=me(function(t,e,r,n){return t.state===iit&&(t.state=e,t[r]=n,oit(t)),t},"deliver"),oit=me(function(t){1===t.state?lit(t,"onFulfilled",t.fulfillValue):2===t.state&&lit(t,"onRejected",t.rejectReason)},"execute"),lit=me(function(t,e,r){var n;0!==t[e].length&&(n=t[e],t[e]=[],t=me(function(){for(var t=0;t<n.length;t++)n[t](r)},"func"),"function"==typeof setImmediate?setImmediate(t):setTimeout(t,0))},"execute_handlers"),cit=me(function(r,n,i){return function(t){if("function"!=typeof r)n[i].call(n,t);else{var e;try{e=r(t)}catch(t){return void n.reject(t)}hit(n,e)}}},"resolver"),hit=me(function e(r,n){if(r===n||r.proxy===n)r.reject(new TypeError("cannot resolve promise with itself"));else{var t;if("object"===$K(n)&&null!==n||"function"==typeof n)try{t=n.then}catch(t){return void r.reject(t)}if("function"==typeof t){var i=!1;try{t.call(n,function(t){i||(i=!0,t===n?r.reject(new TypeError("circular thenable chain")):e(r,t))},function(t){i||(i=!0,r.reject(t))})}catch(t){i||r.reject(t)}}else r.fulfill(n)}},"resolve"),ait.all=function(o){return new ait(function(r,n){for(var i=new Array(o.length),a=0,s=me(function(t,e){i[t]=e,++a===o.length&&r(i)},"fulfill"),t=0;t<o.length;t++)(e=>{var t=o[e];null!=t&&null!=t.then?t.then(function(t){s(e,t)},function(t){n(t)}):s(e,t)})(t)})},ait.resolve=function(r){return new ait(function(t,e){t(r)})},ait.reject=function(r){return new ait(function(t,e){e(r)})},uit=typeof Promise<"u"?Promise:ait,dit=me(function(t,e,r){var n=rtt(t),i=!n;(e=this._private=vtt({duration:1e3},e,r)).target=t,e.style=e.style||e.css,e.started=!1,e.playing=!1,e.hooked=!1,e.applying=!1,e.progress=0,e.completes=[],e.frames=[],e.complete&&HJ(e.complete)&&e.completes.push(e.complete),i&&(r=t.position(),e.startPosition=e.startPosition||{x:r.x,y:r.y},e.startStyle=e.startStyle||t.cy().style().getAnimationStartStyle(t,e.style)),n&&(i=t.pan(),e.startPan={x:i.x,y:i.y},e.startZoom=t.zoom()),this.length=1,this[0]=this},"Animation"),mlt=dit.prototype,vtt(mlt,{instanceString:me(function(){return"animation"},"instanceString"),hook:me(function(){var t,e=this._private;return e.hooked||(t=e.target._private.animation,(e.queue?t.queue:t.current).push(this),JJ(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0),this},"hook"),play:me(function(){var t=this._private;return 1===t.progress&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},"play"),playing:me(function(){return this._private.playing},"playing"),apply:me(function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},"apply"),applying:me(function(){return this._private.applying},"applying"),pause:me(function(){var t=this._private;return t.playing=!1,t.started=!1,this},"pause"),stop:me(function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},"stop"),rewind:me(function(){return this.progress(0)},"rewind"),fastforward:me(function(){return this.progress(1)},"fastforward"),time:me(function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},"time"),progress:me(function(t){var e=this._private,r=e.playing;return void 0===t?e.progress:(r&&this.pause(),e.progress=t,e.started=!1,r&&this.play(),this)},"progress"),completed:me(function(){return 1===this._private.progress},"completed"),reverse:me(function(){var n=this._private,t=n.playing,e=(t&&this.pause(),n.progress=1-n.progress,n.started=!1,me(function(t,e){var r=n[t];null!=r&&(n[t]=n[e],n[e]=r)},"swap"));if(e("zoom","startZoom"),e("pan","startPan"),e("position","startPosition"),n.style)for(var r=0;r<n.style.length;r++){var i=n.style[r],a=i.name,s=n.startStyle[a];n.startStyle[a]=i,n.style[r]=s}return t&&this.play(),this},"reverse"),promise:me(function(t){var r,e=this._private;switch(t){case"frame":r=e.frames;break;default:case"complete":case"completed":r=e.completes}return new uit(function(t,e){r.push(function(){t()})})},"promise")}),mlt.complete=mlt.completed,mlt.run=mlt.play,mlt.running=mlt.playing,Hot={animated:me(function(){return me(function(){var t=void 0!==this.length?this:[this];return!!(this._private.cy||this).styleEnabled()&&((t=t[0])?0<t._private.animation.current.length:void 0)},"animatedImpl")},"animated"),clearQueue:me(function(){return me(function(){var t=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled())for(var e=0;e<t.length;e++)t[e]._private.animation.queue=[];return this},"clearQueueImpl")},"clearQueue"),delay:me(function(){return me(function(t,e){return(this._private.cy||this).styleEnabled()?this.animate({delay:t,duration:t,complete:e}):this},"delayImpl")},"delay"),delayAnimation:me(function(){return me(function(t,e){return(this._private.cy||this).styleEnabled()?this.animation({delay:t,duration:t,complete:e}):this},"delayAnimationImpl")},"delayAnimation"),animation:me(function(){return me(function(t,e){var r=void 0!==this.length,n=r?this:[this],i=this._private.cy||this,a=!(r=!r);if(!i.styleEnabled())return this;var s=i.style();if(t=vtt({},t,e),!(e=0===Object.keys(t).length)){switch(void 0===t.duration&&(t.duration=400),t.duration){case"slow":t.duration=600;break;case"fast":t.duration=200}a&&(t.style=s.getPropsList(t.style||t.css),t.css=void 0),a&&null!=t.renderedPosition&&(e=t.renderedPosition,s=i.pan(),a=i.zoom(),t.position=Jet(e,a,s)),r&&null!=t.panBy&&(e=t.panBy,a=i.pan(),t.pan={x:a.x+e.x,y:a.y+e.y}),s=t.center||t.centre,r&&null!=s&&null!=(a=i.getCenterPan(s.eles,t.zoom))&&(t.pan=a),r&&null!=t.fit&&(e=t.fit,null!=(s=i.getFitViewport(e.eles||e.boundingBox,e.padding)))&&(t.pan=s.pan,t.zoom=s.zoom),r&&XJ(t.zoom)&&(null!=(a=i.getZoomedViewport(t.zoom))?(a.zoomed&&(t.zoom=a.zoom),a.panned&&(t.pan=a.pan)):t.zoom=null)}return new dit(n[0],t)},"animationImpl")},"animation"),animate:me(function(){return me(function(t,e){var r=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled()){e&&(t=vtt({},t,e));for(var n=0;n<r.length;n++){var i=r[n],a=i.animated()&&(void 0===t.queue||t.queue);i.animation(t,a?{queue:!0}:void 0).play()}}return this},"animateImpl")},"animate"),stop:me(function(){return me(function(t,e){var r=void 0!==this.length?this:[this],n=this._private.cy||this;if(n.styleEnabled()){for(var i=0;i<r.length;i++){for(var a=r[i]._private,s=a.animation.current,o=0;o<s.length;o++){var l=s[o]._private;e&&(l.duration=0)}t&&(a.animation.queue=[]),e||(a.animation.current=[])}n.notify("draw")}return this},"stopImpl")},"stop")},Elt=Array.isArray,pit=Elt,git=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fit=/^\w*$/,me(dZ,"isKey"),mit=dZ,me(pZ,"isFunction"),yit=pZ,Kot=Ltt["__core-js_shared__"],s=/[^.]+$/.exec((olt=Kot)&&olt.keys&&olt.keys.IE_PROTO||""),vit=s?"Symbol(src)_1."+s:"",me(gZ,"isMasked"),xit=gZ,jot=Function.prototype,bit=jot.toString,me(fZ,"toSource"),wit=fZ,Vot=/[\\^$.*+?()[\]{}|]/g,kit=/^\[object .+?Constructor\]$/,tot=Function.prototype,Tlt=Object.prototype,Wot=tot.toString,glt=Tlt.hasOwnProperty,Tit=RegExp("^"+Wot.call(glt).replace(Vot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me(mZ,"baseIsNative"),Eit=mZ,me(yZ,"getValue$1"),Cit=yZ,me(vZ,"getNative"),Sot=(Sit=vZ)(Object,"create"),_it=Sot,me(xZ,"hashClear"),Oot=xZ,me(bZ,"hashDelete"),Yot=bZ,flt=Object.prototype,Ait=flt.hasOwnProperty,me(wZ,"hashGet"),Bot=wZ,Lit=Object.prototype.hasOwnProperty,me(kZ,"hashHas"),slt=kZ,me(TZ,"hashSet"),xlt=TZ,me(EZ,"Hash"),EZ.prototype.clear=Oot,EZ.prototype.delete=Yot,EZ.prototype.get=Bot,EZ.prototype.has=slt,EZ.prototype.set=xlt,Nit=EZ,me(CZ,"listCacheClear"),mlt=CZ,me(SZ,"eq"),Iit=SZ,me(_Z,"assocIndexOf"),Rit=_Z,Elt=Array.prototype,Mit=Elt.splice,me(AZ,"listCacheDelete"),Kot=AZ,me(LZ,"listCacheGet"),olt=LZ,me(NZ,"listCacheHas"),jot=NZ,me(IZ,"listCacheSet"),tot=IZ,me(RZ,"ListCache"),RZ.prototype.clear=mlt,RZ.prototype.delete=Kot,RZ.prototype.get=olt,RZ.prototype.has=jot,RZ.prototype.set=tot,Dit=RZ,Tlt=Sit(Ltt,"Map"),Oit=Tlt,me(MZ,"mapCacheClear"),Wot=MZ,me(DZ,"isKeyable"),Pit=DZ,me(OZ,"getMapData"),Bit=OZ,me(PZ,"mapCacheDelete"),glt=PZ,me(BZ,"mapCacheGet"),Vot=BZ,me($Z,"mapCacheHas"),Sot=$Z,me(FZ,"mapCacheSet"),flt=FZ,me(zZ,"MapCache"),zZ.prototype.clear=Wot,zZ.prototype.delete=glt,zZ.prototype.get=Vot,zZ.prototype.has=Sot,zZ.prototype.set=flt,$it=zZ,Fit="Expected a function",me(GZ,"memoize"),GZ.Cache=$it,zit=GZ,me(UZ,"memoizeCapped"),Git=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uit=/\\(\\)?/g,Oot=UZ(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(Git,function(t,e,r,n){i.push(r?n.replace(Uit,"$1"):e||t)}),i}),qit=Oot,me(qZ,"arrayMap"),jit=qZ,Wit=1/0,Yot=Xot?Xot.prototype:void 0,Yit=Yot?Yot.toString:void 0,me(jZ,"baseToString"),Hit=jZ,me(WZ,"toString$1"),Vit=WZ,me(YZ,"castPath"),Xit=YZ,me(HZ,"toKey"),Kit=HZ,me(VZ,"baseGet"),Zit=VZ,me(XZ,"get"),Qit=XZ,Bot=(()=>{try{var t=Sit(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Jit=Bot,me(KZ,"baseAssignValue"),tat=KZ,slt=Object.prototype,eat=slt.hasOwnProperty,me(ZZ,"assignValue"),rat=ZZ,nat=/^(?:0|[1-9]\d*)$/,me(QZ,"isIndex"),iat=QZ,me(JZ,"baseSet"),aat=JZ,me(tQ,"set"),sat=tQ,me(eQ,"copyArray"),oat=eQ,me(rQ,"toPath"),lat=rQ,xlt={data:me(function(b){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:me(function(t){},"beforeGet"),beforeSet:me(function(t,e){},"beforeSet"),onSet:me(function(t){},"onSet"),canSet:me(function(t){return!0},"canSet")};return b=vtt({},t,b),me(function(t,e){var r,n=b,i=this,a=void 0!==i.length,s=a?i:[i],o=a?i[0]:i;if(YJ(t)){var l,c=-1!==t.indexOf(".")&&lat(t);if(n.allowGetting&&void 0===e)return o&&(n.beforeGet(o),l=c&&void 0===o._private[n.field][t]?Qit(o._private[n.field],c):o._private[n.field][t]),l;if(n.allowSetting&&void 0!==e&&!n.immutableKeys[t]){a=UK({},t,e),n.beforeSet(i,a);for(var h=0,u=s.length;h<u;h++){var d=s[h];n.canSet(d)&&(c&&void 0===o._private[n.field][t]?sat(d._private[n.field],c,e):d._private[n.field][t]=e)}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}}else if(n.allowSetting&&XJ(t)){var p=t,g=Object.keys(p);n.beforeSet(i,p);for(var f=0;f<g.length;f++){var m,y=p[m=g[f]];if(!n.immutableKeys[m])for(var v=0;v<s.length;v++){var x=s[v];n.canSet(x)&&(x._private[n.field][m]=y)}}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}else if(n.allowBinding&&HJ(t))i.on(n.bindingEvent,t);else if(n.allowGetting&&void 0===t)return o&&(n.beforeGet(o),r=o._private[n.field]),r;return i},"dataImpl")},"data"),removeData:me(function(f){return f=vtt({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},f),me(function(t){var e=f,r=void 0!==this.length?this:[this];if(YJ(t)){for(var n=t.split(/\s+/),i=n.length,a=0;a<i;a++){var s=n[a];if(!att(s)&&!e.immutableKeys[s])for(var o=0,l=r.length;o<l;o++)r[o]._private[e.field][s]=void 0}e.triggerEvent&&this[e.triggerFnName](e.event)}else if(void 0===t){for(var c=0,h=r.length;c<h;c++)for(var u=r[c]._private[e.field],d=Object.keys(u),p=0;p<d.length;p++){var g=d[p];e.immutableKeys[g]||(u[g]=void 0)}e.triggerEvent&&this[e.triggerFnName](e.event)}return this},"removeDataImpl")},"removeData")},Elt={eventAliasesOn:me(function(t){t.addListener=t.listen=t.bind=t.on,t.unlisten=t.unbind=t.off=t.removeListener,t.trigger=t.emit,t.pon=t.promiseOn=function(t,e){var i=this,a=Array.prototype.slice.call(arguments,0);return new uit(function(e,t){var r=me(function(t){i.off.apply(i,n),e(t)},"callback"),n=(r=a.concat([r])).concat([]);i.on.apply(i,r)})}},"eventAliasesOn")},cat={},[Hot,xlt,Elt].forEach(function(t){vtt(cat,t)}),mlt={animate:cat.animate(),animation:cat.animation(),animated:cat.animated(),clearQueue:cat.clearQueue(),delay:cat.delay(),delayAnimation:cat.delayAnimation(),stop:cat.stop()},(Kot={classes:me(function(t){var e;if(void 0===t)return e=[],this[0]._private.classes.forEach(function(t){return e.push(t)}),e;VJ(t)||(t=(t||"").match(/\S+/g)||[]);for(var r=[],n=new Get(t),i=0;i<this.length;i++){for(var a=this[i],s=a._private,o=s.classes,l=!1,c=0;c<t.length;c++){var h=t[c];if(!o.has(h)){l=!0;break}}(l=l||o.size!==t.length)&&(s.classes=n,r.push(a))}return 0<r.length&&this.spawn(r).updateStyle().emit("class"),this},"classes"),addClass:me(function(t){return this.toggleClass(t,!0)},"addClass"),hasClass:me(function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},"hasClass"),toggleClass:me(function(t,e){VJ(t)||(t=t.match(/\S+/g)||[]);for(var r=void 0===e,n=[],i=0,a=this.length;i<a;i++)for(var s=this[i],o=s._private.classes,l=!1,c=0;c<t.length;c++){var h=t[c],u=o.has(h),d=!1;e||r&&!u?(o.add(h),d=!0):(!e||r&&u)&&(o.delete(h),d=!0),!l&&d&&(n.push(s),l=!0)}return 0<n.length&&this.spawn(n).updateStyle().emit("class"),this},"toggleClass"),removeClass:me(function(t){return this.toggleClass(t,!1)},"removeClass"),flashClass:me(function(t,e){var r=this;if(null==e)e=250;else if(0===e)return r;return r.addClass(t),setTimeout(function(){r.removeClass(t)},e),r},"flashClass")}).className=Kot.classNames=Kot.classes,(hat={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:ftt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+hat.metaChar+"))+",hat.className="(?:[\\w-]|(?:\\\\"+hat.metaChar+"))+",hat.value=hat.string+"|"+hat.number,hat.id=hat.variable;for(var e,r=hat.comparatorOp.split("|"),i=0;i<r.length;i++)e=r[i],hat.comparatorOp+="|@"+e;for(r=hat.comparatorOp.split("|"),i=0;i<r.length;i++)0<=(e=r[i]).indexOf("!")||"="===e||(hat.comparatorOp+="|\\!"+e);function o(t){return-t.tension*t.x-t.friction*t.v}function l(t,e,r){return{dx:(r={x:t.x+r.dx*e,v:t.v+r.dv*e,tension:t.tension,friction:t.friction}).v,dv:o(r)}}function h(t,e){var r=l(t,.5*e,s={dx:t.v,dv:o(t)}),n=l(t,.5*e,r),i=l(t,e,n),a=1/6*(s.dx+2*(r.dx+n.dx)+i.dx),s=1/6*(s.dv+2*(r.dv+n.dv)+i.dv);return t.x=t.x+a*e,t.v=t.v+s*e,t}uat=me(function(){return{checks:[]}},"newQuery"),J={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},dat=[{selector:":selected",matches:me(function(t){return t.selected()},"matches")},{selector:":unselected",matches:me(function(t){return!t.selected()},"matches")},{selector:":selectable",matches:me(function(t){return t.selectable()},"matches")},{selector:":unselectable",matches:me(function(t){return!t.selectable()},"matches")},{selector:":locked",matches:me(function(t){return t.locked()},"matches")},{selector:":unlocked",matches:me(function(t){return!t.locked()},"matches")},{selector:":visible",matches:me(function(t){return t.visible()},"matches")},{selector:":hidden",matches:me(function(t){return!t.visible()},"matches")},{selector:":transparent",matches:me(function(t){return t.transparent()},"matches")},{selector:":grabbed",matches:me(function(t){return t.grabbed()},"matches")},{selector:":free",matches:me(function(t){return!t.grabbed()},"matches")},{selector:":removed",matches:me(function(t){return t.removed()},"matches")},{selector:":inside",matches:me(function(t){return!t.removed()},"matches")},{selector:":grabbable",matches:me(function(t){return t.grabbable()},"matches")},{selector:":ungrabbable",matches:me(function(t){return!t.grabbable()},"matches")},{selector:":animated",matches:me(function(t){return t.animated()},"matches")},{selector:":unanimated",matches:me(function(t){return!t.animated()},"matches")},{selector:":parent",matches:me(function(t){return t.isParent()},"matches")},{selector:":childless",matches:me(function(t){return t.isChildless()},"matches")},{selector:":child",matches:me(function(t){return t.isChild()},"matches")},{selector:":orphan",matches:me(function(t){return t.isOrphan()},"matches")},{selector:":nonorphan",matches:me(function(t){return t.isChild()},"matches")},{selector:":compound",matches:me(function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()},"matches")},{selector:":loop",matches:me(function(t){return t.isLoop()},"matches")},{selector:":simple",matches:me(function(t){return t.isSimple()},"matches")},{selector:":active",matches:me(function(t){return t.active()},"matches")},{selector:":inactive",matches:me(function(t){return!t.active()},"matches")},{selector:":backgrounding",matches:me(function(t){return t.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:me(function(t){return!t.backgrounding()},"matches")}].sort(function(t,e){return ytt(t.selector,e.selector)}),pat=(()=>{for(var t,e={},r=0;r<dat.length;r++)e[(t=dat[r]).selector]=t.matches;return e})(),gat=me(function(t,e){return pat[t](e)},"stateSelectorMatches"),olt="("+dat.map(function(t){return t.selector}).join("|")+")",fat=me(function(t){return t.replace(new RegExp("\\\\("+hat.metaChar+")","g"),function(t,e){return e})},"cleanMetaChars"),mat=me(function(t,e,r){t[t.length-1]=r},"replaceLastQuery"),(yat=[{name:"group",query:!0,regex:"("+hat.group+")",populate:me(function(t,e,r){r=qK(r,1)[0],e.checks.push({type:J.GROUP,value:"*"===r?r:r+"s"})},"populate")},{name:"state",query:!0,regex:olt,populate:me(function(t,e,r){r=qK(r,1)[0],e.checks.push({type:J.STATE,value:r})},"populate")},{name:"id",query:!0,regex:"\\#("+hat.id+")",populate:me(function(t,e,r){r=qK(r,1)[0],e.checks.push({type:J.ID,value:fat(r)})},"populate")},{name:"className",query:!0,regex:"\\.("+hat.className+")",populate:me(function(t,e,r){r=qK(r,1)[0],e.checks.push({type:J.CLASS,value:fat(r)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+hat.variable+")\\s*\\]",populate:me(function(t,e,r){r=qK(r,1)[0],e.checks.push({type:J.DATA_EXIST,field:fat(r)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+hat.variable+")\\s*("+hat.comparatorOp+")\\s*("+hat.value+")\\s*\\]",populate:me(function(t,e,r){var n=(r=qK(r,3))[0],i=r[1],r=r[2],r=null!=new RegExp("^"+hat.string+"$").exec(r)?r.substring(1,r.length-1):parseFloat(r);e.checks.push({type:J.DATA_COMPARE,field:fat(n),operator:i,value:r})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+hat.boolOp+")\\s*("+hat.variable+")\\s*\\]",populate:me(function(t,e,r){var n=(r=qK(r,2))[0];e.checks.push({type:J.DATA_BOOL,field:fat(r[1]),operator:n})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+hat.meta+")\\s*("+hat.comparatorOp+")\\s*("+hat.number+")\\s*\\]\\]",populate:me(function(t,e,r){var n=(r=qK(r,3))[0],i=r[1],r=r[2];e.checks.push({type:J.META_COMPARE,field:fat(n),operator:i,value:parseFloat(r)})},"populate")},{name:"nextQuery",separator:!0,regex:hat.separator,populate:me(function(t,e){var r=t.currentSubject,n=t.edgeCount,i=t.compoundCount,a=t[t.length-1];return null!=r&&(a.subject=r,t.currentSubject=null),a.edgeCount=n,a.compoundCount=i,t.edgeCount=0,t.compoundCount=0,t[t.length++]=uat()},"populate")},{name:"directedEdge",separator:!0,regex:hat.directedEdge,populate:me(function(t,e){var r,n,i;return null==t.currentSubject?(n=uat(),r=e,i=uat(),n.checks.push({type:J.DIRECTED_EDGE,source:r,target:i}),mat(t,e,n)):(r=uat(),n=e,i=uat(),r.checks.push({type:J.NODE_SOURCE,source:n,target:i}),mat(t,e,r)),t.edgeCount++,i},"populate")},{name:"undirectedEdge",separator:!0,regex:hat.undirectedEdge,populate:me(function(t,e){var r,n,i;return null==t.currentSubject?(n=uat(),r=e,i=uat(),n.checks.push({type:J.UNDIRECTED_EDGE,nodes:[r,i]}),mat(t,e,n),t.edgeCount++):(r=uat(),n=e,i=uat(),r.checks.push({type:J.NODE_NEIGHBOR,node:n,neighbor:i}),mat(t,e,r)),i},"populate")},{name:"child",separator:!0,regex:hat.child,populate:me(function(t,e){var r,n,i,a,s,o;return null==t.currentSubject?(o=uat(),a=uat(),r=t[t.length-1],o.checks.push({type:J.CHILD,parent:r,child:a}),mat(t,e,o),t.compoundCount++,a):t.currentSubject===e?(r=uat(),o=t[t.length-1],a=uat(),n=uat(),i=uat(),s=uat(),r.checks.push({type:J.COMPOUND_SPLIT,left:o,right:a,subject:n}),n.checks=e.checks,e.checks=[{type:J.TRUE}],s.checks.push({type:J.TRUE}),a.checks.push({type:J.PARENT,parent:s,child:i}),mat(t,o,r),t.currentSubject=n,t.compoundCount++,i):(a=uat(),s=uat(),o=[{type:J.PARENT,parent:a,child:s}],a.checks=e.checks,e.checks=o,t.compoundCount++,s)},"populate")},{name:"descendant",separator:!0,regex:hat.descendant,populate:me(function(t,e){var r,n,i,a,s,o;return null==t.currentSubject?(o=uat(),a=uat(),r=t[t.length-1],o.checks.push({type:J.DESCENDANT,ancestor:r,descendant:a}),mat(t,e,o),t.compoundCount++,a):t.currentSubject===e?(r=uat(),o=t[t.length-1],a=uat(),n=uat(),i=uat(),s=uat(),r.checks.push({type:J.COMPOUND_SPLIT,left:o,right:a,subject:n}),n.checks=e.checks,e.checks=[{type:J.TRUE}],s.checks.push({type:J.TRUE}),a.checks.push({type:J.ANCESTOR,ancestor:s,descendant:i}),mat(t,o,r),t.currentSubject=n,t.compoundCount++,i):(a=uat(),s=uat(),o=[{type:J.ANCESTOR,ancestor:a,descendant:s}],a.checks=e.checks,e.checks=o,t.compoundCount++,s)},"populate")},{name:"subject",modifier:!0,regex:hat.subject,populate:me(function(t,e){if(null!=t.currentSubject&&t.currentSubject!==e)return _et("Redefinition of subject in selector `"+t.toString()+"`"),!1;t.currentSubject=e,(t=null==(e=t[t.length-1].checks[0])?null:e.type)===J.DIRECTED_EDGE?e.type=J.NODE_TARGET:t===J.UNDIRECTED_EDGE&&(e.type=J.NODE_NEIGHBOR,e.node=e.nodes[1],e.neighbor=e.nodes[0],e.nodes=null)},"populate")}]).forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)}),vat=me(function(t){for(var e=0;e<yat.length;e++){var r=(o=yat[e]).name,n=t.match(o.regexObj);if(null!=n){var i=n,a=o,s=r,o=n[0];t=t.substring(o.length);break}}return{expr:a,match:i,name:s,remaining:t}},"consumeExpr"),xat=me(function(t){var e=t.match(/^\s+/);return e&&(e=e[0],t=t.substring(e.length)),t},"consumeWhitespace"),jot=me(function(t){var e=this,r=e.inputText=t,n=e[0]=uat();for(e.length=1,r=xat(r);;){var i=vat(r);if(null==i.expr)return _et("The selector `"+t+"`is invalid"),!1;var a=i.match.slice(1);if(!1===(a=i.expr.populate(e,n,a)))return!1;if(null!=a&&(n=a),(r=i.remaining).match(/^\s*$/))break}var s=e[e.length-1];null!=e.currentSubject&&(s.subject=e.currentSubject),s.edgeCount=e.edgeCount,s.compoundCount=e.compoundCount;for(var o=0;o<e.length;o++){var l=e[o];if(0<l.compoundCount&&0<l.edgeCount)return _et("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(1<l.edgeCount)return _et("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&_et("The selector `"+t+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},"parse"),tot=me(function(){if(null!=this.toStringCache)return this.toStringCache;for(var o=me(function(t){return t??""},"clean"),l=me(function(t){return YJ(t)?'"'+t+'"':o(t)},"cleanVal"),c=me(function(t){return" "+t+" "},"space"),a=me(function(t,e){var r=t.type,n=t.value;switch(r){case J.GROUP:return(i=o(n)).substring(0,i.length-1);case J.DATA_COMPARE:return"["+t.field+c(o(t.operator))+l(n)+"]";case J.DATA_BOOL:var i=t.operator,a=t.field;return"["+o(i)+a+"]";case J.DATA_EXIST:return"["+t.field+"]";case J.META_COMPARE:return i=t.operator,"[["+t.field+c(o(i))+l(n)+"]]";case J.STATE:return n;case J.ID:return"#"+n;case J.CLASS:return"."+n;case J.PARENT:case J.CHILD:return h(t.parent,e)+c(">")+h(t.child,e);case J.ANCESTOR:case J.DESCENDANT:return h(t.ancestor,e)+" "+h(t.descendant,e);case J.COMPOUND_SPLIT:var a=h(t.left,e),i=h(t.subject,e),s=h(t.right,e);return a+(0<a.length?" ":"")+i+s;case J.TRUE:return""}},"checkToString"),h=me(function(n,i){return n.checks.reduce(function(t,e,r){return t+(i===n&&0===r?"$":"")+a(e,i)},"")},"queryToString"),t="",e=0;e<this.length;e++){var r=this[e];t+=h(r,r.subject),1<this.length&&e<this.length-1&&(t+=", ")}return this.toStringCache=t},"toString"),Tlt={parse:jot,toString:tot},bat=me(function(t,e,r){var n,i,a,s=YJ(t),o=at(t),l=YJ(r),c=!1,h=!1,u=!1;switch(0<=e.indexOf("!")&&(e=e.replace("!",""),h=!0),0<=e.indexOf("@")&&(e=e.replace("@",""),c=!0),(s||l||c)&&(i=s||o?""+t:"",a=""+r),c&&(t=i=i.toLowerCase(),r=a=a.toLowerCase()),e){case"*=":n=0<=i.indexOf(a);break;case"$=":n=0<=i.indexOf(a,i.length-a.length);break;case"^=":n=0===i.indexOf(a);break;case"=":n=t===r;break;case">":u=!0,n=r<t;break;case">=":u=!0,n=r<=t;break;case"<":u=!0,n=t<r;break;case"<=":u=!0,n=t<=r;break;default:n=!1}return!h||null==t&&u?n:!n},"valCmp"),wat=me(function(t,e){switch(e){case"?":return!!t;case"!":return!t;case"^":return void 0===t}},"boolCmp"),kat=me(function(t){return void 0!==t},"existCmp"),Tat=me(function(t,e){return t.data(e)},"data"),Eat=me(function(t,e){return t[e]()},"meta"),Cat=[],Sat=me(function(t,e){return t.checks.every(function(t){return Cat[t.type](t,e)})},"matches"),Cat[J.GROUP]=function(t,e){return"*"===(t=t.value)||t===e.group()},Cat[J.STATE]=function(t,e){return t=t.value,gat(t,e)},Cat[J.ID]=function(t,e){return t=t.value,e.id()===t},Cat[J.CLASS]=function(t,e){return t=t.value,e.hasClass(t)},Cat[J.META_COMPARE]=function(t,e){var r=t.field,n=t.operator,t=t.value;return bat(Eat(e,r),n,t)},Cat[J.DATA_COMPARE]=function(t,e){var r=t.field,n=t.operator,t=t.value;return bat(Tat(e,r),n,t)},Cat[J.DATA_BOOL]=function(t,e){var r=t.field,t=t.operator;return wat(Tat(e,r),t)},Cat[J.DATA_EXIST]=function(t,e){return t=t.field,kat(Tat(e,t))},Cat[J.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],t=t.nodes[1],n=e.source(),e=e.target();return Sat(r,n)&&Sat(t,e)||Sat(t,n)&&Sat(r,e)},Cat[J.NODE_NEIGHBOR]=function(e,t){return Sat(e.node,t)&&t.neighborhood().some(function(t){return t.isNode()&&Sat(e.neighbor,t)})},Cat[J.DIRECTED_EDGE]=function(t,e){return Sat(t.source,e.source())&&Sat(t.target,e.target())},Cat[J.NODE_SOURCE]=function(e,t){return Sat(e.source,t)&&t.outgoers().some(function(t){return t.isNode()&&Sat(e.target,t)})},Cat[J.NODE_TARGET]=function(e,t){return Sat(e.target,t)&&t.incomers().some(function(t){return t.isNode()&&Sat(e.source,t)})},Cat[J.CHILD]=function(t,e){return Sat(t.child,e)&&Sat(t.parent,e.parent())},Cat[J.PARENT]=function(e,t){return Sat(e.parent,t)&&t.children().some(function(t){return Sat(e.child,t)})},Cat[J.DESCENDANT]=function(e,t){return Sat(e.descendant,t)&&t.ancestors().some(function(t){return Sat(e.ancestor,t)})},Cat[J.ANCESTOR]=function(e,t){return Sat(e.ancestor,t)&&t.descendants().some(function(t){return Sat(e.descendant,t)})},Cat[J.COMPOUND_SPLIT]=function(t,e){return Sat(t.subject,e)&&Sat(t.left,e)&&Sat(t.right,e)},Cat[J.TRUE]=function(){return!0},Cat[J.COLLECTION]=function(t,e){return t.value.has(e)},Cat[J.FILTER]=function(t,e){return(0,t.value)(e)},Wot=me(function(t){var e,n=this;return 1===n.length&&1===n[0].checks.length&&n[0].checks[0].type===J.ID?t.getElementById(n[0].checks[0].value).collection():(e=me(function(t){for(var e=0;e<n.length;e++){var r=n[e];if(Sat(r,t))return!0}return!1},"selectorFunction"),null==n.text()&&(e=me(function(){return!0},"selectorFunction")),t.filter(e))},"filter"),glt=me(function(t){for(var e=0;e<this.length;e++){var r=this[e];if(Sat(r,t))return!0}return!1},"matches"),Vot={matches:glt,filter:Wot},_at=me(function(t){this.inputText=t,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==t||YJ(t)&&t.match(/^\s*$/)||(JJ(t)?this.addQuery({checks:[{type:J.COLLECTION,value:t.collection()}]}):HJ(t)?this.addQuery({checks:[{type:J.FILTER,value:t}]}):YJ(t)?this.parse(t)||(this.invalid=!0):Eet("A selector must be created from a string; found "))},"Selector"),Aat=_at.prototype,[Tlt,Vot].forEach(function(t){return vtt(Aat,t)}),Aat.text=function(){return this.inputText},Aat.size=function(){return this.length},Aat.eq=function(t){return this[t]},Aat.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},Aat.addQuery=function(t){this[this.length++]=t},Aat.selector=Aat.toString,(Sot={allAre:me(function(t){var e=new _at(t);return this.every(function(t){return e.matches(t)})},"allAre"),is:me(function(t){var e=new _at(t);return this.some(function(t){return e.matches(t)})},"is"),some:me(function(t,e){for(var r=0;r<this.length;r++)if(e?t.apply(e,[this[r],r,this]):t(this[r],r,this))return!0;return!1},"some"),every:me(function(t,e){for(var r=0;r<this.length;r++)if(!(e?t.apply(e,[this[r],r,this]):t(this[r],r,this)))return!1;return!0},"every"),same:me(function(e){if(this===e)return!0;e=this.cy().collection(e);var t=this.length;return t===e.length&&(1===t?this[0]===e[0]:this.every(function(t){return e.hasElementWithId(t.id())}))},"same"),anySame:me(function(e){return e=this.cy().collection(e),this.some(function(t){return e.hasElementWithId(t.id())})},"anySame"),allAreNeighbors:me(function(t){t=this.cy().collection(t);var e=this.neighborhood();return t.every(function(t){return e.hasElementWithId(t.id())})},"allAreNeighbors"),contains:me(function(t){t=this.cy().collection(t);var e=this;return t.every(function(t){return e.hasElementWithId(t.id())})},"contains")}).allAreNeighbours=Sot.allAreNeighbors,Sot.has=Sot.contains,Sot.equal=Sot.equals=Sot.same,flt=me(function(s,o){return me(function(t,e,r,n){var i,a=t;return null==a?i="":JJ(a)&&1===a.length&&(i=a.id()),1===this.length&&i?(a=(a=(a=this[0]._private).traversalCache=a.traversalCache||{})[o]=a[o]||[])[i=pet(i)]||(a[i]=s.call(this,t,e,r,n)):s.call(this,t,e,r,n)},"traversalCache")},"cache"),Oot={parent:me(function(t){var e=[];if(1===this.length){var r=this[0]._private.parent;if(r)return r}for(var n=0;n<this.length;n++){var i=this[n]._private.parent;i&&e.push(i)}return this.spawn(e,!0).filter(t)},"parent"),parents:me(function(t){for(var e=[],r=this.parent();r.nonempty();){for(var n=0;n<r.length;n++){var i=r[n];e.push(i)}r=r.parent()}return this.spawn(e,!0).filter(t)},"parents"),commonAncestors:me(function(t){for(var e=0;e<this.length;e++)var r=this[e].parents(),n=(n=n||r).intersect(r);return n.filter(t)},"commonAncestors"),orphans:me(function(t){return this.stdFilter(function(t){return t.isOrphan()}).filter(t)},"orphans"),nonorphans:me(function(t){return this.stdFilter(function(t){return t.isChild()}).filter(t)},"nonorphans"),children:flt(function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r]._private.children,i=0;i<n.length;i++)e.push(n[i]);return this.spawn(e,!0).filter(t)},"children"),siblings:me(function(t){return this.parent().children().not(this).filter(t)},"siblings"),isParent:me(function(){var t=this[0];if(t)return t.isNode()&&0!==t._private.children.length},"isParent"),isChildless:me(function(){var t=this[0];if(t)return t.isNode()&&0===t._private.children.length},"isChildless"),isChild:me(function(){var t=this[0];if(t)return t.isNode()&&null!=t._private.parent},"isChild"),isOrphan:me(function(){var t=this[0];if(t)return t.isNode()&&null==t._private.parent},"isOrphan"),descendants:me(function(t){var n=[];function i(t){for(var e=0;e<t.length;e++){var r=t[e];n.push(r),r.children().nonempty()&&i(r.children())}}return me(i,"add"),i(this.children()),this.spawn(n,!0).filter(t)},"descendants")},me(nQ,"forEachCompound"),me(iQ,"addChildren"),Oot.forEachDown=function(t){return nQ(this,t,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],iQ)},me(aQ,"addParent"),Oot.forEachUp=function(t){return nQ(this,t,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],aQ)},me(sQ,"addParentAndChildren"),Oot.forEachUpAndDown=function(t){return nQ(this,t,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],sQ)},Oot.ancestors=Oot.parents,(Yot=Xot={data:cat.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:cat.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:cat.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:cat.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:cat.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:cat.removeData({field:"rscratch",triggerEvent:!1}),id:me(function(){var t=this[0];if(t)return t._private.data.id},"id")}).attr=Yot.data,Yot.removeAttr=Yot.removeData,Bot=Xot,slt={},me(oQ,"defineDegreeFunction"),vtt(slt,{degree:oQ(function(t,e){return e.source().same(e.target())?2:1}),indegree:oQ(function(t,e){return e.target().same(t)?1:0}),outdegree:oQ(function(t,e){return e.source().same(t)?1:0})}),me(lQ,"defineDegreeBoundsFunction"),vtt(slt,{minDegree:lQ("degree",function(t,e){return t<e}),maxDegree:lQ("degree",function(t,e){return e<t}),minIndegree:lQ("indegree",function(t,e){return t<e}),maxIndegree:lQ("indegree",function(t,e){return e<t}),minOutdegree:lQ("outdegree",function(t,e){return t<e}),maxOutdegree:lQ("outdegree",function(t,e){return e<t})}),vtt(slt,{totalDegree:me(function(t){for(var e=0,r=this.nodes(),n=0;n<r.length;n++)e+=r[n].degree(t);return e},"totalDegree")}),Lat=me(function(t,e,r){for(var n=0;n<t.length;n++){var i,a=t[n];a.locked()||(i=a._private.position,i={x:null!=e.x?e.x-i.x:0,y:null!=e.y?e.y-i.y:0},!a.isParent()||0===i.x&&0===i.y||a.children().shift(i,r),a.dirtyBoundingBoxCache())}},"beforePositionSet"),Hot={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:me(function(t){t.updateCompoundBounds()},"beforeGet"),beforeSet:me(function(t,e){Lat(t,e,!1)},"beforeSet"),onSet:me(function(t){t.dirtyCompoundBoundsCache()},"onSet"),canSet:me(function(t){return!t.locked()},"canSet")},(Elt=xlt={position:cat.data(Hot),silentPosition:cat.data(vtt({},Hot,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:me(function(t,e){Lat(t,e,!0)},"beforeSet"),onSet:me(function(t){t.dirtyCompoundBoundsCache()},"onSet")})),positions:me(function(t,e){if(XJ(t))e?this.silentPosition(t):this.position(t);else if(HJ(t)){var r=t;(t=this.cy()).startBatch();for(var n=0;n<this.length;n++){var i,a=this[n];(i=r(a,n))&&(e?a.silentPosition(i):a.position(i))}t.endBatch()}return this},"positions"),silentPositions:me(function(t){return this.positions(t,!0)},"silentPositions"),shift:me(function(t,e,r){var n;if(XJ(t)?(n={x:at(t.x)?t.x:0,y:at(t.y)?t.y:0},r=e):YJ(t)&&at(e)&&((n={x:0,y:0})[t]=e),null!=n){var i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var s,o=this[a];i.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this)||(s={x:(s=o.position()).x+n.x,y:s.y+n.y},r?o.silentPosition(s):o.position(s))}i.endBatch()}return this},"shift"),silentShift:me(function(t,e){return XJ(t)?this.shift(t,!0):YJ(t)&&at(e)&&this.shift(t,e,!0),this},"silentShift"),renderedPosition:me(function(t,e){var r=this[0],n=(s=this.cy()).zoom(),i=s.pan(),a=XJ(t)?t:void 0,s=void 0!==a||void 0!==e&&YJ(t);if(r&&r.isNode()){if(!s)return r=r.position(),a=Qet(r,n,i),void 0===t?a:a[t];for(var o=0;o<this.length;o++){var l=this[o];void 0!==e?l.position(t,(e-i[t])/n):void 0!==a&&l.position(Jet(a,n,i))}}else if(!s)return;return this},"renderedPosition"),relativePosition:me(function(t,e){var r,n=this[0],i=this.cy(),a=XJ(t)?t:void 0,s=void 0!==a||void 0!==e&&YJ(t),o=i.hasCompoundNodes();if(n&&n.isNode()){if(!s)return i=n.position(),(r=(n=o?n.parent():null)&&0<n.length)&&(n=n[0]),r=r?n.position():{x:0,y:0},a={x:i.x-r.x,y:i.y-r.y},void 0===t?a:a[t];for(var l=0;l<this.length;l++){var c=this[l],h=o?c.parent():null,u=((u=h&&0<h.length)&&(h=h[0]),u?h.position():{x:0,y:0});void 0!==e?c.position(t,e+u[t]):void 0!==a&&c.position({x:a.x+u.x,y:a.y+u.y})}}else if(!s)return;return this},"relativePosition")}).modelPosition=Elt.point=Elt.position,Elt.modelPositions=Elt.points=Elt.positions,Elt.renderedPoint=Elt.renderedPosition,Elt.relativePoint=Elt.relativePosition,olt=xlt,tot=jot={renderedBoundingBox:function(t){var t=this.boundingBox(t),e=(r=this.cy()).zoom(),r=r.pan(),n=t.x1*e+r.x,i=t.x2*e+r.x,a=t.y1*e+r.y;return{x1:n,x2:i,y1:a,y2:t=t.y2*e+r.y,w:i-n,h:t-a}},dirtyCompoundBoundsCache:function(){var r=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()&&this.forEachUp(function(t){var e;t.isParent()&&((e=t._private).compoundBoundsClean=!1,e.bbCache=null,r||t.emitAndNotify("bounds"))}),this},updateCompoundBounds:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(e.styleEnabled()&&e.hasCompoundNodes()&&(t||!e.batching())){me(a,"update");for(var r=0;r<this.length;r++){var n=this[r],i=n._private;i.compoundBoundsClean&&!t||(a(n),e.batching())||(i.compoundBoundsClean=!0)}}return this;function a(t){var e,r,n,i,a,s,o,l;function c(t,e,r){var n=0,i=0,a=e+r;return 0<t&&0<a&&(n=e/a*t,i=r/a*t),{biasDiff:n,biasComplementDiff:i}}function h(t,e,r,n){if("%"!==r.units)return"px"===r.units?r.pfValue:0;switch(n){case"width":return 0<t?r.pfValue*t:0;case"height":return 0<e?r.pfValue*e:0;case"average":return 0<t&&0<e?r.pfValue*(t+e)/2:0;case"min":return 0<t&&0<e?e<t?r.pfValue*e:r.pfValue*t:0;case"max":return 0<t&&0<e?e<t?r.pfValue*t:r.pfValue*e:0;default:return 0}}t.isParent()&&(e=t._private,n=t.children(),i="include"===t.pstyle("compound-sizing-wrt-labels").value,r={width:{val:t.pstyle("min-width").pfValue,left:t.pstyle("min-width-bias-left"),right:t.pstyle("min-width-bias-right")},height:{val:t.pstyle("min-height").pfValue,top:t.pstyle("min-height-bias-top"),bottom:t.pstyle("min-height-bias-bottom")}},n=n.boundingBox({includeLabels:i,includeOverlays:!1,useCache:!1}),i=e.position,0!==n.w&&0!==n.h||((n={w:t.pstyle("width").pfValue,h:t.pstyle("height").pfValue}).x1=i.x-n.w/2,n.x2=i.x+n.w/2,n.y1=i.y-n.h/2,n.y2=i.y+n.h/2),me(c,"computeBiasValues"),me(h,"computePaddingValues"),s=r.width.left.value,"px"===r.width.left.units&&0<r.width.val&&(s=100*s/r.width.val),a=r.width.right.value,"px"===r.width.right.units&&0<r.width.val&&(a=100*a/r.width.val),l=r.height.top.value,"px"===r.height.top.units&&0<r.height.val&&(l=100*l/r.height.val),o=r.height.bottom.value,"px"===r.height.bottom.units&&0<r.height.val&&(o=100*o/r.height.val),a=(s=c(r.width.val-n.w,s,a)).biasDiff,s=s.biasComplementDiff,o=(l=c(r.height.val-n.h,l,o)).biasDiff,l=l.biasComplementDiff,e.autoPadding=h(n.w,n.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(n.w,r.width.val),i.x=(-a+n.x1+n.x2+s)/2,e.autoHeight=Math.max(n.h,r.height.val),i.y=(-o+n.y1+n.y2+l)/2)}}},Nat=me(function(t){return t===1/0||t===-1/0?0:t},"noninf"),Iat=me(function(t,e,r,n,i){n-e!=0&&i-r!=0&&null!=e&&null!=r&&null!=n&&null!=i&&(t.x1=e<t.x1?e:t.x1,t.x2=t.x2<n?n:t.x2,t.y1=r<t.y1?r:t.y1,t.y2=t.y2<i?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},"updateBounds"),Rat=me(function(t,e){return null==e?t:Iat(t,e.x1,e.y1,e.x2,e.y2)},"updateBoundsFromBox"),Mat=me(function(t,e,r){return $et(t,e,r)},"prefixedProperty"),Dat=me(function(t,e,r){var n,i,a,s;e.cy().headless()||(n=(a=(s=e._private).rstyle).arrowWidth/2,"none"!==e.pstyle(r+"-arrow-shape").value&&(e="source"===r?(i=a.srcX,a.srcY):"target"===r?(i=a.tgtX,a.tgtY):(i=a.midX,a.midY),(s=(a=s.arrowBounds=s.arrowBounds||{})[r]=a[r]||{}).x1=i-n,s.y1=e-n,s.x2=i+n,s.y2=e+n,s.w=s.x2-s.x1,s.h=s.y2-s.y1,krt(s,1),Iat(t,s.x1,s.y1,s.x2,s.y2)))},"updateBoundsFromArrow"),Oat=me(function(t,e,r){if(!e.cy().headless()){var n=e._private,i=n.rstyle;if(e.pstyle((p=r?r+"-":"")+"label").strValue){var a=e.pstyle("text-halign"),s=e.pstyle("text-valign"),o=Mat(i,"labelWidth",r),l=Mat(i,"labelHeight",r),c=Mat(i,"labelX",r),h=Mat(i,"labelY",r),i=e.pstyle(p+"text-margin-x").pfValue,u=e.pstyle(p+"text-margin-y").pfValue,d=e.isEdge(),p=e.pstyle(p+"text-rotation"),g=e.pstyle("text-outline-width").pfValue,f=e.pstyle("text-border-width").pfValue/2,e=e.pstyle("text-background-padding").pfValue,m=l,y=o,v=y/2,x=m/2;if(d)E=c-v,C=c+v,S=h-x,_=h+x;else{switch(a.value){case"left":E=c-y,C=c;break;case"center":E=c-v,C=c+v;break;case"right":C=(E=c)+y}switch(s.value){case"top":S=h-m,_=h;break;case"center":S=h-x,_=h+x;break;case"bottom":_=(S=h)+m}}if(E+=l=i-Math.max(g,f)-e-2,C+=o=i+Math.max(g,f)+e+2,S+=i=u-Math.max(g,f)-e-2,_+=u=u+Math.max(g,f)+e+2,(e=(f=n.labelBounds)[g=r||"main"]=f[g]||{}).x1=E,e.y1=S,e.x2=C,e.y2=_,e.w=C-E,e.h=_-S,e.leftPad=l,e.rightPad=o,e.topPad=i,e.botPad=u,l=d&&"autorotate"===p.strValue,o=null!=p.pfValue&&0!==p.pfValue,l||o){var i=l?Mat(n.rstyle,"labelAngle",r):p.pfValue,b=Math.cos(i),w=Math.sin(i),k=(E+C)/2,T=(S+_)/2;if(!d){switch(a.value){case"left":k=C;break;case"right":k=E}switch(s.value){case"top":T=_;break;case"bottom":T=S}}var u=(e=me(function(t,e){return{x:(t-=k)*b-(e-=T)*w+k,y:t*w+e*b+T}},"rotate"))(E,S),o=e(E,_),l=e(C,S),r=e(C,_),E=Math.min(u.x,o.x,l.x,r.x),C=Math.max(u.x,o.x,l.x,r.x),S=Math.min(u.y,o.y,l.y,r.y),_=Math.max(u.y,o.y,l.y,r.y)}(i=f[p=g+"Rot"]=f[p]||{}).x1=E,i.y1=S,i.x2=C,i.y2=_,i.w=C-E,i.h=_-S,Iat(t,E,S,C,_),Iat(n.labelBounds.all,E,S,C,_)}return t}},"updateBoundsFromLabel"),Pat=me(function(t,e){var r,n,i,a;e.cy().headless()||(r=e.pstyle("outline-opacity").value,i=e.pstyle("outline-width").value,0<r&&0<i&&(r=e.pstyle("outline-offset").value,e=e.pstyle("shape").value,r=(t.w+2*(i+=r))/t.w,a=(t.h+2*i)/t.h,n=0,["diamond","pentagon","round-triangle"].includes(e)?(r=(t.w+2.4*i)/t.w,n=-i/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(e)?r=(t.w+2.4*i)/t.w:"star"===e?(r=(t.w+2.8*i)/t.w,a=(t.h+2.6*i)/t.h,n=-i/3.8):"triangle"===e?(r=(t.w+2.8*i)/t.w,a=(t.h+2.4*i)/t.h,n=-i/1.4):"vee"===e&&(r=(t.w+4.4*i)/t.w,a=(t.h+3.8*i)/t.h,n=.5*-i),e=t.h*a-t.h,i=t.w*r-t.w,Trt(t,[Math.ceil(e/2),Math.ceil(i/2)]),0!==n)&&(a=xrt(t,0,n),brt(t,a)))},"updateBoundsFromOutline"),Bat=me(function(t,e){var r=(n=t._private.cy).styleEnabled(),n=n.headless(),i=mrt(),a=t._private,s=t.isNode(),o=t.isEdge(),l=a.rstyle,c=s&&r?t.pstyle("bounds-expansion").pfValue:[0],h=me(function(t){return"none"!==t.pstyle("display").value},"isDisplayed");if(h=!r||h(t)&&(!o||h(t.source())&&h(t.target()))){var u=0,d=(r&&e.includeOverlays&&0!==t.pstyle("overlay-opacity").value&&(u=t.pstyle("overlay-padding").value),0),u=(r&&e.includeUnderlays&&0!==t.pstyle("underlay-opacity").value&&(d=t.pstyle("underlay-padding").value),Math.max(u,d)),p=0;if(r&&(p=t.pstyle("width").pfValue/2),s&&e.includeNodes){var s=(d=t.position()).x,d=d.y,g=t.outerWidth()/2,f=t.outerHeight()/2;Iat(i,y=s-g,x=d-f,v=s+g,b=d+f),r&&e.includeOutlines&&Pat(i,t)}else if(o&&e.includeEdges)if(r&&!n){var m,s=t.pstyle("curve-style").strValue,y=Math.min(l.srcX,l.midX,l.tgtX),v=Math.max(l.srcX,l.midX,l.tgtX),x=Math.min(l.srcY,l.midY,l.tgtY),b=Math.max(l.srcY,l.midY,l.tgtY);if(Iat(i,y-=p,x-=p,v+=p,b+=p),"haystack"===s)(g=l.haystackPts)&&2===g.length&&(y=g[0].x,x=g[0].y,(v=g[1].x)<y&&(d=y,y=v,v=d),(b=g[1].y)<x&&(f=x,x=b,b=f),Iat(i,y-p,x-p,v+p,b+p));else if("bezier"===s||"unbundled-bezier"===s||s.endsWith("segments")||s.endsWith("taxi")){switch(s){case"bezier":case"unbundled-bezier":m=l.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":m=l.linePts}if(null!=m)for(var w=0;w<m.length;w++){var k=m[w],y=k.x-p;Iat(i,y,x=k.y-p,v=k.x+p,b=k.y+p)}}}else n=t.source().position(),d=t.target().position(),y=n.x,v=d.x,x=n.y,v<y&&(g=y,y=v,v=g),(b=d.y)<x&&(f=x,x=b,b=f),Iat(i,y-=p,x-=p,v+=p,b+=p);r&&e.includeEdges&&o&&(Dat(i,t,"mid-source"),Dat(i,t,"mid-target"),Dat(i,t,"source"),Dat(i,t,"target")),r&&"yes"===t.pstyle("ghost").value&&(s=t.pstyle("ghost-offset-x").pfValue,n=t.pstyle("ghost-offset-y").pfValue,Iat(i,i.x1+s,i.y1+n,i.x2+s,i.y2+n)),g=a.bodyBounds=a.bodyBounds||{},Ert(g,i),Trt(g,c),krt(g,1),r&&(y=i.x1,v=i.x2,x=i.y1,b=i.y2,Iat(i,y-u,x-u,v+u,b+u)),d=a.overlayBounds=a.overlayBounds||{},Ert(d,i),Trt(d,c),krt(d,1),null!=(f=a.labelBounds=a.labelBounds||{}).all?vrt(f.all):f.all=mrt(),r&&e.includeLabels&&(e.includeMainLabels&&Oat(i,t,null),o)&&(e.includeSourceLabels&&Oat(i,t,"source"),e.includeTargetLabels)&&Oat(i,t,"target")}return i.x1=Nat(i.x1),i.y1=Nat(i.y1),i.x2=Nat(i.x2),i.y2=Nat(i.y2),i.w=Nat(i.x2-i.x1),i.h=Nat(i.y2-i.y1),0<i.w&&0<i.h&&h&&(Trt(i,c),krt(i,1)),i},"boundingBoxImpl"),$at=me(function(t){var e=0,r=me(function(t){return(t?1:0)<<e++},"tf"),n=0;return(n+=r(t.incudeNodes))+r(t.includeEdges)+r(t.includeLabels)+r(t.includeMainLabels)+r(t.includeSourceLabels)+r(t.includeTargetLabels)+r(t.includeOverlays)+r(t.includeOutlines)},"getKey"),Fat=me(function(t){var e,r;return t.isEdge()?(e=t.source().position(),t=t.target().position(),r=me(function(t){return Math.round(t)},"r"),det([r(e.x),r(e.y),r(t.x),r(t.y)])):0},"getBoundingBoxPosKey"),zat=me(function(t,e){var r,n=t._private,i=t.isEdge(),a=(null==e?Uat:$at(e))===Uat,s=Fat(t),o=n.bbCachePosKey===s,l=e.useCache&&o,c=me(function(t){return null==t._private.bbCache||t._private.styleDirty},"isDirty");return!l||c(t)||i&&(c(t.source())||c(t.target()))?(o||t.recalculateRenderedStyle(l),r=Bat(t,Gat),n.bbCache=r,n.bbCachePosKey=s):r=n.bbCache,a||(c=t.isNode(),r=mrt(),(e.includeNodes&&c||e.includeEdges&&!c)&&(e.includeOverlays?Rat(r,n.overlayBounds):Rat(r,n.bodyBounds)),e.includeLabels&&(e.includeMainLabels&&(!i||e.includeSourceLabels&&e.includeTargetLabels)?Rat(r,n.labelBounds.all):(e.includeMainLabels&&Rat(r,n.labelBounds.mainRot),e.includeSourceLabels&&Rat(r,n.labelBounds.sourceRot),e.includeTargetLabels&&Rat(r,n.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1),r},"cachedBoundingBoxImpl"),Uat=$at(Gat={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0}),qat=Det(Gat),jot.boundingBox=function(t){if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==t&&void 0!==t.useCache&&!0!==t.useCache){var e=mrt(),r=qat(t=t||Gat);if(this.cy().styleEnabled())for(var n=0;n<this.length;n++){var i=this[n],a=i._private,s=Fat(i),s=a.bbCachePosKey===s,s=r.useCache&&s&&!a.styleDirty;i.recalculateRenderedStyle(s)}this.updateCompoundBounds(!t.useCache);for(var o=0;o<this.length;o++){var l=this[o];Rat(e,zat(l,r))}}else t=void 0===t?Gat:qat(t),e=zat(this[0],t);return e.x1=Nat(e.x1),e.y1=Nat(e.y1),e.x2=Nat(e.x2),e.y2=Nat(e.y2),e.w=Nat(e.x2-e.x1),e.h=Nat(e.y2-e.y1),e},jot.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},jot.boundingBoxAt=function(r){var t,e=this.nodes(),n=this.cy(),i=n.hasCompoundNodes(),a=n.collection(),s=(i&&(a=e.filter(function(t){return t.isParent()}),e=e.not(a)),XJ(r)&&(t=r,r=me(function(){return t},"fn")),me(function(t,e){return t._private.bbAtOldPos=r(t,e)},"storeOldPos")),o=me(function(t){return t._private.bbAtOldPos},"getOldPos"),s=(n.startBatch(),e.forEach(s).silentPositions(r),i&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),yrt(this.boundingBox({useCache:!1})));return e.silentPositions(o),i&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),n.endBatch(),s},tot.boundingbox=tot.bb=tot.boundingBox,tot.renderedBoundingbox=tot.renderedBoundingBox,glt=jot,jat=Wot={},(Tlt=me(function(n){n.uppercaseName=gtt(n.name),n.autoName="auto"+n.uppercaseName,n.labelName="label"+n.uppercaseName,n.outerName="outer"+n.uppercaseName,n.uppercaseOuterName=gtt(n.outerName),jat[n.name]=me(function(){var t=this[0],e=t._private,r=e.cy._private.styleEnabled;if(t)return r?t.isParent()?(t.updateCompoundBounds(),e[n.autoName]||0):"label"!==(r=t.pstyle(n.name)).strValue?r.pfValue:(t.recalculateRenderedStyle(),e.rstyle[n.labelName]||0):1},"dimImpl"),jat["outer"+n.uppercaseName]=me(function(){var t=this[0],e=t._private.cy._private.styleEnabled;if(t)return e?t[n.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},"outerDimImpl"),jat["rendered"+n.uppercaseName]=me(function(){var t=this[0];if(t)return t[n.name]()*this.cy().zoom()},"renderedDimImpl"),jat["rendered"+n.uppercaseOuterName]=me(function(){var t=this[0];if(t)return t[n.outerName]()*this.cy().zoom()},"renderedOuterDimImpl")},"defineDimFns"))({name:"width"}),Tlt({name:"height"}),Wot.padding=function(){var t=this[0],e=t._private;return t.isParent()&&(t.updateCompoundBounds(),void 0!==e.autoPadding)?e.autoPadding:t.pstyle("padding").pfValue},Wot.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},Wot.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()},Vot=Wot,Wat=me(function(t,e){if(t.isEdge())return e(t)},"ifEdge"),Yat=me(function(t,e){var r;if(t.isEdge())return r=t.cy(),Qet(e(t),r.zoom(),r.pan())},"ifEdgeRenderedPosition"),Hat=me(function(t,e){var r,n,i;if(t.isEdge())return r=t.cy(),n=r.pan(),i=r.zoom(),e(t).map(function(t){return Qet(t,i,n)})},"ifEdgeRenderedPositions"),Yot=me(function(t){return t.renderer().getControlPoints(t)},"controlPoints"),Xot=me(function(t){return t.renderer().getSegmentPoints(t)},"segmentPoints"),Hot=me(function(t){return t.renderer().getSourceEndpoint(t)},"sourceEndpoint"),Elt=me(function(t){return t.renderer().getTargetEndpoint(t)},"targetEndpoint"),xlt=me(function(t){return t.renderer().getEdgeMidpoint(t)},"midpoint"),Vat={controlPoints:{get:Yot,mult:!0},segmentPoints:{get:Xot,mult:!0},sourceEndpoint:{get:Hot},targetEndpoint:{get:Elt},midpoint:{get:xlt}},Xat=me(function(t){return"rendered"+t[0].toUpperCase()+t.substr(1)},"renderedName"),tot=Object.keys(Vat).reduce(function(t,e){var r=Vat[e],n=Xat(e);return t[e]=function(){return Wat(this,r.get)},r.mult?t[n]=function(){return Hat(this,r.get)}:t[n]=function(){return Yat(this,r.get)},t},{}),jot=vtt({},olt,glt,Vot,tot),Kat=me(function(t,e){this.recycle(t,e)},"Event"),me(cQ,"returnFalse"),me(hQ,"returnTrue"),Kat.prototype={instanceString:me(function(){return"event"},"instanceString"),recycle:me(function(t,e){var r,n;this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=cQ,null!=t&&t.preventDefault?(this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?hQ:cQ):null!=t&&t.type?e=t:this.type=t,null!=e&&(this.originalEvent=e.originalEvent,this.type=(null!=e.type?e:this).type,this.cy=e.cy,this.target=e.target,this.position=e.position,this.renderedPosition=e.renderedPosition,this.namespace=e.namespace,this.layout=e.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition&&(e=this.position,r=this.cy.zoom(),n=this.cy.pan(),this.renderedPosition={x:e.x*r+n.x,y:e.y*r+n.y}),this.timeStamp=t&&t.timeStamp||Date.now()},"recycle"),preventDefault:me(function(){this.isDefaultPrevented=hQ;var t=this.originalEvent;t&&t.preventDefault&&t.preventDefault()},"preventDefault"),stopPropagation:me(function(){this.isPropagationStopped=hQ;var t=this.originalEvent;t&&t.stopPropagation&&t.stopPropagation()},"stopPropagation"),stopImmediatePropagation:me(function(){this.isImmediatePropagationStopped=hQ,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:cQ,isPropagationStopped:cQ,isImmediatePropagationStopped:cQ},Zat=/^([^.]+)(\.(?:[^.]+))?$/,Qat={qualifierCompare:me(function(t,e){return t===e},"qualifierCompare"),eventMatches:me(function(){return!0},"eventMatches"),addEventFields:me(function(){},"addEventFields"),callbackContext:me(function(t){return t},"callbackContext"),beforeEmit:me(function(){},"beforeEmit"),afterEmit:me(function(){},"afterEmit"),bubble:me(function(){return!1},"bubble"),parent:me(function(){return null},"parent"),context:null},Jat=Object.keys(Qat),tst={},me(uQ,"Emitter"),Tlt=uQ.prototype,est=me(function(t,e,r,n,i,a,s){HJ(n)&&(i=n,n=null),s&&(a=null==a?s:vtt({},a,s));for(var o=VJ(r)?r:r.split(/\s+/),l=0;l<o.length;l++){var c=o[l];if(!att(c)){var h=c.match(Zat);if(h&&!1===e(t,c,h[1],h[2]||null,n,i,a))break}}},"forEachEvent"),rst=me(function(t,e){return t.addEventFields(t.context,e),new Kat(e.type,e)},"makeEventObj"),nst=me(function(t,e,r){if(itt(r))e(t,r);else if(XJ(r))e(t,rst(t,r));else for(var n=VJ(r)?r:r.split(/\s+/),i=0;i<n.length;i++){var a,s=n[i];att(s)||(s=s.match(Zat))&&(a=s[1],s=s[2]||null,e(t,rst(t,{type:a,namespace:s,target:t.context})))}},"forEachEventObj"),Tlt.on=Tlt.addListener=function(t,e,r,n,i){return est(this,function(t,e,r,n,i,a,s){HJ(a)&&t.listeners.push({event:e,callback:a,type:r,namespace:n,qualifier:i,conf:s})},t,e,r,n,i),this},Tlt.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0})},Tlt.removeListener=Tlt.off=function(l,t,e,r){var n=this;0!==this.emitting&&(this.listeners=Net(this.listeners));for(var c=this.listeners,i=me(function(s){var o=c[s];est(n,function(t,e,r,n,i,a){if((o.type===r||"*"===l)&&(!n&&".*"!==o.namespace||o.namespace===n)&&(!i||t.qualifierCompare(o.qualifier,i))&&(!a||o.callback===a))return c.splice(s,1),!1},l,t,e,r)},"_loop"),a=c.length-1;0<=a;a--)i(a);return this},Tlt.removeAllListeners=function(){return this.removeListener("*")},Tlt.emit=Tlt.trigger=function(t,a,r){var s=this.listeners,o=s.length;return this.emitting++,VJ(a)||(a=[a]),nst(this,function(n,i){null!=r&&(s=[{event:i.event,type:i.type,namespace:i.namespace,callback:r}],o=s.length);for(var t=me(function(t){var e,r=s[t];r.type!==i.type||r.namespace&&r.namespace!==i.namespace&&".*"!==r.namespace||!n.eventMatches(n.context,r,i)||(t=[i],null!=a&&Bet(t,a),n.beforeEmit(n.context,r,i),r.conf&&r.conf.one&&(n.listeners=n.listeners.filter(function(t){return t!==r})),e=n.callbackContext(n.context,r,i),e=r.callback.apply(e,t),n.afterEmit(n.context,r,i),!1===e&&(i.stopPropagation(),i.preventDefault()))},"_loop2"),e=0;e<o;e++)t(e);n.bubble(n.context)&&!i.isPropagationStopped()&&n.parent(n.context).emit(i,a)},t),this.emitting--,this},ist={qualifierCompare:me(function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},"qualifierCompare"),eventMatches:me(function(t,e,r){return null==(e=e.qualifier)||t!==r.target&&ttt(r.target)&&e.matches(r.target)},"eventMatches"),addEventFields:me(function(t,e){e.cy=t.cy(),e.target=t},"addEventFields"),callbackContext:me(function(t,e,r){return null!=e.qualifier?r.target:t},"callbackContext"),beforeEmit:me(function(t,e){e.conf&&e.conf.once&&e.conf.onceCollection.removeListener(e.event,e.qualifier,e.callback)},"beforeEmit"),bubble:me(function(){return!0},"bubble"),parent:me(function(t){return t.isChild()?t.parent():t.cy()},"parent")},ast=me(function(t){return YJ(t)?new _at(t):t},"argSelector"),Wot={createEmitter:me(function(){for(var t=0;t<this.length;t++){var e=this[t],r=e._private;r.emitter||(r.emitter=new uQ(ist,e))}return this},"createEmitter"),emitter:me(function(){return this._private.emitter},"emitter"),on:me(function(t,e,r){for(var n=ast(e),i=0;i<this.length;i++)this[i].emitter().on(t,n,r);return this},"on"),removeListener:me(function(t,e,r){for(var n=ast(e),i=0;i<this.length;i++)this[i].emitter().removeListener(t,n,r);return this},"removeListener"),removeAllListeners:me(function(){for(var t=0;t<this.length;t++)this[t].emitter().removeAllListeners();return this},"removeAllListeners"),one:me(function(t,e,r){for(var n=ast(e),i=0;i<this.length;i++)this[i].emitter().one(t,n,r);return this},"one"),once:me(function(t,e,r){for(var n=ast(e),i=0;i<this.length;i++)this[i].emitter().on(t,n,r,{once:!0,onceCollection:this})},"once"),emit:me(function(t,e){for(var r=0;r<this.length;r++)this[r].emitter().emit(t,e);return this},"emit"),emitAndNotify:me(function(t,e){if(0!==this.length)return this.cy().notify(t,this),this.emit(t,e),this},"emitAndNotify")},cat.eventAliasesOn(Wot),Yot={nodes:me(function(t){return this.filter(function(t){return t.isNode()}).filter(t)},"nodes"),edges:me(function(t){return this.filter(function(t){return t.isEdge()}).filter(t)},"edges"),byGroup:me(function(){for(var t=this.spawn(),e=this.spawn(),r=0;r<this.length;r++){var n=this[r];(n.isNode()?t:e).push(n)}return{nodes:t,edges:e}},"byGroup"),filter:me(function(t,e){if(void 0===t)return this;if(YJ(t)||JJ(t))return new _at(t).filter(this);if(HJ(t)){for(var r=this.spawn(),n=0;n<this.length;n++){var i=this[n];(e?t.apply(e,[i,n,this]):t(i,n,this))&&r.push(i)}return r}return this.spawn()},"filter"),not:me(function(t){if(t){YJ(t)&&(t=this.filter(t));for(var e=this.spawn(),r=0;r<this.length;r++){var n=this[r];t.has(n)||e.push(n)}return e}return this},"not"),absoluteComplement:me(function(){return this.cy().mutableElements().not(this)},"absoluteComplement"),intersect:me(function(t){if(YJ(t))return this.filter(t);for(var e=this.spawn(),r=this.length<t.length,n=r?this:t,i=r?t:this,a=0;a<n.length;a++){var s=n[a];i.has(s)&&e.push(s)}return e},"intersect"),xor:me(function(t){var e=this._private.cy,a=(YJ(t)&&(t=e.$(t)),this.spawn()),e=t;return(t=me(function(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=n._private.data.id;e.hasElementWithId(i)||a.push(n)}},"add"))(this,e),t(e,this),a},"xor"),diff:me(function(t){var e=this._private.cy,e=(YJ(t)&&(t=e.$(t)),this.spawn()),r=this.spawn(),s=this.spawn(),n=me(function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n],a=i._private.data.id;e.hasElementWithId(a)?s.merge(i):r.push(i)}},"add");return n(this,t,e),n(t,this,r),{left:e,right:r,both:s}},"diff"),add:me(function(t){var e,r=this._private.cy;if(!t)return this;YJ(t)&&(e=t,t=r.mutableElements().filter(e));for(var n=this.spawnSelf(),i=0;i<t.length;i++){var a=t[i];this.has(a)||n.push(a)}return n},"add"),merge:me(function(t){var e,r=this._private,n=r.cy;if(t){YJ(t)&&(e=t,t=n.mutableElements().filter(e));for(var i=r.map,a=0;a<t.length;a++){var s,o=t[a],l=o._private.data.id;i.has(l)||(s=this.length++,this[s]=o,i.set(l,{ele:o,index:s}))}}return this},"merge"),unmergeAt:me(function(t){var e,r,n=this[t].id(),i=this._private.map,n=(this[t]=void 0,i.delete(n),t===this.length-1);return 1<this.length&&!n&&(r=(e=this[n=this.length-1])._private.data.id,this[n]=void 0,this[t]=e,i.set(r,{ele:e,index:t})),this.length--,this},"unmergeAt"),unmergeOne:me(function(t){t=t[0];var e=this._private,t=t._private.data.id;return(e=e.map.get(t))&&(t=e.index,this.unmergeAt(t)),this},"unmergeOne"),unmerge:me(function(t){var e,r=this._private.cy;if(t){YJ(t)&&(e=t,t=r.mutableElements().filter(e));for(var n=0;n<t.length;n++)this.unmergeOne(t[n])}return this},"unmerge"),unmergeBy:me(function(t){for(var e=this.length-1;0<=e;e--)t(this[e])&&this.unmergeAt(e);return this},"unmergeBy"),map:me(function(t,e){for(var r=[],n=0;n<this.length;n++){var i=this[n],i=e?t.apply(e,[i,n,this]):t(i,n,this);r.push(i)}return r},"map"),reduce:me(function(t,e){for(var r=e,n=0;n<this.length;n++)r=t(r,this[n],n,this);return r},"reduce"),max:me(function(t,e){for(var r,n=-1/0,i=0;i<this.length;i++){var a=this[i],s=e?t.apply(e,[a,i,this]):t(a,i,this);n<s&&(n=s,r=a)}return{value:n,ele:r}},"max"),min:me(function(t,e){for(var r,n=1/0,i=0;i<this.length;i++){var a=this[i],s=e?t.apply(e,[a,i,this]):t(a,i,this);s<n&&(n=s,r=a)}return{value:n,ele:r}},"min")},(Xot=Yot).u=Xot["|"]=Xot["+"]=Xot.union=Xot.or=Xot.add,Xot["\\"]=Xot["!"]=Xot["-"]=Xot.difference=Xot.relativeComplement=Xot.subtract=Xot.not,Xot.n=Xot["&"]=Xot["."]=Xot.and=Xot.intersection=Xot.intersect,Xot["^"]=Xot["(+)"]=Xot["(-)"]=Xot.symmetricDifference=Xot.symdiff=Xot.xor,Xot.fnFilter=Xot.filterFn=Xot.stdFilter=Xot.filter,Xot.complement=Xot.abscomp=Xot.absoluteComplement,Hot={isNode:me(function(){return"nodes"===this.group()},"isNode"),isEdge:me(function(){return"edges"===this.group()},"isEdge"),isLoop:me(function(){return this.isEdge()&&this.source()[0]===this.target()[0]},"isLoop"),isSimple:me(function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},"isSimple"),group:me(function(){var t=this[0];if(t)return t._private.group},"group")},sst=me(function(t,e){var r=t.cy().hasCompoundNodes();function n(t){var e=t.pstyle("z-compound-depth");return"auto"===e.value?r?t.zDepth():0:"bottom"===e.value?-1:"top"===e.value?xet:0}me(n,"getDepth");var i=n(t)-n(e);return 0!=i||(me(a,"getEleDepth"),0!=(i=a(t)-a(e)))||0!=(i=t.pstyle("z-index").value-e.pstyle("z-index").value)?i:t.poolIndex()-e.poolIndex();function a(t){return"auto"===t.pstyle("z-index-compare").value&&t.isNode()?1:0}},"zIndexSort"),(ost={forEach:me(function(t,e){if(HJ(t))for(var r=this.length,n=0;n<r;n++){var i=this[n];if(!1===(e?t.apply(e,[i,n,this]):t(i,n,this)))break}return this},"forEach"),toArray:me(function(){for(var t=[],e=0;e<this.length;e++)t.push(this[e]);return t},"toArray"),slice:me(function(t,e){var r=[],n=this.length;(e=null==e?n:e)<0&&(e=n+e);for(var i=t=(t=null==t?0:t)<0?n+t:t;0<=i&&i<e&&i<n;i++)r.push(this[i]);return this.spawn(r)},"slice"),size:me(function(){return this.length},"size"),eq:me(function(t){return this[t]||this.spawn()},"eq"),first:me(function(){return this[0]||this.spawn()},"first"),last:me(function(){return this[this.length-1]||this.spawn()},"last"),empty:me(function(){return 0===this.length},"empty"),nonempty:me(function(){return!this.empty()},"nonempty"),sort:me(function(t){return HJ(t)?(t=this.toArray().sort(t),this.spawn(t)):this},"sort"),sortByZIndex:me(function(){return this.sort(sst)},"sortByZIndex"),zDepth:me(function(){var t,e,r=this[0];if(r)return"nodes"===(e=r._private).group?(t=e.data.parent?r.parents().size():0,r.isParent()?t:xet-1):(r=e.source,t=e.target,e=r.zDepth(),r=t.zDepth(),Math.max(e,r,0))},"zDepth")}).each=ost.forEach,me(function(){"undefined"!=("u"<typeof Symbol?"undefined":$K(Symbol))&&"undefined"!=$K(Symbol.iterator)&&(ost[Symbol.iterator]=function(){var t=this,e={value:void 0,done:!1},r=0,n=this.length;return UK({next:me(function(){return r<n?e.value=t[r++]:(e.value=void 0,e.done=!0),e},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator")(),lst=Det({nodeDimensionsIncludeLabels:!1}),(Elt={layoutDimensions:me(function(t){return t=lst(t),0!==(t=this.takesUpSpace()?t.nodeDimensionsIncludeLabels?{w:(t=this.boundingBox()).w,h:t.h}:{w:this.outerWidth(),h:this.outerHeight()}:{w:0,h:0}).w&&0!==t.h||(t.w=t.h=1),t},"layoutDimensions"),layoutPositions:me(function(t,n,e){var i=this.nodes().filter(function(t){return!t.isParent()}),r=this.cy(),a=n.eles,s=me(function(t){return t.id()},"getMemoizeKey"),o=htt(e,s),l=(t.emit({type:"layoutstart",layout:t}),t.animations=[],me(function(t,e,r){var n=e.x1+e.w/2,e=e.y1+e.h/2;return{x:n+(r.x-n)*t,y:e+(r.y-e)*t}},"calculateSpacing")),c=n.spacingFactor&&1!==n.spacingFactor,h=me(function(){if(!c)return null;for(var t=mrt(),e=0;e<i.length;e++){var r=i[e],r=o(r,e);wrt(t,r.x,r.y)}return t},"spacingBb")(),u=htt(function(t,e){var r,e=o(t,e);return c&&(r=Math.abs(n.spacingFactor),e=l(r,h,e)),null!=n.transform?n.transform(t,e):e},s);if(n.animate){for(var d=0;d<i.length;d++){var p,g=i[d],f=u(g,d);null==n.animateFilter||n.animateFilter(g,d)?(p=g.animation({position:f,duration:n.animationDuration,easing:n.animationEasing}),t.animations.push(p)):g.position(f)}n.fit?(e=r.animation({fit:{boundingBox:a.boundingBoxAt(u),padding:n.padding},duration:n.animationDuration,easing:n.animationEasing}),t.animations.push(e)):void 0!==n.zoom&&void 0!==n.pan&&(s=r.animation({zoom:n.zoom,pan:n.pan,duration:n.animationDuration,easing:n.animationEasing}),t.animations.push(s)),t.animations.forEach(function(t){return t.play()}),t.one("layoutready",n.ready),t.emit({type:"layoutready",layout:t}),uit.all(t.animations.map(function(t){return t.promise()})).then(function(){t.one("layoutstop",n.stop),t.emit({type:"layoutstop",layout:t})})}else i.positions(u),n.fit&&r.fit(n.eles,n.padding),null!=n.zoom&&r.zoom(n.zoom),n.pan&&r.pan(n.pan),t.one("layoutready",n.ready),t.emit({type:"layoutready",layout:t}),t.one("layoutstop",n.stop),t.emit({type:"layoutstop",layout:t});return this},"layoutPositions"),layout:me(function(t){return this.cy().makeLayout(vtt({},t,{eles:this}))},"layout")}).createLayout=Elt.makeLayout=Elt.layout,me(dQ,"styleCache"),me(pQ,"cacheStyleFunction"),me(gQ,"cachePrototypeStyleFunction"),xlt={recalculateRenderedStyle:me(function(t){var e=(r=this.cy()).renderer(),r=r.styleEnabled();return e&&r&&e.recalculateRenderedStyle(this,t),this},"recalculateRenderedStyle"),dirtyStyleCache:me(function(){var t=this.cy(),e=me(function(t){return t._private.styleCache=null},"dirty");return t.hasCompoundNodes()?((t=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(t.connectedEdges()),t.forEach(e)):this.forEach(function(t){e(t),t.connectedEdges().forEach(e)}),this},"dirtyStyleCache"),updateStyle:me(function(t){var e,r=this._private.cy;return r.styleEnabled()&&(r.batching()?r._private.batchStyleEles.merge(this):(e=this,t=!(!t&&void 0!==t),r=e=r.hasCompoundNodes()?this.spawnSelf().merge(this.descendants()).merge(this.parents()):e,t?r.emitAndNotify("style"):r.emit("style"),e.forEach(function(t){return t._private.styleDirty=!0}))),this},"updateStyle"),cleanStyle:me(function(){var t=this.cy();if(t.styleEnabled())for(var e=0;e<this.length;e++){var r=this[e];r._private.styleDirty&&(r._private.styleDirty=!1,t.style().apply(r))}},"cleanStyle"),parsedStyle:me(function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=this[0],n=r.cy();if(n.styleEnabled()&&r)return r._private.styleDirty&&(r._private.styleDirty=!1,n.style().apply(r)),r._private.style[t]??(e?n.style().getDefaultProperty(t):null)},"parsedStyle"),numericStyle:me(function(t){var e=this[0];if(e.cy().styleEnabled()&&e)return void 0!==(e=e.pstyle(t)).pfValue?e.pfValue:e.value},"numericStyle"),numericStyleUnits:me(function(t){var e=this[0];if(e.cy().styleEnabled()&&e)return e.pstyle(t).units},"numericStyleUnits"),renderedStyle:me(function(t){var e,r=this.cy();return r.styleEnabled()?(e=this[0])?r.style().getRenderedStyle(e,t):void 0:this},"renderedStyle"),style:me(function(t,e){if((n=this.cy()).styleEnabled()){var r,n=n.style();if(XJ(t))n.applyBypass(this,t,!1),this.emitAndNotify("style");else if(YJ(t)){if(void 0===e)return(r=this[0])?n.getStylePropertyValue(r,t):void 0;n.applyBypass(this,t,e,!1),this.emitAndNotify("style")}else if(void 0===t)return(r=this[0])?n.getRawStyle(r):void 0}return this},"style"),removeStyle:me(function(t){var e=this.cy();if(e.styleEnabled()){var r=e.style();if(void 0===t)for(var n=0;n<this.length;n++){var i=this[n];r.removeAllBypasses(i,!1)}else{t=t.split(/\s+/);for(var a=0;a<this.length;a++){var s=this[a];r.removeBypasses(s,t,!1)}}this.emitAndNotify("style")}return this},"removeStyle"),show:me(function(){return this.css("display","element"),this},"show"),hide:me(function(){return this.css("display","none"),this},"hide"),effectiveOpacity:me(function(){if(!(t=this.cy()).styleEnabled())return 1;var t=t.hasCompoundNodes(),e=this[0];if(e){var r=e._private,n=e.pstyle("opacity").value;if(t){var i=r.data.parent?e.parents():null;if(i)for(var a=0;a<i.length;a++)n*=i[a].pstyle("opacity").value}return n}},"effectiveOpacity"),transparent:me(function(){var t,e;return!!this.cy().styleEnabled()&&(e=(t=this[0]).cy().hasCompoundNodes(),t?e?0===t.effectiveOpacity():0===t.pstyle("opacity").value:void 0)},"transparent"),backgrounding:me(function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding},"backgrounding")},me(fQ,"checkCompound"),me(mQ,"defineDerivedStateFunction"),cst=pQ("eleTakesUpSpace",function(t){return"element"===t.pstyle("display").value&&0!==t.width()&&(!t.isNode()||0!==t.height())}),xlt.takesUpSpace=gQ("takesUpSpace",mQ({ok:cst})),olt=pQ("eleInteractive",function(t){return"yes"===t.pstyle("events").value&&"visible"===t.pstyle("visibility").value&&cst(t)}),glt=pQ("parentInteractive",function(t){return"visible"===t.pstyle("visibility").value&&cst(t)}),xlt.interactive=gQ("interactive",mQ({ok:olt,parentOk:glt,edgeOkViaNode:cst})),xlt.noninteractive=function(){var t=this[0];if(t)return!t.interactive()},Vot=pQ("eleVisible",function(t){return"visible"===t.pstyle("visibility").value&&0!==t.pstyle("opacity").pfValue&&cst(t)}),tot=cst,xlt.visible=gQ("visible",mQ({ok:Vot,edgeOkViaNode:tot})),xlt.hidden=function(){var t=this[0];if(t)return!t.visible()},xlt.isBundledBezier=gQ("isBundledBezier",function(){return!!this.cy().styleEnabled()&&!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace()}),xlt.bypass=xlt.css=xlt.style,xlt.renderedCss=xlt.renderedStyle,xlt.removeBypass=xlt.removeCss=xlt.removeStyle,xlt.pstyle=xlt.parsedStyle,hst={},me(yQ,"defineSwitchFunction"),me(vQ,"defineSwitchSet"),vQ({field:"locked",overrideField:me(function(t){return!!t.cy().autolock()||void 0},"overrideField"),on:"lock",off:"unlock"}),vQ({field:"grabbable",overrideField:me(function(t){return!t.cy().autoungrabify()&&!t.pannable()&&void 0},"overrideField"),on:"grabify",off:"ungrabify"}),vQ({field:"selected",ableField:"selectable",overrideAble:me(function(t){return!t.cy().autounselectify()&&void 0},"overrideAble"),on:"select",off:"unselect"}),vQ({field:"selectable",overrideField:me(function(t){return!t.cy().autounselectify()&&void 0},"overrideField"),on:"selectify",off:"unselectify"}),hst.deselect=hst.unselect,hst.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},vQ({field:"active",on:"activate",off:"unactivate"}),vQ({field:"pannable",on:"panify",off:"unpanify"}),hst.inactive=function(){var t=this[0];if(t)return!t._private.active},Tlt={},Xot=me(function(c){return me(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode()){for(var i=!1,a=n.connectedEdges(),s=0;s<a.length;s++){var o=(l=a[s]).source(),l=l.target();if(c.noIncomingEdges&&l===n&&o!==n||c.noOutgoingEdges&&o===n&&l!==n){i=!0;break}}i||e.push(n)}}return this.spawn(e,!0).filter(t)},"dagExtremityImpl")},"defineDagExtremity"),olt=me(function(c){return function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n.connectedEdges(),a=0;a<i.length;a++){var s=i[a],o=s.source(),l=s.target();c.outgoing&&o===n?(e.push(s),e.push(l)):c.incoming&&l===n&&(e.push(s),e.push(o))}}return this.spawn(e,!0).filter(t)}},"defineDagOneHop"),glt=me(function(c){return function(t){for(var e=this,r=[],n={};;){var i=c.outgoing?e.outgoers():e.incomers();if(0===i.length)break;for(var a=!1,s=0;s<i.length;s++){var o=i[s],l=o.id();n[l]||(n[l]=!0,r.push(o),a=!0)}if(!a)break;e=i}return this.spawn(r,!0).filter(t)}},"defineDagAllHops"),Tlt.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},vtt(Tlt,{roots:Xot({noIncomingEdges:!0}),leaves:Xot({noOutgoingEdges:!0}),outgoers:flt(olt({outgoing:!0}),"outgoers"),successors:glt({outgoing:!0}),incomers:flt(olt({incoming:!0}),"incomers"),predecessors:glt({incoming:!0})}),vtt(Tlt,{neighborhood:flt(function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var i=r[n],a=i.connectedEdges(),s=0;s<a.length;s++){var o=a[s],l=o.source(),c=o.target();0<(c=i===l?c:l).length&&e.push(c[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:me(function(t){return this.neighborhood().add(this).filter(t)},"closedNeighborhood"),openNeighborhood:me(function(t){return this.neighborhood(t)},"openNeighborhood")}),Tlt.neighbourhood=Tlt.neighborhood,Tlt.closedNeighbourhood=Tlt.closedNeighborhood,Tlt.openNeighbourhood=Tlt.openNeighborhood,vtt(Tlt,{source:flt(me(function(t){var e,r=this[0];return(e=r?r._private.source||r.cy().collection():e)&&t?e.filter(t):e},"sourceImpl"),"source"),target:flt(me(function(t){var e,r=this[0];return(e=r?r._private.target||r.cy().collection():e)&&t?e.filter(t):e},"targetImpl"),"target"),sources:xQ({attr:"source"}),targets:xQ({attr:"target"})}),me(xQ,"defineSourceFunction"),vtt(Tlt,{edgesWith:flt(bQ(),"edgesWith"),edgesTo:flt(bQ({thisIsSrc:!0}),"edgesTo")}),me(bQ,"defineEdgesWithFunction"),vtt(Tlt,{connectedEdges:flt(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n._private.edges,a=0;a<i.length;a++){var s=i[a];e.push(s)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:flt(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];n.isEdge()&&(e.push(n.source()[0]),e.push(n.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:flt(wQ(),"parallelEdges"),codirectedEdges:flt(wQ({codirected:!0}),"codirectedEdges")}),me(wQ,"defineParallelEdgesFunction"),vtt(Tlt,{components:me(function(t){var r=this,n=r.cy(),i=n.collection(),a=(null==t?r:t).nodes(),s=[],o=(null!=t&&a.empty()&&(a=t.sources()),me(function(t,e){i.merge(t),a.unmerge(t),e.merge(t)},"visitInComponent"));if(a.empty())return r.spawn();for(var e=me(function(){var e=n.collection(),t=(s.push(e),a[0]);o(t,e),r.bfs({directed:!1,roots:t,visit:me(function(t){return o(t,e)},"visit")}),e.forEach(function(t){t.connectedEdges().forEach(function(t){r.has(t)&&e.has(t.source())&&e.has(t.target())&&e.merge(t)})})},"_loop");e(),0<a.length;);return s},"components"),component:me(function(){var t=this[0];return t.cy().mutableElements().components(t)[0]},"component")}),Tlt.componentsOf=Tlt.components,ust=me(function(t,e){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(void 0===t)Eet("A collection must have a reference to the core");else{var i=new zet,a=!1;if(e){if(0<e.length&&XJ(e[0])&&!ttt(e[0])){for(var a=!0,s=[],o=new Get,l=0,c=e.length;l<c;l++){var h=e[l],u=(null==h.data&&(h.data={}),h.data);if(null==u.id)u.id=Iet();else if(t.hasElementWithId(u.id)||o.has(u.id))continue;h=new Uet(t,h,!1),s.push(h),o.add(u.id)}e=s}}else e=[];for(var d=this.length=0,p=e.length;d<p;d++){var g,f=e[d][0];null!=f&&(g=f._private.data.id,r&&i.has(g)||(r&&i.set(g,{index:this.length,ele:f}),this[this.length]=f,this.length++))}this._private={eles:this,cy:t,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(t){this.lazyMap=t},rebuildMap:me(function(){for(var t=this.lazyMap=new zet,e=this.eles,r=0;r<e.length;r++){var n=e[r];t.set(n.id(),{index:r,ele:n})}},"rebuildMap")},r&&(this._private.map=i),a&&!n&&this.restore()}},"Collection"),(dst=Uet.prototype=ust.prototype=Object.create(Array.prototype)).instanceString=function(){return"collection"},dst.spawn=function(t,e){return new ust(this.cy(),t,e)},dst.spawnSelf=function(){return this.spawn(this)},dst.cy=function(){return this._private.cy},dst.renderer=function(){return this._private.cy.renderer()},dst.element=function(){return this[0]},dst.collection=function(){return ett(this)?this:new ust(this._private.cy,[this])},dst.unique=function(){return new ust(this._private.cy,this,!0)},dst.hasElementWithId=function(t){return this._private.map.has(t=""+t)},dst.getElementById=function(t){var e=this._private.cy;return(t=this._private.map.get(t=""+t))?t.ele:new ust(e)},dst.$id=dst.getElementById,dst.poolIndex=function(){var t=this._private.cy._private.elements,e=this[0]._private.data.id;return t._private.map.get(e).index},dst.indexOf=function(t){return t=t[0]._private.data.id,this._private.map.get(t).index},dst.indexOfId=function(t){return this._private.map.get(t=""+t).index},dst.json=function(i){var a,t,e,r,n,s,o,l,c=this.element(),h=this.cy();return null==c&&i?this:null!=c?(a=c._private,XJ(i)?(h.startBatch(),i.data&&(c.data(i.data),t=a.data,c.isEdge()?(s=!1,e={},r=i.data.source,n=i.data.target,null!=r&&r!=t.source&&(e.source=""+r,s=!0),null!=n&&n!=t.target&&(e.target=""+n,s=!0),s&&(c=c.move(e))):(r="parent"in i.data,n=i.data.parent,!r||null==n&&null==t.parent||n==t.parent||(c=c.move({parent:n=null!=(n=void 0===n?null:n)?""+n:n})))),i.position&&c.position(i.position),(s=me(function(t,e,r){var n=i[t];null!=n&&n!==a[t]&&(n?c[e]():c[r]())},"checkSwitch"))("removed","remove","restore"),s("selected","select","unselect"),s("selectable","selectify","unselectify"),s("locked","lock","unlock"),s("grabbable","grabify","ungrabify"),s("pannable","panify","unpanify"),null!=i.classes&&c.classes(i.classes),h.endBatch(),this):void 0===i?((o={data:Let(a.data),position:Let(a.position),group:a.group,removed:a.removed,selected:a.selected,selectable:a.selectable,locked:a.locked,grabbable:a.grabbable,pannable:a.pannable,classes:null}).classes="",l=0,a.classes.forEach(function(t){return o.classes+=0==l++?t:" "+t}),o):void 0):void 0},dst.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e].json();t.push(r)}return t},dst.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r].json(),n=new Uet(t,n,!1);e.push(n)}return new ust(t,e)},dst.copy=dst.clone,dst.restore=function(){for(var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=this.cy(),n=r._private,i=[],a=[],s=0,o=this.length;s<o;s++){var l=this[s];e&&!l.removed()||(l.isNode()?i:a).push(l)}for(var c=i.concat(a),h=me(function(){c.splice(u,1),u--},"removeFromElements"),u=0;u<c.length;u++){var d=c[u],p=d._private,g=p.data;if(d.clearTraversalCache(),e||p.removed)if(void 0===g.id)g.id=Iet();else if(at(g.id))g.id=""+g.id;else{if(att(g.id)||!YJ(g.id)){Eet("Can not create element with invalid string ID `"+g.id+"`"),h();continue}if(r.hasElementWithId(g.id)){Eet("Can not create second element with ID `"+g.id+"`"),h();continue}}var f=g.id;if(d.isNode()&&(null==(m=p.position).x&&(m.x=0),null==m.y)&&(m.y=0),d.isEdge()){for(var m=d,y=["source","target"],v=y.length,x=!1,b=0;b<v;b++){var w=y[b],k=g[w];null==(k=at(k)?g[w]=""+g[w]:k)||""===k?(Eet("Can not create edge `"+f+"` with unspecified "+w),x=!0):r.hasElementWithId(k)||(Eet("Can not create edge `"+f+"` with nonexistant "+w+" `"+k+"`"),x=!0)}if(x){h();continue}var T=r.getElementById(g.source),E=r.getElementById(g.target);(T.same(E)?T:(T._private.edges.push(m),E))._private.edges.push(m),m._private.source=T,m._private.target=E}p.map=new zet,p.map.set(f,{ele:d,index:0}),p.removed=!1,e&&r.addToPool(d)}for(var C=0;C<i.length;C++){var S=i[C],_=S._private.data,A=(at(_.parent)&&(_.parent=""+_.parent),_.parent);if(null!=A||S._private.parent)if((A=S._private.parent?r.collection().merge(S._private.parent):r.getElementById(A)).empty())_.parent=void 0;else if(A[0].removed())_et("Node added with missing parent, reference to parent removed"),_.parent=void 0,S._private.parent=null;else{for(var L=!1,N=A;!N.empty();){if(S.same(N)){L=!0,_.parent=void 0;break}N=N.parent()}L||(A[0]._private.children.push(S),S._private.parent=A[0],n.hasCompoundNodes=!0)}}if(0<c.length){for(var I=c.length===this.length?this:new ust(r,c),R=0;R<I.length;R++){var M=I[R];M.isNode()||(M.parallelEdges().clearTraversalCache(),M.source().clearTraversalCache(),M.target().clearTraversalCache())}(n.hasCompoundNodes?r.collection().merge(I).merge(I.connectedNodes()).merge(I.parent()):I).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?I.emitAndNotify("add"):e&&I.emit("add")}return this},dst.removed=function(){var t=this[0];return t&&t._private.removed},dst.inside=function(){var t=this[0];return t&&!t._private.removed},dst.remove=function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=[],i={},e=this._private.cy;function a(t){for(var e=t._private.edges,r=0;r<e.length;r++)o(e[r])}function s(t){for(var e=t._private.children,r=0;r<e.length;r++)o(e[r])}function o(t){var e=i[t.id()];r&&t.removed()||e||(i[t.id()]=!0,t.isNode()?(n.push(t),a(t),s(t)):n.unshift(t))}me(a,"addConnectedEdges"),me(s,"addChildren"),me(o,"add");for(var l=0,c=this.length;l<c;l++)o(this[l]);function h(t,e){var r=t._private.edges;Oet(r,e),t.clearTraversalCache()}function u(t){t.clearTraversalCache()}me(h,"removeEdgeRef"),me(u,"removeParallelRef");var d=[];function p(t,e){e=e[0];var r=(t=t[0])._private.children,n=t.id();Oet(r,e),e._private.parent=null,d.ids[n]||(d.ids[n]=!0,d.push(t))}d.ids={},me(p,"removeChildRef"),this.dirtyCompoundBoundsCache(),r&&e.removeFromPool(n);for(var g=0;g<n.length;g++){var f=n[g];if(f.isEdge()){var m=f.source()[0],y=f.target()[0];h(m,f),h(y,f);for(var v=f.parallelEdges(),x=0;x<v.length;x++){var b=v[x];u(b),b.isBundledBezier()&&b.dirtyBoundingBoxCache()}}else 0!==(m=f.parent()).length&&p(m,f);r&&(f._private.removed=!0)}var w=e._private.elements;e._private.hasCompoundNodes=!1;for(var k=0;k<w.length;k++)if(w[k].isParent()){e._private.hasCompoundNodes=!0;break}var T=new ust(this.cy(),n);0<T.size()&&(t?T.emitAndNotify("remove"):r&&T.emit("remove"));for(var E=0;E<d.length;E++){var C=d[E];r&&C.removed()||C.updateStyle()}return T},dst.move=function(t){var n,i,a,s,o,e=this._private.cy,l=this,r=me(function(t){return null==t?t:""+t},"toString");return void 0!==t.source||void 0!==t.target?(n=r(t.source),i=r(t.target),a=null!=n&&e.hasElementWithId(n),s=null!=i&&e.hasElementWithId(i),(a||s)&&(e.batch(function(){l.remove(!1,!1),l.emitAndNotify("moveout");for(var t=0;t<l.length;t++){var e=l[t],r=e._private.data;e.isEdge()&&(a&&(r.source=n),s)&&(r.target=i)}l.restore(!1,!1)}),l.emitAndNotify("move"))):void 0===t.parent||null!==(r=r(t.parent))&&!e.hasElementWithId(r)||(o=null===r?void 0:r,e.batch(function(){var t=l.remove(!1,!1);t.emitAndNotify("moveout");for(var e=0;e<l.length;e++){var r=l[e],n=r._private.data;r.isNode()&&(n.parent=o)}t.restore(!1,!1)}),l.emitAndNotify("move")),this},[nit,mlt,Kot,Sot,Oot,Bot,slt,jot,Wot,Yot,Hot,ost,Elt,xlt,hst,Tlt].forEach(function(t){vtt(dst,t)}),Vot={add:me(function(t){if(JJ(t)){var e=t;if(e._private.cy===this)a=e.restore();else{for(var r=[],n=0;n<e.length;n++){var i=e[n];r.push(i.json())}a=new ust(this,r)}}else if(VJ(t))var a=new ust(this,t);else if(XJ(t)&&(VJ(t.nodes)||VJ(t.edges))){for(var s=t,o=[],l=["nodes","edges"],c=0,h=l.length;c<h;c++){var u=l[c],d=s[u];if(VJ(d))for(var p=0,g=d.length;p<g;p++){var f=vtt({group:u},d[p]);o.push(f)}}a=new ust(this,o)}else a=new Uet(this,t).collection();return a},"add"),remove:me(function(t){var e;return JJ(t)||YJ(t)&&(e=t,t=this.$(e)),t.remove()},"remove")},me(kQ,"generateCubicBezier"),me(o,"springAccelerationForState"),me(l,"springEvaluateStateWithDerivative"),me(h,"springIntegrateState"),pst=me(function t(e,r,n){var i,a,s,o={x:-1,v:0,tension:null,friction:null},l=[0],c=0;for(e=parseFloat(e)||500,r=parseFloat(r)||20,n=n||null,o.tension=e,o.friction=r,a=(i=null!==n)?(c=t(e,r))/n*.016:.016;s=h(s||o,a),l.push(1+s.x),c+=16,1e-4<Math.abs(s.x)&&1e-4<Math.abs(s.v););return i?function(t){return l[t*(l.length-1)|0]}:c},"springRK4Factory"),tot=me(function(t,e,r,n){var i=kQ(t,e,r,n);return function(t,e,r){return t+(e-t)*i(r)}},"cubicBezier"),gst={linear:me(function(t,e,r){return t+(e-t)*r},"linear"),ease:tot(.25,.1,.25,1),"ease-in":tot(.42,0,1,1),"ease-out":tot(0,0,.58,1),"ease-in-out":tot(.42,0,.58,1),"ease-in-sine":tot(.47,0,.745,.715),"ease-out-sine":tot(.39,.575,.565,1),"ease-in-out-sine":tot(.445,.05,.55,.95),"ease-in-quad":tot(.55,.085,.68,.53),"ease-out-quad":tot(.25,.46,.45,.94),"ease-in-out-quad":tot(.455,.03,.515,.955),"ease-in-cubic":tot(.55,.055,.675,.19),"ease-out-cubic":tot(.215,.61,.355,1),"ease-in-out-cubic":tot(.645,.045,.355,1),"ease-in-quart":tot(.895,.03,.685,.22),"ease-out-quart":tot(.165,.84,.44,1),"ease-in-out-quart":tot(.77,0,.175,1),"ease-in-quint":tot(.755,.05,.855,.06),"ease-out-quint":tot(.23,1,.32,1),"ease-in-out-quint":tot(.86,0,.07,1),"ease-in-expo":tot(.95,.05,.795,.035),"ease-out-expo":tot(.19,1,.22,1),"ease-in-out-expo":tot(1,0,0,1),"ease-in-circ":tot(.6,.04,.98,.335),"ease-out-circ":tot(.075,.82,.165,1),"ease-in-out-circ":tot(.785,.135,.15,.86),spring:me(function(t,e,r){var n;return 0===r?gst.linear:(n=pst(t,e,r),function(t,e,r){return t+(e-t)*n(r)})},"spring"),"cubic-bezier":tot},me(TQ,"getEasedValue"),me(EQ,"getValue"),me(CQ,"ease"),me(SQ,"step$1"),me(_Q,"valid"),me(AQ,"startAnimation"),me(LQ,"stepAll"),Xot={animate:cat.animate(),animation:cat.animation(),animated:cat.animated(),clearQueue:cat.clearQueue(),delay:cat.delay(),delayAnimation:cat.delayAnimation(),stop:cat.stop(),addToAnimationPool:me(function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},"addToAnimationPool"),stopAnimationLoop:me(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:me(function(){var t,r=this;function e(){r._private.animationsRunning&&net(me(function(t){LQ(t,r),e()},"animationStep"))}r._private.animationsRunning=!0,r.styleEnabled()&&(me(e,"headlessStep"),(t=r.renderer())&&t.beforeRender?t.beforeRender(me(function(t,e){LQ(e,r)},"rendererAnimationStep"),t.beforeRenderPriorities.animations):e())},"startAnimationLoop")},fst={qualifierCompare:me(function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},"qualifierCompare"),eventMatches:me(function(t,e,r){return null==(e=e.qualifier)||t!==r.target&&ttt(r.target)&&e.matches(r.target)},"eventMatches"),addEventFields:me(function(t,e){e.cy=t,e.target=t},"addEventFields"),callbackContext:me(function(t,e,r){return null!=e.qualifier?r.target:t},"callbackContext")},mst=me(function(t){return YJ(t)?new _at(t):t},"argSelector"),olt={createEmitter:me(function(){var t=this._private;return t.emitter||(t.emitter=new uQ(fst,this)),this},"createEmitter"),emitter:me(function(){return this._private.emitter},"emitter"),on:me(function(t,e,r){return this.emitter().on(t,mst(e),r),this},"on"),removeListener:me(function(t,e,r){return this.emitter().removeListener(t,mst(e),r),this},"removeListener"),removeAllListeners:me(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:me(function(t,e,r){return this.emitter().one(t,mst(e),r),this},"one"),once:me(function(t,e,r){return this.emitter().one(t,mst(e),r),this},"once"),emit:me(function(t,e){return this.emitter().emit(t,e),this},"emit"),emitAndNotify:me(function(t,e){return this.emit(t),this.notify(t,e),this},"emitAndNotify")},cat.eventAliasesOn(olt),(glt={png:me(function(t){return this._private.renderer.png(t=t||{})},"png"),jpg:me(function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)},"jpg")}).jpeg=glt.jpg,(flt={layout:me(function(t){if(null==t)Eet("Layout options must be specified to make a layout");else if(null==t.name)Eet("A `name` must be specified to make a layout");else{var e,r=t.name,n=this.extension("layout",r);if(null!=n)return e=YJ(t.eles)?this.$(t.eles):null!=t.eles?t.eles:this.$(),new n(vtt({},t,{cy:this,eles:e}));Eet("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}},"layout")}).createLayout=flt.makeLayout=flt.layout,mlt={notify:me(function(t,e){var r,n=this._private;this.batching()?(n.batchNotifications=n.batchNotifications||{},r=n.batchNotifications[t]=n.batchNotifications[t]||this.collection(),null!=e&&r.merge(e)):n.notificationsEnabled&&(r=this.renderer(),!this.destroyed())&&r&&r.notify(t,e)},"notify"),notifications:me(function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},"notifications"),noNotifications:me(function(t){this.notifications(!1),t(),this.notifications(!0)},"noNotifications"),batching:me(function(){return 0<this._private.batchCount},"batching"),startBatch:me(function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},"startBatch"),endBatch:me(function(){var r,n=this._private;return 0!==n.batchCount&&(n.batchCount--,0===n.batchCount)&&(n.batchStyleEles.updateStyle(),r=this.renderer(),Object.keys(n.batchNotifications).forEach(function(t){var e=n.batchNotifications[t];e.empty()?r.notify(t):r.notify(t,e)})),this},"endBatch"),batch:me(function(t){return this.startBatch(),t(),this.endBatch(),this},"batch"),batchData:me(function(i){var a=this;return this.batch(function(){for(var t=Object.keys(i),e=0;e<t.length;e++){var r=t[e],n=i[r];a.getElementById(r).data(n)}})},"batchData")},yst=Det({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:12,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),(Kot={renderTo:me(function(t,e,r,n){return this._private.renderer.renderTo(t,e,r,n),this},"renderTo"),renderer:me(function(){return this._private.renderer},"renderer"),forceRender:me(function(){return this.notify("draw"),this},"forceRender"),resize:me(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},"resize"),initRenderer:me(function(t){var e=this.extension("renderer",t.name);null==e?Eet("Can not initialise: No such renderer `".concat(t.name,"` found. Did you forget to import it and `cytoscape.use()` it?")):(void 0!==t.wheelSensitivity&&_et("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."),((t=yst(t)).cy=this)._private.renderer=new e(t),this.notify("init"))},"initRenderer"),destroyRenderer:me(function(){this.notify("destroy");var t=this.container();if(t)for(t._cyreg=null;0<t.childNodes.length;)t.removeChild(t.childNodes[0]);this._private.renderer=null,this.mutableElements().forEach(function(t){(t=t._private).rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},"destroyRenderer"),onRender:me(function(t){return this.on("render",t)},"onRender"),offRender:me(function(t){return this.off("render",t)},"offRender")}).invalidateDimensions=Kot.resize,(Sot={collection:me(function(t,e){return YJ(t)?this.$(t):JJ(t)?t.collection():VJ(t)?new ust(this,t,(e=e||{}).unique,e.removed):new ust(this)},"collection"),nodes:me(function(t){var e=this.$(function(t){return t.isNode()});return t?e.filter(t):e},"nodes"),edges:me(function(t){var e=this.$(function(t){return t.isEdge()});return t?e.filter(t):e},"edges"),$:me(function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},"$"),mutableElements:me(function(){return this._private.elements},"mutableElements")}).elements=Sot.filter=Sot.$,Oot={apply:function(t){for(var e=this._private.cy.collection(),r=0;r<t.length;r++){var n,i=t[r],a=this.getContextMeta(i);a.empty||(n=this.getContextStyle(a),a=this.applyContextStyle(a,n,i),i._private.appliedInitStyle?this.updateTransitions(i,a.diffProps):i._private.appliedInitStyle=!0,this.updateStyleHints(i)&&e.push(i))}return e},getPropertiesDiff:function(t,e){var r=this._private.propDiffs=this._private.propDiffs||{},n=t+"-"+e,i=r[n];if(i)return i;for(var a=[],s={},o=0;o<this.length;o++){var l=this[o],c="t"===t[o],h="t"===e[o],u=0<l.mappedProperties.length;if((c=c!=h)||h&&u){var d=void 0;c&&u||c?d=l.properties:u&&(d=l.mappedProperties);for(var p=0;p<d.length;p++){for(var g=d[p],f=g.name,m=!1,y=o+1;y<this.length;y++){var v=this[y];if("t"===e[y]&&(m=null!=v.properties[g.name]))break}s[f]||m||(s[f]=!0,a.push(f))}}}return r[n]=a},getContextMeta:function(t){for(var e="",r=t._private.styleCxtKey||"",n=0;n<this.length;n++){var i=this[n];e+=i.selector&&i.selector.matches(t)?"t":"f"}return r=this.getPropertiesDiff(r,e),{key:t._private.styleCxtKey=e,diffPropNames:r,empty:0===r.length}},getContextStyle:function(t){var e=t.key;if((t=this._private.contextStyles=this._private.contextStyles||{})[e])return t[e];for(var r={_private:{key:e}},n=0;n<this.length;n++){var i=this[n];if("t"===e[n])for(var a=0;a<i.properties.length;a++){var s=i.properties[a];r[s.name]=s}}return t[e]=r},applyContextStyle:function(t,e,r){for(var n=t.diffPropNames,i={},a=this.types,s=0;s<n.length;s++){var o=n[s],l=e[o],c=r.pstyle(o);if(!l){if(!c)continue;l=c.bypass?{name:o,deleteBypassed:!0}:{name:o,delete:!0}}if(c!==l){if(l.mapped===a.fn&&null!=c&&null!=c.mapping&&c.mapping.value===l.value){var h=c.mapping;if((h.fnValue=l.value(r))===h.prevFnValue)continue}h=i[o]={prev:c},this.applyParsedProperty(r,l),h.next=r.pstyle(o),h.next&&h.next.bypass&&(h.next=h.next.bypassed)}}return{diffProps:i}},updateStyleHints:function(t){var r=t._private,n=this,e=(n.propertyGroupNames,n.propertyGroupKeys),i=me(function(t,e,r){return n.getPropertiesHash(t,e,r)},"propHash"),a=r.styleKey;if(t.removed())return!1;for(var s="nodes"===r.group,o=t._private.style,l=Object.keys(o),c=0;c<e.length;c++){var h=e[c];r.styleKeys[h]=[9261,5381]}for(var u=me(function(t,e){return r.styleKeys[e][0]=set(t,r.styleKeys[e][0])},"updateGrKey1"),d=me(function(t,e){return r.styleKeys[e][1]=oet(t,r.styleKeys[e][1])},"updateGrKey2"),p=me(function(t,e){u(t,e),d(t,e)},"updateGrKey"),g=me(function(t,e){for(var r=0;r<t.length;r++){var n=t.charCodeAt(r);u(n,e),d(n,e)}},"updateGrKeyWStr"),f=me(function(t){return-128<t&&t<128&&Math.floor(t)!==t?2e9-(1024*t|0):t},"cleanNum"),m=0;m<l.length;m++){var y,v,x,b,w,k=l[m],T=o[k];null!=T&&(y=(k=this.properties[k]).type,v=k.groupKey,x=void 0,null!=k.hashOverride?x=k.hashOverride(t,T):null!=T.pfValue&&(x=T.pfValue),k=null==k.enums?T.value:null,b=null!=x,w=T.units,!y.number||!b&&null==k||y.multiple?g(T.strValue,v):(p(f(b?x:k),v),b||null==w||g(w,v)))}for(var E=[9261,5381],C=0;C<e.length;C++){var S=e[C],S=r.styleKeys[S];E[0]=set(S[0],E[0]),E[1]=oet(S[1],E[1])}r.styleKey=cet(E[0],E[1]);var _=r.styleKeys,A=(r.labelDimsKey=het(_.labelDimensions),i(t,["label"],_.labelDimensions));return r.labelKey=het(A),r.labelStyleKey=het(uet(_.commonLabel,A)),s||(A=i(t,["source-label"],_.labelDimensions),r.sourceLabelKey=het(A),r.sourceLabelStyleKey=het(uet(_.commonLabel,A)),A=i(t,["target-label"],_.labelDimensions),r.targetLabelKey=het(A),r.targetLabelStyleKey=het(uet(_.commonLabel,A))),s&&(A=[(i=r.styleKeys).nodeBody,i.nodeBorder,i.nodeOutline,i.backgroundImage,i.compound,_=i.pie].filter(function(t){return null!=t}).reduce(uet,[9261,5381]),r.nodeKey=het(A),r.hasPie=null!=_&&9261!==_[0]&&5381!==_[1]),a!==r.styleKey},clearStyleHints:function(t){(t=t._private).styleCxtKey="",t.styleKeys={},t.styleKey=null,t.labelKey=null,t.labelStyleKey=null,t.sourceLabelKey=null,t.sourceLabelStyleKey=null,t.targetLabelKey=null,t.targetLabelStyleKey=null,t.nodeKey=null,t.hasPie=null},applyParsedProperty:function(r,t){var n=this,i=t,e=r._private.style,a=n.types,s=n.properties[i.name].type,o=i.bypass,l=e[i.name],c=l&&l.bypass,h=r._private,u="mapping",d=me(function(t){return null==t?null:null!=t.pfValue?t.pfValue:t.value},"getVal"),p=me(function(){var t=d(l),e=d(i);n.checkTriggers(r,i.name,t,e)},"checkTriggers");if((i="curve-style"===t.name&&r.isEdge()&&("bezier"!==t.value&&r.isLoop()||"haystack"===t.value&&(r.source().isParent()||r.target().isParent()))?t=this.parse(t.name,"bezier",o):i).delete)e[i.name]=void 0;else{if(i.deleteBypassed)return l?!!l.bypass&&(l.bypassed=void 0,p(),!0):(p(),!0);if(i.deleteBypass)return l?!!l.bypass&&(e[i.name]=l.bypassed,p(),!0):(p(),!0);var g=me(function(){_et("Do not assign mappings to elements without corresponding data (i.e. ele `"+r.id()+"` has no mapping for property `"+i.name+"` with data field `"+i.field+"`); try a `["+i.field+"]` selector to limit scope to elements with `"+i.field+"` defined")},"printMappingErr");switch(i.mapped){case a.mapData:for(var f=i.field.split("."),m=h.data,y=0;y<f.length&&m;y++)m=m[f[y]];if(null==m)return g(),!1;if(!at(m))return _et("Do not use continuous mappers without specifying numeric data (i.e. `"+i.field+": "+m+"` for `"+r.id()+"` is non-numeric)"),!1;var v=i.fieldMax-i.fieldMin;if((v=0==v?0:(m-i.fieldMin)/v)<0?v=0:1<v&&(v=1),s.color)var x=i.valueMin[0],b=i.valueMax[0],w=i.valueMin[1],k=i.valueMax[1],T=i.valueMin[2],E=i.valueMax[2],C=null==i.valueMin[3]?1:i.valueMin[3],S=null==i.valueMax[3]?1:i.valueMax[3],b=[Math.round(x+(b-x)*v),Math.round(w+(k-w)*v),Math.round(T+(E-T)*v),Math.round(C+(S-C)*v)],x={bypass:i.bypass,name:i.name,value:b,strValue:"rgb("+b[0]+", "+b[1]+", "+b[2]+")"};else{if(!s.number)return!1;k=i.valueMin+(i.valueMax-i.valueMin)*v,x=this.parse(i.name,k,i.bypass,u)}if(!x)return g(),!1;x.mapping=i,i=x;break;case a.data:for(var _=i.field.split("."),A=h.data,L=0;L<_.length&&A;L++)A=A[_[L]];if(!(x=null!=A?this.parse(i.name,A,i.bypass,u):x))return g(),!1;x.mapping=i,i=x;break;case a.fn:if(w=i.value,E=null!=i.fnValue?i.fnValue:w(r),null==(i.prevFnValue=E))return _et("Custom function mappers may not return null (i.e. `"+i.name+"` for ele `"+r.id()+"` is null)"),!1;if(!(x=this.parse(i.name,E,i.bypass,u)))return _et("Custom function mappers may not return invalid values for the property type (i.e. `"+i.name+"` for ele `"+r.id()+"` is invalid)"),!1;x.mapping=Let(i),i=x;break;case void 0:break;default:return!1}o?(i.bypassed=c?l.bypassed:l,e[i.name]=i):c?l.bypassed=i:e[i.name]=i}return p(),!0},cleanElements:function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),e)for(var i=n._private.style,a=Object.keys(i),s=0;s<a.length;s++){var o=a[s],l=i[o];null!=l&&(l.bypass?l.bypassed=null:i[o]=null)}else n._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateTransitions:function(e,t){var r=this,n=e._private,i=e.pstyle("transition-property").value,a=e.pstyle("transition-duration").pfValue,s=e.pstyle("transition-delay").pfValue;if(0<i.length&&0<a){for(var o={},l=!1,c=0;c<i.length;c++){var h,u,d=i[c],p=e.pstyle(d),g=t[d];g&&(h=g.prev,g=null!=g.next?g.next:p,p=!1,u=void 0,h)&&(at(h.pfValue)&&at(g.pfValue)?(p=g.pfValue-h.pfValue,u=h.pfValue+1e-6*p):at(h.value)&&at(g.value)?(p=g.value-h.value,u=h.value+1e-6*p):VJ(h.value)&&VJ(g.value)&&(p=h.value[0]!==g.value[0]||h.value[1]!==g.value[1]||h.value[2]!==g.value[2],u=h.strValue),p)&&(o[d]=g.strValue,this.applyBypass(e,d,u),l=!0)}l&&(n.transitioning=!0,new uit(function(t){0<s?e.delayAnimation(s).play().promise().then(t):t()}).then(function(){return e.animation({style:o,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(e,i),e.emitAndNotify("style"),n.transitioning=!1}))}else n.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),n.transitioning=!1)},checkTrigger:function(t,e,r,n,i,a){null!=(i=i(e=this.properties[e]))&&i(r,n)&&a(e)},checkZOrderTrigger:function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(t){return t.triggersZOrder},function(){i._private.cy.notify("zorder",t)})},checkBoundsTrigger:function(e,r,n,i){this.checkTrigger(e,r,n,i,function(t){return t.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!t.triggersBoundsOfParallelBeziers||"curve-style"!==r||"bezier"!==n&&"bezier"!==i||e.parallelEdges().forEach(function(t){t.dirtyBoundingBoxCache()}),!t.triggersBoundsOfConnectedEdges||"display"!==r||"none"!==n&&"none"!==i||e.connectedEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},checkTriggers:function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n)}},Bot={applyBypass:function(t,e,r,n){var i=[];if("*"===e||"**"===e){if(void 0!==r)for(var a=0;a<this.properties.length;a++){var s=this.properties[a].name;(s=this.parse(s,r,!0))&&i.push(s)}}else if(YJ(e)){var o=this.parse(e,r,!0);o&&i.push(o)}else{if(!XJ(e))return!1;var l=e;n=r;for(var c=Object.keys(l),h=0;h<c.length;h++){var u=c[h],d=l[u];void 0!==(d=void 0===d?l[dtt(u)]:d)&&(u=this.parse(u,d,!0))&&i.push(u)}}if(0===i.length)return!1;for(var p=!1,g=0;g<t.length;g++){for(var f=t[g],m={},y=void 0,v=0;v<i.length;v++){var x,b=i[v];n&&(x=f.pstyle(b.name),y=m[b.name]={prev:x}),p=this.applyParsedProperty(f,Let(b))||p,n&&(y.next=f.pstyle(b.name))}p&&this.updateStyleHints(f),n&&this.updateTransitions(f,m,!0)}return p},overrideBypass:function(t,e,r){e=utt(e);for(var n=0;n<t.length;n++){var i=t[n],a=i._private.style[e],s=(o=this.properties[e].type).color,o=o.mutiple,l=a?null!=a.pfValue?a.pfValue:a.value:null;a&&a.bypass?(a.value=r,null!=a.pfValue&&(a.pfValue=r),a.strValue=s?"rgb("+r.join(",")+")":o?r.join(" "):""+r,this.updateStyleHints(i)):this.applyBypass(i,e,r),this.checkTriggers(i,e,l,r)}},removeAllBypasses:function(t,e){return this.removeBypasses(t,this.propertyNames,e)},removeBypasses:function(t,e,r){for(var n=0;n<t.length;n++){for(var i=t[n],a={},s=0;s<e.length;s++){var o=e[s],l=this.properties[o],c=i.pstyle(l.name);c&&c.bypass&&(o=this.parse(o,"",!0),c=a[l.name]={prev:c},this.applyParsedProperty(i,o),c.next=i.pstyle(l.name))}this.updateStyleHints(i),r&&this.updateTransitions(i,a,!0)}}},slt={getEmSizeInPixels:function(){var t=this.containerCss("font-size");return null!=t?parseFloat(t):1},containerCss:function(t){var e=this._private.cy,r=e.container();if((e=e.window())&&r&&e.getComputedStyle)return e.getComputedStyle(r).getPropertyValue(t)}},(jot={getRenderedStyle:function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)},getRawStyle:function(t,e){if(t=t[0]){for(var r={},n=0;n<this.properties.length;n++){var i=this.properties[n],a=this.getStylePropertyValue(t,i.name,e);null!=a&&(r[i.name]=a,r[dtt(i.name)]=a)}return r}},getIndexedStyle:function(t,e,r,n){return t.pstyle(e)[r][n]??t.cy().style().getDefaultProperty(e)[r][0]},getStylePropertyValue:function(t,e,r){if(t=t[0]){var n=(e=(e=this.properties[e]).alias?e.pointsTo:e).type;if(e=t.pstyle(e.name)){var i,a,s,o=e.value,l=e.units,e=e.strValue;if(r&&n.number&&null!=o&&at(o))return i=t.cy().zoom(),a=me(function(t){return t*i},"getRenderedValue"),s=me(function(t,e){return a(t)+e},"getValueStringWithUnits"),((r=VJ(o))?l.every(function(t){return null!=t}):null!=l)?r?o.map(function(t,e){return s(t,l[e])}).join(" "):s(o,l):r?o.map(function(t){return YJ(t)?t:""+a(t)}).join(" "):""+a(o);if(null!=e)return e}return null}},getAnimationStartStyle:function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n].name,a=t.pstyle(i);(a=void 0!==a?XJ(a)?this.parse(i,a.strValue):this.parse(i,a):a)&&(r[i]=a)}return r},getPropsList:function(t){var e=[],r=t,n=this.properties;if(r)for(var i=Object.keys(r),a=0;a<i.length;a++){var s=r[o=i[a]],o=n[o]||n[utt(o)];(o=this.parse(o.name,s))&&e.push(o)}return e},getNonDefaultPropertiesHash:function(t,e,r){for(var n,i,a,s,o=r.slice(),l=0;l<e.length;l++)if(null!=(n=t.pstyle(e[l],!1)))if(null!=n.pfValue)o[0]=set(a,o[0]),o[1]=oet(a,o[1]);else for(i=n.strValue,s=0;s<i.length;s++)a=i.charCodeAt(s),o[0]=set(a,o[0]),o[1]=oet(a,o[1]);return o}}).getPropertiesHash=jot.getNonDefaultPropertiesHash,Wot={appendFromJson:function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r.selector,i=r.style||r.css,a=Object.keys(i);this.selector(n);for(var s=0;s<a.length;s++){var o=a[s],l=i[o];this.css(o,l)}}return this},fromJson:function(t){return this.resetToDefault(),this.appendFromJson(t),this},json:function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],n=r.selector,i=r.properties,a={},s=0;s<i.length;s++){var o=i[s];a[o.name]=o.strValue}t.push({selector:n?n.toString():"core",style:a})}return t}},Yot={appendFromString:function(t){var e=""+t;function r(){e=e.length>a.length?e.substr(a.length):""}function n(){c=c.length>u.length?c.substr(u.length):""}for(e=e.replace(/[/][*](\s|.)+?[*][/]/g,""),me(r,"removeSelAndBlockFromRemaining"),me(n,"removePropAndValFromRem");!e.match(/^\s*$/);){var i=e.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!i){_et("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+e);break}var a=i[0],s=i[1];if("core"!==s&&new _at(s).invalid)_et("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=i[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){_et("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+o),l=!0;break}var u=p[0],d=p[1],p=p[2];this.properties[d]?this.parse(d,p)?h.push({name:d,val:p}):_et("Skipping property: Invalid property definition in: "+u):_et("Skipping property: Invalid property name in: "+u),n()}if(l){r();break}this.selector(s);for(var g=0;g<h.length;g++){var f=h[g];this.css(f.name,f.val)}}r()}return this},fromString:function(t){return this.resetToDefault(),this.appendFromString(t),this}},vst={};var a=ftt,s=me(function(t){return"^"+t+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),c=me(function(t){var e=a+"|\\w+|rgb[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|hsl[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+t+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+a+")\\s*\\,\\s*("+a+")\\s*,\\s*("+e+")\\s*\\,\\s*("+e+")\\)$"},"mapData"),u=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"],s=(vst.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:s("data")},layoutData:{mapping:!0,regex:s("layoutData")},scratch:{mapping:!0,regex:s("scratch")},mapData:{mapping:!0,regex:c("mapData")},mapLayoutData:{mapping:!0,regex:c("mapLayoutData")},mapScratch:{mapping:!0,regex:c("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:u,singleRegexMatchValue:!0},urls:{regexes:u,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:me(function(t,e){switch(t.length){case 2:return"deg"!==e[0]&&"rad"!==e[0]&&"deg"!==e[1]&&"rad"!==e[1];case 1:return YJ(t[0])||"deg"===e[0]||"rad"===e[0];default:return!1}},"validate")},easing:{regexes:["^(spring)\\s*\\(\\s*("+a+")\\s*,\\s*("+a+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+a+")\\s*,\\s*("+a+")\\s*,\\s*("+a+")\\s*,\\s*("+a+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:me(function(t){return 1===(t=t.length)||2===t||4===t},"validate")}},{zeroNonZero:me(function(t,e){return(null==t||null==e)&&t!==e||0==t&&0!=e||0!=t&&0==e},"zeroNonZero"),any:me(function(t,e){return t!=e},"any"),emptyNonEmpty:me(function(t,e){return t=att(t),e=att(e),t&&!e||!t&&e},"emptyNonEmpty")}),d=vst.types,c=[{name:"label",type:d.text,triggersBounds:s.any,triggersZOrder:s.emptyNonEmpty},{name:"text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any}],u=[{name:"source-label",type:d.text,triggersBounds:s.any},{name:"source-text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"source-text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"source-text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"source-text-offset",type:d.size,triggersBounds:s.any}],p=[{name:"target-label",type:d.text,triggersBounds:s.any},{name:"target-text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"target-text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"target-text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"target-text-offset",type:d.size,triggersBounds:s.any}],g=[{name:"font-family",type:d.fontFamily,triggersBounds:s.any},{name:"font-style",type:d.fontStyle,triggersBounds:s.any},{name:"font-weight",type:d.fontWeight,triggersBounds:s.any},{name:"font-size",type:d.size,triggersBounds:s.any},{name:"text-transform",type:d.textTransform,triggersBounds:s.any},{name:"text-wrap",type:d.textWrap,triggersBounds:s.any},{name:"text-overflow-wrap",type:d.textOverflowWrap,triggersBounds:s.any},{name:"text-max-width",type:d.size,triggersBounds:s.any},{name:"text-outline-width",type:d.size,triggersBounds:s.any},{name:"line-height",type:d.positiveNumber,triggersBounds:s.any}],f=[{name:"text-valign",type:d.valign,triggersBounds:s.any},{name:"text-halign",type:d.halign,triggersBounds:s.any},{name:"color",type:d.color},{name:"text-outline-color",type:d.color},{name:"text-outline-opacity",type:d.zeroOneNumber},{name:"text-background-color",type:d.color},{name:"text-background-opacity",type:d.zeroOneNumber},{name:"text-background-padding",type:d.size,triggersBounds:s.any},{name:"text-border-opacity",type:d.zeroOneNumber},{name:"text-border-color",type:d.color},{name:"text-border-width",type:d.size,triggersBounds:s.any},{name:"text-border-style",type:d.borderStyle,triggersBounds:s.any},{name:"text-background-shape",type:d.textBackgroundShape,triggersBounds:s.any},{name:"text-justification",type:d.justification}],m=[{name:"events",type:d.bool,triggersZOrder:s.any},{name:"text-events",type:d.bool,triggersZOrder:s.any}],y=[{name:"display",type:d.display,triggersZOrder:s.any,triggersBounds:s.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:d.visibility,triggersZOrder:s.any},{name:"opacity",type:d.zeroOneNumber,triggersZOrder:s.zeroNonZero},{name:"text-opacity",type:d.zeroOneNumber},{name:"min-zoomed-font-size",type:d.size},{name:"z-compound-depth",type:d.zCompoundDepth,triggersZOrder:s.any},{name:"z-index-compare",type:d.zIndexCompare,triggersZOrder:s.any},{name:"z-index",type:d.number,triggersZOrder:s.any}],v=[{name:"overlay-padding",type:d.size,triggersBounds:s.any},{name:"overlay-color",type:d.color},{name:"overlay-opacity",type:d.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"overlay-shape",type:d.overlayShape,triggersBounds:s.any},{name:"overlay-corner-radius",type:d.cornerRadius}],x=[{name:"underlay-padding",type:d.size,triggersBounds:s.any},{name:"underlay-color",type:d.color},{name:"underlay-opacity",type:d.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"underlay-shape",type:d.overlayShape,triggersBounds:s.any},{name:"underlay-corner-radius",type:d.cornerRadius}],P=[{name:"transition-property",type:d.propList},{name:"transition-duration",type:d.time},{name:"transition-delay",type:d.time},{name:"transition-timing-function",type:d.easing}],b=me(function(t,e){return"label"===e.value?-t.poolIndex():e.pfValue},"nodeSizeHashOverride"),b=[{name:"height",type:d.nodeSize,triggersBounds:s.any,hashOverride:b},{name:"width",type:d.nodeSize,triggersBounds:s.any,hashOverride:b},{name:"shape",type:d.nodeShape,triggersBounds:s.any},{name:"shape-polygon-points",type:d.polygonPointList,triggersBounds:s.any},{name:"corner-radius",type:d.cornerRadius},{name:"background-color",type:d.color},{name:"background-fill",type:d.fill},{name:"background-opacity",type:d.zeroOneNumber},{name:"background-blacken",type:d.nOneOneNumber},{name:"background-gradient-stop-colors",type:d.colors},{name:"background-gradient-stop-positions",type:d.percentages},{name:"background-gradient-direction",type:d.gradientDirection},{name:"padding",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"padding-relative-to",type:d.paddingRelativeTo,triggersBounds:s.any},{name:"bounds-expansion",type:d.boundsExpansion,triggersBounds:s.any}],B=[{name:"border-color",type:d.color},{name:"border-opacity",type:d.zeroOneNumber},{name:"border-width",type:d.size,triggersBounds:s.any},{name:"border-style",type:d.borderStyle},{name:"border-cap",type:d.lineCap},{name:"border-join",type:d.lineJoin},{name:"border-dash-pattern",type:d.numbers},{name:"border-dash-offset",type:d.number},{name:"border-position",type:d.linePosition}],$=[{name:"outline-color",type:d.color},{name:"outline-opacity",type:d.zeroOneNumber},{name:"outline-width",type:d.size,triggersBounds:s.any},{name:"outline-style",type:d.borderStyle},{name:"outline-offset",type:d.size,triggersBounds:s.any}],F=[{name:"background-image",type:d.urls},{name:"background-image-crossorigin",type:d.bgCrossOrigin},{name:"background-image-opacity",type:d.zeroOneNumbers},{name:"background-image-containment",type:d.bgContainment},{name:"background-image-smoothing",type:d.bools},{name:"background-position-x",type:d.bgPos},{name:"background-position-y",type:d.bgPos},{name:"background-width-relative-to",type:d.bgRelativeTo},{name:"background-height-relative-to",type:d.bgRelativeTo},{name:"background-repeat",type:d.bgRepeat},{name:"background-fit",type:d.bgFit},{name:"background-clip",type:d.bgClip},{name:"background-width",type:d.bgWH},{name:"background-height",type:d.bgWH},{name:"background-offset-x",type:d.bgPos},{name:"background-offset-y",type:d.bgPos}],z=[{name:"position",type:d.position,triggersBounds:s.any},{name:"compound-sizing-wrt-labels",type:d.compoundIncludeLabels,triggersBounds:s.any},{name:"min-width",type:d.size,triggersBounds:s.any},{name:"min-width-bias-left",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-width-bias-right",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-height",type:d.size,triggersBounds:s.any},{name:"min-height-bias-top",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-height-bias-bottom",type:d.sizeMaybePercent,triggersBounds:s.any}],G=[{name:"line-style",type:d.lineStyle},{name:"line-color",type:d.color},{name:"line-fill",type:d.fill},{name:"line-cap",type:d.lineCap},{name:"line-opacity",type:d.zeroOneNumber},{name:"line-dash-pattern",type:d.numbers},{name:"line-dash-offset",type:d.number},{name:"line-outline-width",type:d.size},{name:"line-outline-color",type:d.color},{name:"line-gradient-stop-colors",type:d.colors},{name:"line-gradient-stop-positions",type:d.percentages},{name:"curve-style",type:d.curveStyle,triggersBounds:s.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:d.zeroOneNumber,triggersBounds:s.any},{name:"source-endpoint",type:d.edgeEndpoint,triggersBounds:s.any},{name:"target-endpoint",type:d.edgeEndpoint,triggersBounds:s.any},{name:"control-point-step-size",type:d.size,triggersBounds:s.any},{name:"control-point-distances",type:d.bidirectionalSizes,triggersBounds:s.any},{name:"control-point-weights",type:d.numbers,triggersBounds:s.any},{name:"segment-distances",type:d.bidirectionalSizes,triggersBounds:s.any},{name:"segment-weights",type:d.numbers,triggersBounds:s.any},{name:"segment-radii",type:d.numbers,triggersBounds:s.any},{name:"radius-type",type:d.radiusType,triggersBounds:s.any},{name:"taxi-turn",type:d.bidirectionalSizeMaybePercent,triggersBounds:s.any},{name:"taxi-turn-min-distance",type:d.size,triggersBounds:s.any},{name:"taxi-direction",type:d.axisDirection,triggersBounds:s.any},{name:"taxi-radius",type:d.number,triggersBounds:s.any},{name:"edge-distances",type:d.edgeDistances,triggersBounds:s.any},{name:"arrow-scale",type:d.positiveNumber,triggersBounds:s.any},{name:"loop-direction",type:d.angle,triggersBounds:s.any},{name:"loop-sweep",type:d.angle,triggersBounds:s.any},{name:"source-distance-from-node",type:d.size,triggersBounds:s.any},{name:"target-distance-from-node",type:d.size,triggersBounds:s.any}],U=[{name:"ghost",type:d.bool,triggersBounds:s.any},{name:"ghost-offset-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"ghost-offset-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"ghost-opacity",type:d.zeroOneNumber}],q=[{name:"selection-box-color",type:d.color},{name:"selection-box-opacity",type:d.zeroOneNumber},{name:"selection-box-border-color",type:d.color},{name:"selection-box-border-width",type:d.size},{name:"active-bg-color",type:d.color},{name:"active-bg-opacity",type:d.zeroOneNumber},{name:"active-bg-size",type:d.size},{name:"outside-texture-bg-color",type:d.color},{name:"outside-texture-bg-opacity",type:d.zeroOneNumber}],w=[];vst.pieBackgroundN=16,w.push({name:"pie-size",type:d.sizeMaybePercent});for(var k=1;k<=vst.pieBackgroundN;k++)w.push({name:"pie-"+k+"-background-color",type:d.color}),w.push({name:"pie-"+k+"-background-size",type:d.percent}),w.push({name:"pie-"+k+"-background-opacity",type:d.zeroOneNumber});var T=[],j=vst.arrowPrefixes=["source","mid-source","target","mid-target"],E=([{name:"arrow-shape",type:d.arrowShape,triggersBounds:s.any},{name:"arrow-color",type:d.color},{name:"arrow-fill",type:d.arrowFill},{name:"arrow-width",type:d.arrowWidth}].forEach(function(e){j.forEach(function(t){t=t+"-"+e.name,T.push({name:t,type:e.type,triggersBounds:e.triggersBounds})})},{}),vst.properties=[].concat(m,P,y,v,x,U,f,g,c,u,p,b,B,$,F,w,z,G,T,q)),C=vst.propertyGroups={behavior:m,transition:P,visibility:y,overlay:v,underlay:x,ghost:U,commonLabel:f,labelDimensions:g,mainLabel:c,sourceLabel:u,targetLabel:p,nodeBody:b,nodeBorder:B,nodeOutline:$,backgroundImage:F,pie:w,compound:z,edgeLine:G,edgeArrow:T,core:q},W=vst.propertyGroupNames={},Y=((vst.propertyGroupKeys=Object.keys(C)).forEach(function(e){W[e]=C[e].map(function(t){return t.name}),C[e].forEach(function(t){return t.groupKey=e})}),vst.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}]);vst.propertyNames=E.map(function(t){return t.name});for(var S=0;S<E.length;S++){var H=E[S];E[H.name]=H}for(var _=0;_<Y.length;_++){var A=Y[_],L=E[A.pointsTo];E.push(L={name:A.name,alias:!0,pointsTo:L}),E[A.name]=L}function N(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:wet;FK(this,N),this.idsByKey=new zet,this.keyForId=new zet,this.cachesByLvl=new zet,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=e}function I(t,e){FK(this,I),this.r=t,this.opts=e,this.keyToIds=new Map,this.idToKey=new Map,this.atlases=[],this.styleKeyToAtlas=new Map,this.styleKeyNeedsRedraw=new Set,this.forceGC=!1}function R(t,e){FK(this,R),this.debugID=Math.floor(1e4*Math.random()),this.r=t,this.atlasSize=e.webglTexSize,this.rows=e.webglTexRows,this.enableWrapping=e.enableWrapping,this.texHeight=Math.floor(this.atlasSize/this.rows),this.maxTexWidth=this.atlasSize,this.texture=null,this.canvas=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=e.createTextureCanvas(t,this.atlasSize,this.atlasSize),this.scratch=e.createTextureCanvas(t,this.atlasSize,this.texHeight,"scratch")}function M(t,e,r){FK(this,M),this.r=t,this.gl=e,this.maxInstances=r.webglBatchSize,this.maxAtlases=r.webglTexPerBatch,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,r.enableWrapping=!0,r.createTextureCanvas=ZQ,this.atlasManager=new nlt(t,r),this.program=this.createShaderProgram(Jot.SCREEN),this.pickingProgram=this.createShaderProgram(Jot.PICKING),this.vao=this.createVAO(),this.debugInfo=[]}function D(t,e){FK(this,D),this.r=t,this.globalOptions=t=e,this.maxAtlases=t.webglTexPerBatch,this.atlasSize=t.webglTexSize,this.renderTypes=new Map,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[],this._cacheScratchCanvas(t)}function O(t){FK(this,O),this.r=t}for(vst.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},vst.getDefaultProperties=function(){var t=this._private;if(null==t.defaultProperties){for(var e=vtt({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(t,e){for(var r=1;r<=vst.pieBackgroundN;r++){var n=e.name.replace("{{i}}",r),i=e.value;t[n]=i}return t},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(e,r){return vst.arrowPrefixes.forEach(function(t){t=t+"-"+r.name,e[t]=r.value}),e},{})),r={},n=0;n<this.properties.length;n++){var i,a=this.properties[n];a.pointsTo||(i=e[a=a.name],i=this.parse(a,i),r[a]=i)}t.defaultProperties=r}return t.defaultProperties},vst.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length},Hot={parse:function(t,e,r,n){var i,a,s;return HJ(e)?this.parseImplWarn(t,e,r,n):(i=get(t,""+e,r?"t":"f","mapping"===n||!0===n||!1===n||null==n?"dontcare":n),s=(s=(a=this.propCache=this.propCache||[])[i])||(a[i]=this.parseImplWarn(t,e,r,n)),(r||"mapping"===n)&&(s=Let(s))&&(s.value=Let(s.value)),s)},parseImplWarn:function(t,e,r,n){return(r=this.parseImpl(t,e,r,n))||null==e||_et("The style property `".concat(t,": ").concat(e,"` is invalid")),!r||"width"!==r.name&&"height"!==r.name||"label"!==e||_et("The style value of `label` is deprecated for `"+r.name+"`"),r},parseImpl:function(e,r,n,t){e=utt(e);var i=this.properties[e],a=r,s=this.types;if(!i||void 0===r)return null;i.alias&&(i=i.pointsTo,e=i.name);var o=YJ(r),l=(o&&(r=r.trim()),i.type);if(!l)return null;if(n&&(""===r||null===r))return{name:e,value:r,bypass:!0,deleteBypass:!0};if(HJ(r))return{name:e,value:r,strValue:"fn",mapped:s.fn,bypass:n};if(!(!o||t||r.length<7||"a"!==r[1])){if(7<=r.length&&"d"===r[0]&&(i=new RegExp(s.data.regex).exec(r)))return!n&&(b=s.data,{name:e,value:i,strValue:""+r,mapped:b,field:i[1],bypass:n});if(10<=r.length&&"m"===r[0]&&(b=new RegExp(s.mapData.regex).exec(r))){if(n||l.multiple)return!1;if(i=s.mapData,!l.color&&!l.number)return!1;if(!(s=this.parse(e,b[4]))||s.mapped)return!1;if(!(w=this.parse(e,b[5]))||w.mapped)return!1;if(s.pfValue===w.pfValue||s.strValue===w.strValue)return _et("`"+e+": "+r+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+s.strValue+"`"),this.parse(e,s.strValue);if(l.color){var c=s.value,h=w.value;if(!(c[0]!==h[0]||c[1]!==h[1]||c[2]!==h[2]||c[3]!==h[3]&&(null!=c[3]&&1!==c[3]||null!=h[3]&&1!==h[3])))return!1}return{name:e,value:b,strValue:""+r,mapped:i,field:b[1],fieldMin:parseFloat(b[2]),fieldMax:parseFloat(b[3]),valueMin:s.value,valueMax:w.value,bypass:n}}}if(l.multiple&&"multiple"!==t){var u=o?r.split(/\s+/):VJ(r)?r:[r];if(l.evenMultiple&&u.length%2!=0)return null;for(var d=[],p=[],g=[],f="",m=!1,y=0;y<u.length;y++){var v=this.parse(e,u[y],n,"multiple"),m=m||YJ(v.value);d.push(v.value),g.push(null!=v.pfValue?v.pfValue:v.value),p.push(v.units),f+=(0<y?" ":"")+v.strValue}return l.validate&&!l.validate(d,p)?null:l.singleEnum&&m?1===d.length&&YJ(d[0])?{name:e,value:d[0],strValue:d[0],bypass:n}:null:{name:e,value:d,pfValue:g,strValue:f,bypass:n,units:p}}var x,b,c=me(function(){for(var t=0;t<l.enums.length;t++)if(l.enums[t]===r)return{name:e,value:r,strValue:""+r,bypass:n};return null},"checkEnums");if(l.number)return h="px",l.units&&(x=l.units),l.implicitUnits&&(h=l.implicitUnits),l.unitless||(o?(i="px|em"+(l.allowPercent?"|\\%":""),x&&(i=x),(b=r.match("^("+ftt+")("+i+")?$"))&&(r=b[1],x=b[2]||h)):x&&!l.implicitUnits||(x=h)),r=parseFloat(r),isNaN(r)&&void 0===l.enums?null:isNaN(r)&&void 0!==l.enums?(r=a,c()):l.integer&&!ZJ(r)||void 0!==l.min&&(r<l.min||l.strictMin&&r===l.min)||void 0!==l.max&&(r>l.max||l.strictMax&&r===l.max)?null:(s={name:e,value:r,strValue:""+r+(x||""),units:x,bypass:n},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:art(r)),"%"===x&&(s.pfValue=r/100),s);if(l.propList){var w,k=[];if("none"!=(w=""+r)){for(var T=w.split(/\s*,\s*|\s+/),E=0;E<T.length;E++){var C=T[E].trim();this.properties[C]?k.push(C):_et("`"+C+"` is not a valid property name")}if(0===k.length)return null}return{name:e,value:k,strValue:0===k.length?"none":k.join(" "),bypass:n}}if(l.color)return(t=Ttt(r))?{name:e,value:t,pfValue:t,strValue:"rgb("+t[0]+","+t[1]+","+t[2]+")",bypass:n}:null;if(l.regex||l.regexes){if(l.enums&&(o=c()))return o;for(var S=l.regexes||[l.regex],_=0;_<S.length;_++){var A=new RegExp(S[_]).exec(r);if(A)return{name:e,value:l.singleRegexMatchValue?A[1]:A,strValue:""+r,bypass:n}}return null}return l.string?{name:e,value:""+r,strValue:""+r,bypass:n}:l.enums?c():null}},xst=me(function t(e){if(!(this instanceof t))return new t(e);rtt(e)?(this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()):Eet("A style must have a core reference")},"Style"),(bst=xst.prototype).instanceString=function(){return"style"},bst.clear=function(){for(var t=this._private,e=t.cy.elements(),r=0;r<this.length;r++)this[r]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(e,!0),e.forEach(function(t){(t=t[0]._private).styleDirty=!0,t.appliedInitStyle=!1}),this},bst.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},bst.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},bst.selector=function(t){var t="core"===t?null:new _at(t),e=this.length++;return this[e]={selector:t,properties:[],mappedProperties:[],index:e},this},bst.css=function(){var t=arguments;if(1===t.length)for(var e=t[0],r=0;r<this.properties.length;r++){var n=this.properties[r],i=e[n.name];void 0!==(i=void 0===i?e[dtt(n.name)]:i)&&this.cssRule(n.name,i)}else 2===t.length&&this.cssRule(t[0],t[1]);return this},bst.style=bst.css,bst.cssRule=function(t,e){return(t=this.parse(t,e))&&(this[e=this.length-1].properties.push(t),(this[e].properties[t.name]=t).name.match(/pie-(\d+)-background-size/)&&t.value&&(this._private.hasPie=!0),t.mapped&&this[e].mappedProperties.push(t),!this[e].selector)&&(this._private.coreStyle[t.name]=t),this},bst.append=function(t){return ntt(t)?t.appendToStyle(this):VJ(t)?this.appendFromJson(t):YJ(t)&&this.appendFromString(t),this},xst.fromJson=function(t,e){return(t=new xst(t)).fromJson(e),t},xst.fromString=function(t,e){return new xst(t).fromString(e)},[Oot,Bot,slt,jot,Wot,Yot,vst,Hot].forEach(function(t){vtt(bst,t)}),xst.types=bst.types,xst.properties=bst.properties,xst.propertyGroups=bst.propertyGroups,xst.propertyGroupNames=bst.propertyGroupNames,xst.propertyGroupKeys=bst.propertyGroupKeys,Elt={style:me(function(t){return t&&this.setStyle(t).update(),this._private.style},"style"),setStyle:me(function(t){var e=this._private;return ntt(t)?e.style=t.generateStyle(this):VJ(t)?e.style=xst.fromJson(this,t):YJ(t)?e.style=xst.fromString(this,t):e.style=xst(this),e.style},"setStyle"),updateStyle:me(function(){this.mutableElements().updateStyle()},"updateStyle")},(xlt={autolock:me(function(t){return void 0===t?this._private.autolock:(this._private.autolock=!!t,this)},"autolock"),autoungrabify:me(function(t){return void 0===t?this._private.autoungrabify:(this._private.autoungrabify=!!t,this)},"autoungrabify"),autounselectify:me(function(t){return void 0===t?this._private.autounselectify:(this._private.autounselectify=!!t,this)},"autounselectify"),selectionType:me(function(t){var e=this._private;return null==e.selectionType&&(e.selectionType="single"),void 0===t?e.selectionType:("additive"!==t&&"single"!==t||(e.selectionType=t),this)},"selectionType"),panningEnabled:me(function(t){return void 0===t?this._private.panningEnabled:(this._private.panningEnabled=!!t,this)},"panningEnabled"),userPanningEnabled:me(function(t){return void 0===t?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!t,this)},"userPanningEnabled"),zoomingEnabled:me(function(t){return void 0===t?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!t,this)},"zoomingEnabled"),userZoomingEnabled:me(function(t){return void 0===t?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!t,this)},"userZoomingEnabled"),boxSelectionEnabled:me(function(t){return void 0===t?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!t,this)},"boxSelectionEnabled"),pan:me(function(){var t,e,r,n=arguments,i=this._private.pan;switch(n.length){case 0:return i;case 1:if(YJ(n[0]))return i[t=n[0]];if(XJ(n[0])){if(!this._private.panningEnabled)return this;e=(r=n[0]).x,r=r.y,at(e)&&(i.x=e),at(r)&&(i.y=r),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=n[1],"x"!==(t=n[0])&&"y"!==t||!at(e)||(i[t]=e),this.emit("pan viewport")}return this.notify("viewport"),this},"pan"),panBy:me(function(t,e){var r,n,i=arguments,a=this._private.pan;if(this._private.panningEnabled){switch(i.length){case 1:XJ(t)&&(r=(n=i[0]).x,n=n.y,at(r)&&(a.x+=r),at(n)&&(a.y+=n),this.emit("pan viewport"));break;case 2:r=e,"x"!==(n=t)&&"y"!==n||!at(r)||(a[n]+=r),this.emit("pan viewport")}this.notify("viewport")}return this},"panBy"),gc:me(function(){this.notify("gc")},"gc"),fit:me(function(t,e){return(t=this.getFitViewport(t,e))&&((e=this._private).zoom=t.zoom,e.pan=t.pan,this.emit("pan zoom viewport"),this.notify("viewport")),this},"fit"),getFitViewport:me(function(t,e){if(at(t)&&void 0===e&&(e=t,t=void 0),this._private.panningEnabled&&this._private.zoomingEnabled&&(YJ(t)?(n=t,t=this.$(n)):ott(t)?((r={x1:(n=t).x1,y1:n.y1,x2:n.x2,y2:n.y2}).w=r.x2-r.x1,r.h=r.y2-r.y1):JJ(t)||(t=this.mutableElements()),!JJ(t)||!t.empty())){var r=r||t.boundingBox(),n=this.width(),t=this.height();if(e=at(e)?e:0,!isNaN(n)&&!isNaN(t)&&0<n&&0<t&&!isNaN(r.w)&&!isNaN(r.h)&&0<r.w&&0<r.h)return{zoom:e=(e=(e=Math.min((n-2*e)/r.w,(t-2*e)/r.h))>this._private.maxZoom?this._private.maxZoom:e)<this._private.minZoom?this._private.minZoom:e,pan:{x:(n-e*(r.x1+r.x2))/2,y:(t-e*(r.y1+r.y2))/2}}}},"getFitViewport"),zoomRange:me(function(t,e){var r,n=this._private;return null==e&&(t=(r=t).min,e=r.max),at(t)&&at(e)&&t<=e?(n.minZoom=t,n.maxZoom=e):at(t)&&void 0===e&&t<=n.maxZoom?n.minZoom=t:at(e)&&void 0===t&&e>=n.minZoom&&(n.maxZoom=e),this},"zoomRange"),minZoom:me(function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},"minZoom"),maxZoom:me(function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},"maxZoom"),getZoomedViewport:me(function(t){var e,r,n=this._private,i=n.pan,a=n.zoom,s=!n.zoomingEnabled;return at(t)?r=t:XJ(t)&&(r=t.level,null!=t.position?e=Qet(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null!=e)&&!n.panningEnabled&&(s=!0),r=(r=r>n.maxZoom?n.maxZoom:r)<n.minZoom?n.minZoom:r,!s&&at(r)&&r!==a&&(null==e||at(e.x)&&at(e.y))?null!=e?{zoomed:!0,panned:!0,zoom:t=r,pan:{x:-t/a*(e.x-i.x)+e.x,y:-t/a*(e.y-i.y)+e.y}}:{zoomed:!0,panned:!1,zoom:r,pan:i}:null},"getZoomedViewport"),zoom:me(function(t){var e;return void 0===t?this._private.zoom:(t=this.getZoomedViewport(t),e=this._private,null!=t&&t.zoomed&&(e.zoom=t.zoom,t.panned&&(e.pan.x=t.pan.x,e.pan.y=t.pan.y),this.emit("zoom"+(t.panned?" pan":"")+" viewport"),this.notify("viewport")),this)},"zoom"),viewport:me(function(t){var e=this._private,r=!0,n=!0,i=[],a=!1,s=!1;return t&&(at(t.zoom)||(r=!1),XJ(t.pan)||(n=!1),r||n)&&(r&&((r=t.zoom)<e.minZoom||r>e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=r,i.push("zoom"))),!n||a&&t.cancelOnFailedZoom||!e.panningEnabled||(r=t.pan,at(r.x)&&(e.pan.x=r.x,s=!1),at(r.y)&&(e.pan.y=r.y,s=!1),s)||i.push("pan"),0<i.length)&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},"viewport"),center:me(function(t){return(t=this.getCenterPan(t))&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:me(function(t,e){var r,n;if(this._private.panningEnabled&&(YJ(t)?(r=t,t=this.mutableElements().filter(r)):JJ(t)||(t=this.mutableElements()),0!==t.length))return r=t.boundingBox(),t=this.width(),n=this.height(),{x:(t-(e=void 0===e?this._private.zoom:e)*(r.x1+r.x2))/2,y:(n-e*(r.y1+r.y2))/2}},"getCenterPan"),reset:me(function(){return this._private.panningEnabled&&this._private.zoomingEnabled&&this.viewport({pan:{x:0,y:0},zoom:1}),this},"reset"),invalidateSize:me(function(){this._private.sizeCache=null},"invalidateSize"),size:me(function(){var e,t=this._private,r=t.container;return t.sizeCache=t.sizeCache||(r?(e=this.window().getComputedStyle(r),t=me(function(t){return parseFloat(e.getPropertyValue(t))},"val"),{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},"size"),width:me(function(){return this.size().width},"width"),height:me(function(){return this.size().height},"height"),extent:me(function(){var t=this._private.pan,e=this._private.zoom,r=this.renderedExtent();return(r={x1:(r.x1-t.x)/e,x2:(r.x2-t.x)/e,y1:(r.y1-t.y)/e,y2:(r.y2-t.y)/e}).w=r.x2-r.x1,r.h=r.y2-r.y1,r},"extent"),renderedExtent:me(function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}},"renderedExtent"),multiClickDebounceTime:me(function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime},"multiClickDebounceTime")}).centre=xlt.center,xlt.autolockNodes=xlt.autolock,xlt.autoungrabifyNodes=xlt.autoungrabify,(Tlt={data:cat.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:cat.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:cat.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:cat.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})}).attr=Tlt.data,Tlt.removeAttr=Tlt.removeData,wst=me(function(t){var i=this,r=(o=(o=(t=vtt({},t)).container)&&!QJ(o)&&QJ(o[0])?o[0]:o)?o._cyreg:null,n=((r=r||{})&&r.cy&&(r.cy.destroy(),r={}),r.readies=r.readies||[]),e=(o&&(o._cyreg=r),r.cy=i,void 0!==FJ&&void 0!==o&&!t.headless),a=t,t=(a.layout=vtt({name:e?"grid":"null"},a.layout),a.renderer=vtt({name:e?"canvas":"null"},a.renderer),me(function(t,e,r){return void 0!==e?e:void 0!==r?r:t},"defVal")),s=this._private={container:o,ready:!1,options:a,elements:new ust(this),listeners:[],aniEles:new ust(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:t(!0,a.zoomingEnabled),userZoomingEnabled:t(!0,a.userZoomingEnabled),panningEnabled:t(!0,a.panningEnabled),userPanningEnabled:t(!0,a.userPanningEnabled),boxSelectionEnabled:t(!0,a.boxSelectionEnabled),autolock:t(!1,a.autolock,a.autolockNodes),autoungrabify:t(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:t(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?e:a.styleEnabled,zoom:at(a.zoom)?a.zoom:1,pan:{x:XJ(a.pan)&&at(a.pan.x)?a.pan.x:0,y:XJ(a.pan)&&at(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:t(250,a.multiClickDebounceTime)},o=(this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),me(function(t,e){if(t.some(ltt))return uit.all(t).then(e);e(t)},"loadExtData")),e=(s.styleEnabled&&i.setStyle([]),vtt({},a,a.renderer)),l=(i.initRenderer(e),me(function(t,e,r){i.notifications(!1);var n=i.mutableElements();0<n.length&&n.remove(),null!=t&&(XJ(t)||VJ(t))&&i.add(t),i.one("layoutready",function(t){i.notifications(!0),i.emit(t),i.one("load",e),i.emitAndNotify("load")}).one("layoutstop",function(){i.one("done",r),i.emit("done")}),(n=vtt({},i._private.options.layout)).eles=i.elements(),i.layout(n).run()},"setElesAndLayout"));o([a.style,a.elements],function(t){var e=t[0],t=t[1];s.styleEnabled&&i.style().append(e),l(t,function(){i.startAnimationLoop(),s.ready=!0,HJ(a.ready)&&i.on("ready",a.ready);for(var t=0;t<n.length;t++){var e=n[t];i.on("ready",e)}r&&(r.readies=[]),i.emit("ready")},a.done)})},"Core"),kst=wst.prototype,vtt(kst,{instanceString:me(function(){return"core"},"instanceString"),isReady:me(function(){return this._private.ready},"isReady"),destroyed:me(function(){return this._private.destroyed},"destroyed"),ready:me(function(t){return this.isReady()?this.emitter().emit("ready",[],t):this.on("ready",t),this},"ready"),destroy:me(function(){if(!this.destroyed())return this.stopAnimationLoop(),this.destroyRenderer(),this.emit("destroy"),this._private.destroyed=!0,this},"destroy"),hasElementWithId:me(function(t){return this._private.elements.hasElementWithId(t)},"hasElementWithId"),getElementById:me(function(t){return this._private.elements.getElementById(t)},"getElementById"),hasCompoundNodes:me(function(){return this._private.hasCompoundNodes},"hasCompoundNodes"),headless:me(function(){return this._private.renderer.isHeadless()},"headless"),styleEnabled:me(function(){return this._private.styleEnabled},"styleEnabled"),addToPool:me(function(t){return this._private.elements.merge(t),this},"addToPool"),removeFromPool:me(function(t){return this._private.elements.unmerge(t),this},"removeFromPool"),container:me(function(){return this._private.container||null},"container"),window:me(function(){var t;return null!=this._private.container&&void 0!==(t=this._private.container.ownerDocument)&&null!=t&&t.defaultView||FJ},"window"),mount:me(function(t){var e,r;if(null!=t)return r=(e=this._private).options,!QJ(t)&&QJ(t[0])&&(t=t[0]),this.stopAnimationLoop(),this.destroyRenderer(),e.container=t,e.styleEnabled=!0,this.invalidateSize(),this.initRenderer(vtt({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),this.startAnimationLoop(),this.style(r.style),this.emit("mount"),this},"mount"),unmount:me(function(){return this.stopAnimationLoop(),this.destroyRenderer(),this.initRenderer({name:"null"}),this.emit("unmount"),this},"unmount"),options:me(function(){return Let(this._private.options)},"options"),json:me(function(t){var r,h=this,e=h._private,n=h.mutableElements(),i=me(function(t){return h.getElementById(t.id())},"getFreshRef");if(XJ(t)){if(h.startBatch(),t.elements){var u={},a=me(function(t,e){for(var r=[],n=[],i=0;i<t.length;i++){var a,s,o=t[i];o.data.id?(a=""+o.data.id,s=h.getElementById(a),u[a]=!0,0!==s.length?n.push({ele:s,json:o}):(e&&(o.group=e),r.push(o))):_et("cy.json() cannot handle elements without an ID attribute")}h.add(r);for(var l=0;l<n.length;l++){var c=n[l];c.ele.json(c.json)}},"updateEles");if(VJ(t.elements))a(t.elements);else for(var s=["nodes","edges"],o=0;o<s.length;o++){var l=s[o],c=t.elements[l];VJ(c)&&a(c,l)}var d=h.collection();n.filter(function(t){return!u[t.id()]}).forEach(function(t){t.isParent()?d.merge(t):t.remove()}),d.forEach(function(t){return t.children().move({parent:null})}),d.forEach(function(t){return i(t).remove()})}t.style&&h.style(t.style),null!=t.zoom&&t.zoom!==e.zoom&&h.zoom(t.zoom),!t.pan||t.pan.x===e.pan.x&&t.pan.y===e.pan.y||h.pan(t.pan),t.data&&h.data(t.data);for(var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],g=0;g<p.length;g++){var f=p[g];null!=t[f]&&h[f](t[f])}return h.endBatch(),this}return r={},t?r.elements=this.elements().map(function(t){return t.json()}):(r.elements={},n.forEach(function(t){var e=t.group();r.elements[e]||(r.elements[e]=[]),r.elements[e].push(t.json())})),this._private.styleEnabled&&(r.style=h.style().json()),r.data=Let(h.data()),n=e.options,r.zoomingEnabled=e.zoomingEnabled,r.userZoomingEnabled=e.userZoomingEnabled,r.zoom=e.zoom,r.minZoom=e.minZoom,r.maxZoom=e.maxZoom,r.panningEnabled=e.panningEnabled,r.userPanningEnabled=e.userPanningEnabled,r.pan=Let(e.pan),r.boxSelectionEnabled=e.boxSelectionEnabled,r.renderer=Let(n.renderer),r.hideEdgesOnViewport=n.hideEdgesOnViewport,r.textureOnViewport=n.textureOnViewport,r.wheelSensitivity=n.wheelSensitivity,r.motionBlur=n.motionBlur,r.multiClickDebounceTime=n.multiClickDebounceTime,r},"json")}),kst.$id=kst.getElementById,[Vot,Xot,olt,glt,flt,mlt,Kot,Sot,Elt,xlt,Tlt].forEach(function(t){vtt(kst,t)}),Tst={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},Est={maximal:!1,acyclic:!1},Cst=me(function(t){return t.scratch("breadthfirst")},"getInfo"),Sst=me(function(t,e){return t.scratch("breadthfirst",e)},"setInfo"),me(NQ,"BreadthFirstLayout"),_st={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!(NQ.prototype.run=function(){var l=this.options,t=l.cy,c=l.eles,h=c.nodes().filter(function(t){return t.isChildless()}),e=c,r=l.directed,P=l.acyclic||l.maximal||0<l.maximalAdjustments,i=!!l.boundingBox,n=t.extent(),a=mrt(i?l.boundingBox:{x1:n.x1,y1:n.y1,w:n.w,h:n.h});if(JJ(l.roots))p=l.roots;else if(VJ(l.roots)){for(var s=[],o=0;o<l.roots.length;o++){var u=l.roots[o],u=t.getElementById(u);s.push(u)}p=t.collection(s)}else if(YJ(l.roots))p=t.$(l.roots);else if(r)p=h.roots();else for(var d=c.components(),p=t.collection(),B=me(function(t){var e=(t=d[t]).maxDegree(!1),t=t.filter(function(t){return t.degree(!1)===e});p=p.add(t)},"_loop"),g=0;g<d.length;g++)B(g);var f=[],m={},y=me(function(t,e){null==f[e]&&(f[e]=[]);var r=f[e].length;f[e].push(t),Sst(t,{index:r,depth:e})},"addToDepth"),$=me(function(t,e){var r=Cst(t),n=r.depth;f[n][r.index]=null,t.isChildless()&&y(t,e)},"changeDepth");e.bfs({roots:p,directed:l.directed,visit:me(function(t,e,r,n,i){var a=(t=t[0]).id();t.isChildless()&&y(t,i),m[a]=!0},"visit")});for(var v=[],x=0;x<h.length;x++){var b=h[x];m[b.id()]||v.push(b)}var w=me(function(t){for(var e=f[t],r=0;r<e.length;r++){var n=e[r];null==n?(e.splice(r,1),r--):Sst(n,{depth:t,index:r})}},"assignDepthsAt"),F=me(function(t,e){for(var r=Cst(t),n=t.incomers().filter(function(t){return t.isNode()&&c.has(t)}),i=-1,a=t.id(),s=0;s<n.length;s++)var o=n[s],o=Cst(o),i=Math.max(i,o.depth);return r.depth<=i&&(!l.acyclic&&e[a]?null:($(t,r=i+1),e[a]=r,!0))},"adjustMaximally");if(r&&P){var k=[],z={},G=me(function(t){return k.push(t)},"enqueue"),U=me(function(){return k.shift()},"dequeue");for(h.forEach(function(t){return k.push(t)});0<k.length;){var T=U(),E=F(T,z);if(E)T.outgoers().filter(function(t){return t.isNode()&&c.has(t)}).forEach(G);else if(null===E){_et("Detected double maximal shift for node `"+T.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var C=0;if(l.avoidOverlap)for(var S=0;S<h.length;S++)var _=h[S].layoutDimensions(l),q=_.w,C=Math.max(C,q,_.h);var A={},L=me(function(t){if(A[t.id()])return A[t.id()];for(var e=Cst(t).depth,r=t.neighborhood(),n=0,i=0,a=0;a<r.length;a++){var s,o,l=r[a];l.isEdge()||l.isParent()||!h.has(l)||null!=(l=Cst(l))&&(s=l.index,l=l.depth,null!=s)&&null!=l&&(o=f[l].length,l<e)&&(n+=s/o,i++)}return n/=i=Math.max(1,i),0===i&&(n=0),A[t.id()]=n},"getWeightedPercent"),j=me(function(t,e){var r=L(t)-L(e);return 0==r?mtt(t.id(),e.id()):r},"sortFn");void 0!==l.depthSort&&(j=l.depthSort);for(var N=f.length,I=0;I<N;I++)f[I].sort(j),w(I);for(var R=[],M=0;M<v.length;M++)R.push(v[M]);n=me(function(){for(var t=0;t<N;t++)w(t)},"assignDepths"),R.length&&(f.unshift(R),N=f.length,n());for(var W=0,D=0;D<N;D++)W=Math.max(f[D].length,W);var Y=a.x1+a.w/2,H=a.y1+a.h/2,O=h.reduce(function(t,e){return e=e.boundingBox({includeLabels:l.nodeDimensionsIncludeLabels}),{w:-1===t.w?e.w:(t.w+e.w)/2,h:-1===t.h?e.h:(t.h+e.h)/2}},{w:-1,h:-1}),V=Math.max(1===N?0:i?(a.h-2*l.padding-O.h)/(N-1):(a.h-2*l.padding-O.h)/(N+1),C),X=f.reduce(function(t,e){return Math.max(t,e.length)},0),e=me(function(t){var e,r,n=(t=Cst(t)).depth,t=t.index;return l.circle?(e=Math.min(a.w/2/N,a.h/2/N),e=(e=Math.max(e,C))*n+e-(0<N&&f[0].length<=3?e/2:0),r=2*Math.PI/f[n].length*t,0===n&&1===f[0].length&&(e=1),{x:Y+e*Math.cos(r),y:H+e*Math.sin(r)}):(e=f[n].length,r=Math.max(1===e?0:i?(a.w-2*l.padding-O.w)/((l.grid?X:e)-1):(a.w-2*l.padding-O.w)/((l.grid?X:e)+1),C),{x:Y+(t+1-(e+1)/2)*r,y:H+(n+1-(N+1)/2)*V})},"getPosition");return c.nodes().layoutPositions(this,l,e),this}),spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(IQ,"CircleLayout"),Ast={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!(IQ.prototype.run=function(){var n=t=this.options,t=t.cy,e=n.eles,i=void 0!==n.counterclockwise?!n.counterclockwise:n.clockwise,r=e.nodes().not(":parent");n.sort&&(r=r.sort(n.sort));for(var a,s=(t=mrt(n.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()})).x1+t.w/2,o=t.y1+t.h/2,l=(void 0===n.sweep?2*Math.PI-2*Math.PI/r.length:n.sweep)/Math.max(1,r.length-1),c=0,h=0;h<r.length;h++)var u=r[h].layoutDimensions(n),d=u.w,c=Math.max(c,d,u.h);a=at(n.radius)?n.radius:r.length<=1?0:Math.min(t.h,t.w)/2-c,1<r.length&&n.avoidOverlap&&(c*=1.75,t=Math.cos(l)-Math.cos(0),p=Math.sin(l)-Math.sin(0),t=Math.sqrt(c*c/(t*t+p*p)),a=Math.max(t,a));var p=me(function(t,e){var e=n.startAngle+e*l*(i?1:-1),r=a*Math.cos(e),e=a*Math.sin(e);return{x:s+r,y:o+e}},"getPos");return e.nodes().layoutPositions(this,n,p),this}),minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:me(function(t){return t.degree()},"concentric"),levelWidth:me(function(t){return t.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(RQ,"ConcentricLayout"),RQ.prototype.run=function(){for(var t=r=this.options,e=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=r.cy,n=t.eles,i=n.nodes().not(":parent"),a=(r=mrt(t.boundingBox||{x1:0,y1:0,w:r.width(),h:r.height()})).x1+r.w/2,s=r.y1+r.h/2,o=[],l=0,c=0;c<i.length;c++){var h=i[c],u=t.concentric(h);o.push({value:u,node:h}),h._private.scratch.concentric=u}i.updateStyle();for(var d=0;d<i.length;d++)var p=i[d].layoutDimensions(t),l=Math.max(l,p.w,p.h);o.sort(function(t,e){return e.value-t.value});for(var P=t.levelWidth(i),g=[[]],f=g[0],m=0;m<o.length;m++){var y=o[m];0<f.length&&P<=Math.abs(f[0].value-y.value)&&g.push(f=[]),f.push(y)}var v,x=l+t.minNodeSpacing;t.avoidOverlap||(v=0<g.length&&1<g[0].length,r=Math.min(r.w,r.h)/2-x,x=Math.min(x,r/(g.length+v?1:0)));for(var b=0,w=0;w<g.length;w++){var k,T=g[w],E=void 0===t.sweep?2*Math.PI-2*Math.PI/T.length:t.sweep,E=T.dTheta=E/Math.max(1,T.length-1);1<T.length&&t.avoidOverlap&&(k=Math.cos(E)-Math.cos(0),E=Math.sin(E)-Math.sin(0),k=Math.sqrt(x*x/(k*k+E*E)),b=Math.max(k,b)),T.r=b,b+=x}if(t.equidistant){for(var C=0,S=0,_=0;_<g.length;_++)var B=g[_].r-S,C=Math.max(C,B);for(var S=0,A=0;A<g.length;A++){var L=g[A];0===A&&(S=L.r),L.r=S,S+=C}}for(var N={},I=0;I<g.length;I++)for(var R=g[I],$=R.dTheta,M=R.r,D=0;D<R.length;D++){var F=R[D],O=t.startAngle+(e?1:-1)*$*D,O={x:a+M*Math.cos(O),y:s+M*Math.sin(O)};N[F.node.id()]=O}return n.nodes().layoutPositions(this,t,function(t){return t=t.id(),N[t]}),this},Nst={ready:me(function(){},"ready"),stop:me(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:me(function(t){return 2048},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:me(function(t){return 32},"idealEdgeLength"),edgeElasticity:me(function(t){return 32},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1},me(MQ,"CoseLayout"),MQ.prototype.run=function(){var r=this.options,t=r.cy,n=this,i=(!(n.stopped=!1)!==r.animate&&!1!==r.animate||n.emit({type:"layoutstart",layout:n}),Lst=!0===r.debug,Ist(t,n,r)),a=(Lst&&(void 0)(i),r.randomize&&Dst(i),iet()),s=me(function(){Pst(i,t,r),!0===r.fit&&t.fit(r.padding)},"refresh"),o=me(function(t){return!(n.stopped||t>=r.numIter||(Bst(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature<r.minTemp))},"mainLoop"),l=me(function(){var t,e;!0===r.animate||!1===r.animate?(s(),n.one("layoutstop",r.stop),n.emit({type:"layoutstop",layout:n})):(t=r.eles.nodes(),e=Ost(i,r,t),t.layoutPositions(n,r,e))},"done"),c=0,h=!0;if(!0===r.animate)me(function t(){for(var e=0;h&&e<r.refresh;)h=o(c),c++,e++;h?(iet()-a>=r.animationThreshold&&s(),net(t)):(Xst(i,r),l())},"frame")();else{for(;h;)h=o(c),c++;Xst(i,r),l()}return this},MQ.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},MQ.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},Ist=me(function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=mrt(r.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),s={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=r.eles.components(),l={},c=0;c<o.length;c++)for(var h=o[c],u=0;u<h.length;u++)l[h[u].id()]=c;for(c=0;c<s.nodeSize;c++){var d=(y=i[c]).layoutDimensions(r);(I={}).isLocked=y.locked(),I.id=y.data("id"),I.parentId=y.data("parent"),I.cmptId=l[y.id()],I.children=[],I.positionX=y.position("x"),I.positionY=y.position("y"),I.offsetX=0,I.offsetY=0,I.height=d.w,I.width=d.h,I.maxX=I.positionX+I.width/2,I.minX=I.positionX-I.width/2,I.maxY=I.positionY+I.height/2,I.minY=I.positionY-I.height/2,I.padLeft=parseFloat(y.style("padding")),I.padRight=parseFloat(y.style("padding")),I.padTop=parseFloat(y.style("padding")),I.padBottom=parseFloat(y.style("padding")),I.nodeRepulsion=HJ(r.nodeRepulsion)?r.nodeRepulsion(y):r.nodeRepulsion,s.layoutNodes.push(I),s.idToIndex[I.id]=c}for(var p=[],g=0,f=-1,m=[],c=0;c<s.nodeSize;c++){var y,v=(y=s.layoutNodes[c]).parentId;(null!=v?s.layoutNodes[s.idToIndex[v]].children:(p[++f]=y.id,m)).push(y.id)}for(s.graphSet.push(m);g<=f;){var x=p[g++],x=s.idToIndex[x],b=s.layoutNodes[x].children;if(0<b.length)for(s.graphSet.push(b),c=0;c<b.length;c++)p[++f]=b[c]}for(c=0;c<s.graphSet.length;c++)for(var w=s.graphSet[c],u=0;u<w.length;u++){var k=s.idToIndex[w[u]];s.indexToGraph[k]=c}for(c=0;c<s.edgeSize;c++){var T=n[c],E={},C=(E.id=T.data("id"),E.sourceId=T.data("source"),E.targetId=T.data("target"),HJ(r.idealEdgeLength)?r.idealEdgeLength(T):r.idealEdgeLength),T=HJ(r.edgeElasticity)?r.edgeElasticity(T):r.edgeElasticity,S=s.idToIndex[E.sourceId],_=s.idToIndex[E.targetId];if(s.indexToGraph[S]!=s.indexToGraph[_]){for(var A=Rst(E.sourceId,E.targetId,s),L=s.graphSet[A],N=0,I=s.layoutNodes[S];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],N++;for(I=s.layoutNodes[_];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],N++;C*=N*r.nestingFactor}E.idealLength=C,E.elasticity=T,s.layoutEdges.push(E)}return s},"createLayoutInfo"),Rst=me(function(t,e,r){return(t=Mst(t,e,0,r)).count<2?0:t.graph},"findLCA"),Mst=me(function t(e,r,n,i){var a=i.graphSet[n];if(-1<a.indexOf(e)&&-1<a.indexOf(r))return{count:2,graph:n};for(var s=0,o=0;o<a.length;o++){var l=a[o],l=i.idToIndex[l];if(0!==(l=i.layoutNodes[l].children).length&&0!==(l=t(e,r,i.indexToGraph[i.idToIndex[l[0]]],i)).count){if(1!==l.count)return l;if(2==++s)break}}return{count:s,graph:n}},"findLCA_aux"),Dst=me(function(t,e){for(var r=t.clientWidth,n=t.clientHeight,i=0;i<t.nodeSize;i++){var a=t.layoutNodes[i];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*r,a.positionY=Math.random()*n)}},"randomizePositions"),Ost=me(function(i,a,t){var s=i.boundingBox,o={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return a.boundingBox&&(t.forEach(function(t){t=i.layoutNodes[i.idToIndex[t.data("id")]],o.x1=Math.min(o.x1,t.positionX),o.x2=Math.max(o.x2,t.positionX),o.y1=Math.min(o.y1,t.positionY),o.y2=Math.max(o.y2,t.positionY)}),o.w=o.x2-o.x1,o.h=o.y2-o.y1),function(t,e){var r,n,t=i.layoutNodes[i.idToIndex[t.data("id")]];return a.boundingBox?(r=(t.positionX-o.x1)/o.w,n=(t.positionY-o.y1)/o.h,{x:s.x1+r*s.w,y:s.y1+n*s.h}):{x:t.positionX,y:t.positionY}}},"getScaleInBoundsFn"),Pst=me(function(t,e,r){var n=r.layout,i=r.eles.nodes(),a=Ost(t,r,i);i.positions(a),!0!==t.ready&&(t.ready=!0,n.one("layoutready",r.ready),n.emit({type:"layoutready",layout:this}))},"refreshPositions"),Bst=me(function(t,e,r){$st(t,e),qst(t),jst(t,e),Wst(t),Yst(t)},"step"),$st=me(function(t,e){for(var r=0;r<t.graphSet.length;r++)for(var n=t.graphSet[r],i=n.length,a=0;a<i;a++)for(var s=t.layoutNodes[t.idToIndex[n[a]]],o=a+1;o<i;o++){var l=t.layoutNodes[t.idToIndex[n[o]]];zst(s,l,t,e)}},"calculateNodeForces"),Fst=me(function(t){return-t+2*t*Math.random()},"randomDistance"),zst=me(function(t,e,r,n){var i,a,s,o;t.cmptId!==e.cmptId&&!r.isCompound||(r=e.positionX-t.positionX,i=e.positionY-t.positionY,0===r&&0===i&&(r=Fst(1),i=Fst(1)),o=0<(o=Gst(t,e,r,i))?(s=n.nodeOverlap*o)*r/(a=Math.sqrt(r*r+i*i)):(n=Ust(t,r,i),o=(r=(o=Ust(e,-1*r,-1*i)).x-n.x)*r+(i=o.y-n.y)*i,a=Math.sqrt(o),(s=(t.nodeRepulsion+e.nodeRepulsion)/o)*r/a),n=s*i/a,t.isLocked||(t.offsetX-=o,t.offsetY-=n),e.isLocked)||(e.offsetX+=o,e.offsetY+=n)},"nodeRepulsion"),Gst=me(function(t,e,r,n){return r=0<r?t.maxX-e.minX:e.maxX-t.minX,n=0<n?t.maxY-e.minY:e.maxY-t.minY,0<=r&&0<=n?Math.sqrt(r*r+n*n):0},"nodesOverlap"),Ust=me(function(t,e,r){var n=t.positionX,i=t.positionY,a=t.height||1,s=r/e,o=a/(t=t.width||1),l={};return 0===e&&0<r||0===e&&r<0?(l.x=n,l.y=i+a/2):0<e&&-1*o<=s&&s<=o?(l.x=n+t/2,l.y=i+t*r/2/e):e<0&&-1*o<=s&&s<=o?(l.x=n-t/2,l.y=i-t*r/2/e):0<r&&(s<=-1*o||o<=s)?(l.x=n+a*e/2/r,l.y=i+a/2):r<0&&(s<=-1*o||o<=s)&&(l.x=n-a*e/2/r,l.y=i-a/2),l},"findClippingPoint"),qst=me(function(t,e){for(var r=0;r<t.edgeSize;r++){var n,i,a=t.layoutEdges[r],s=t.idToIndex[a.sourceId],s=t.layoutNodes[s],o=t.idToIndex[a.targetId],l=(o=t.layoutNodes[o]).positionX-s.positionX,c=o.positionY-s.positionY;0==l&&0==c||(n=Ust(s,l,c),c=(l=Ust(o,-1*l,-1*c)).x-n.x,l=l.y-n.y,n=Math.sqrt(c*c+l*l),a=Math.pow(a.idealLength-n,2)/a.elasticity,c=0!==n?(i=a*c/n,a*l/n):i=0,s.isLocked||(s.offsetX+=i,s.offsetY+=c),o.isLocked)||(o.offsetX-=i,o.offsetY-=c)}},"calculateEdgeForces"),jst=me(function(t,e){if(0!==e.gravity)for(var r=0;r<t.graphSet.length;r++)for(var n,i,a=t.graphSet[r],s=a.length,o=0===r?(i=t.clientHeight/2,t.clientWidth/2):(n=t.layoutNodes[t.idToIndex[a[0]]],i=(n=t.layoutNodes[t.idToIndex[n.parentId]]).positionX,n.positionY),l=0;l<s;l++){var c,h,u,d=t.layoutNodes[t.idToIndex[a[l]]];d.isLocked||(h=i-d.positionX,u=o-d.positionY,1<(c=Math.sqrt(h*h+u*u))&&(h=e.gravity*h/c,u=e.gravity*u/c,d.offsetX+=h,d.offsetY+=u))}},"calculateGravityForces"),Wst=me(function(t,e){var r=[],n=0,i=-1;for(r.push.apply(r,t.graphSet[0]),i+=t.graphSet[0].length;n<=i;){var a=r[n++],a=t.idToIndex[a],s=(a=t.layoutNodes[a]).children;if(0<s.length&&!a.isLocked){for(var o=a.offsetX,l=a.offsetY,c=0;c<s.length;c++){var h=t.layoutNodes[t.idToIndex[s[c]]];h.offsetX+=o,h.offsetY+=l,r[++i]=s[c]}a.offsetX=0,a.offsetY=0}}},"propagateForces"),Yst=me(function(t,e){for(var r=0;r<t.nodeSize;r++)0<(i=t.layoutNodes[r]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0);for(var n,r=0;r<t.nodeSize;r++)0<(i=t.layoutNodes[r]).children.length||i.isLocked||(n=Hst(i.offsetX,i.offsetY,t.temperature),i.positionX+=n.x,i.positionY+=n.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,Vst(i,t));for(var i,r=0;r<t.nodeSize;r++)0<(i=t.layoutNodes[r]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)},"updatePositions"),Hst=me(function(t,e,r){var n=Math.sqrt(t*t+e*e);return r<n?{x:r*t/n,y:r*e/n}:{x:t,y:e}},"limitForce"),Vst=me(function t(e,r){if(null!=(n=e.parentId)){var n,i=!1;if((null==(n=r.layoutNodes[r.idToIndex[n]]).maxX||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(null==n.minX||e.minX-n.padLeft<n.minX)&&(n.minX=e.minX-n.padLeft,i=!0),(null==n.maxY||e.maxY+n.padBottom>n.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(null==n.minY||e.minY-n.padTop<n.minY)&&(n.minY=e.minY-n.padTop,i=!0),i)return t(n,r)}},"updateAncestryBoundaries"),Xst=me(function(t,e){for(var r=t.layoutNodes,n=[],i=0;i<r.length;i++){var a=r[i],s=a.cmptId;(n[s]=n[s]||[]).push(a)}for(var o=0,i=0;i<n.length;i++)if(h=n[i]){h.x1=1/0,h.x2=-1/0,h.y1=1/0,h.y2=-1/0;for(var l=0;l<h.length;l++){var c=h[l];h.x1=Math.min(h.x1,c.positionX-c.width/2),h.x2=Math.max(h.x2,c.positionX+c.width/2),h.y1=Math.min(h.y1,c.positionY-c.height/2),h.y2=Math.max(h.y2,c.positionY+c.height/2)}h.w=h.x2-h.x1,h.h=h.y2-h.y1,o+=h.w*h.h}n.sort(function(t,e){return e.w*e.h-t.w*t.h});for(var h,u=0,d=0,p=0,g=0,f=Math.sqrt(o)*t.clientWidth/t.clientHeight,i=0;i<n.length;i++)if(h=n[i]){for(l=0;l<h.length;l++)(c=h[l]).isLocked||(c.positionX+=u-h.x1,c.positionY+=d-h.y1);u+=h.w+e.componentSpacing,p+=h.w+e.componentSpacing,g=Math.max(g,h.h),f<p&&(d+=g+e.componentSpacing,g=p=u=0)}},"separateComponents"),Kst={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:me(function(t){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(DQ,"GridLayout"),DQ.prototype.run=function(){var t=e=this.options,e=e.cy,r=(c=t.eles).nodes().not(":parent"),i=(t.sort&&(r=r.sort(t.sort)),mrt(t.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}));if(0===i.h||0===i.w)c.nodes().layoutPositions(this,t,function(t){return{x:i.x1,y:i.y1}});else{var n=r.size(),e=Math.sqrt(n*i.h/i.w),a=Math.round(e),s=Math.round(i.w/i.h*e),o=me(function(t){if(null==t)return Math.min(a,s);Math.min(a,s)==a?a=t:s=t},"small"),l=me(function(t){if(null==t)return Math.max(a,s);Math.max(a,s)==a?a=t:s=t},"large"),c=t.rows,e=null!=t.cols?t.cols:t.columns;if(null!=c&&null!=e)a=c,s=e;else if(null!=c&&null==e)a=c,s=Math.ceil(n/a);else if(null==c&&null!=e)s=e,a=Math.ceil(n/s);else if(n<s*a)n<=((c=o())-1)*(e=l())?o(c-1):n<=(e-1)*c&&l(e-1);else for(;s*a<n;){var h=o(),u=l();n<=(u+1)*h?l(u+1):o(h+1)}var d=i.w/s,p=i.h/a;if(t.condense&&(p=d=0),t.avoidOverlap)for(var g=0;g<r.length;g++){null!=(f=(m=r[g])._private.position).x&&null!=f.y||(f.x=0,f.y=0);var f=m.layoutDimensions(t),m=t.avoidOverlapPadding,y=f.w+m,f=f.h+m,d=Math.max(d,y),p=Math.max(p,f)}for(var v={},x=me(function(t,e){return!!v["c-"+t+"-"+e]},"used"),b=me(function(t,e){v["c-"+t+"-"+e]=!0},"use"),w=0,k=0,T=me(function(){s<=++k&&(k=0,w++)},"moveToNextCell"),E={},C=0;C<r.length;C++){var S=r[C],_=t.position(S);if(_&&(void 0!==_.row||void 0!==_.col)){var A={row:_.row,col:_.col};if(void 0===A.col)for(A.col=0;x(A.row,A.col);)A.col++;else if(void 0===A.row)for(A.row=0;x(A.row,A.col);)A.row++;E[S.id()]=A,b(A.row,A.col)}}c=me(function(t,e){var r,n;if(t.locked()||t.isParent())return!1;if(t=E[t.id()])r=t.col*d+d/2+i.x1,n=t.row*p+p/2+i.y1;else{for(;x(w,k);)T();r=k*d+d/2+i.x1,n=w*p+p/2+i.y1,b(w,k),T()}return{x:r,y:n}},"getPos"),r.layoutPositions(this,t,c)}return this},Zst={ready:me(function(){},"ready"),stop:me(function(){},"stop")},me(OQ,"NullLayout"),OQ.prototype.run=function(){var t=this.options,e=t.eles;return this.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),this.one("layoutready",t.ready),this.emit("layoutready"),this.one("layoutstop",t.stop),this.emit("layoutstop"),this},Qst={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!(OQ.prototype.stop=function(){return this}),animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(PQ,"PresetLayout"),Jst={fit:!0,padding:30,boundingBox:void 0,animate:!(PQ.prototype.run=function(){var e=this.options,t=e.eles.nodes(),r=HJ(e.positions);function n(t){return null==e.positions?Zet(t.position()):r?e.positions(t):e.positions[t._private.data.id]??null}return me(n,"getPosition"),t.layoutPositions(this,e,function(t,e){var r=n(t);return!t.locked()&&null!=r&&r}),this}),animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(BQ,"RandomLayout"),BQ.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=mrt(t.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}),e=me(function(t,e){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}},"getPos");return r.nodes().layoutPositions(this,t,e),this},tot=[{name:"breadthfirst",impl:NQ},{name:"circle",impl:IQ},{name:"concentric",impl:RQ},{name:"cose",impl:MQ},{name:"grid",impl:DQ},{name:"null",impl:OQ},{name:"preset",impl:PQ},{name:"random",impl:BQ}],me($Q,"NullRenderer"),Oot=me(function(){},"noop"),Bot=me(function(){throw new Error("A headless instance can not render images")},"throwImgErr"),$Q.prototype={recalculateRenderedStyle:Oot,notify:me(function(){this.notifications++},"notify"),init:Oot,isHeadless:me(function(){return!0},"isHeadless"),png:Bot,jpg:Bot},slt={arrowShapeWidth:.3,registerArrowShapes:function(){var r=this.arrowShapes={},o=this,n=me(function(t,e,r,n,i,a,s){return i.x-r/2-s<=t&&t<=i.x+r/2+s&&i.y-r/2-s<=e&&e<=i.y+r/2+s},"bbCollide"),l=me(function(t,e,r,n,i){var a=t*Math.cos(n)-e*Math.sin(n),t=t*Math.sin(n)+e*Math.cos(n);return{x:a*r+i.x,y:t*r+i.y}},"transform"),c=me(function(t,e,r,n){for(var i=[],a=0;a<t.length;a+=2)i.push(l(t[a],t[a+1],e,r,n));return i},"transformPoints"),h=me(function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n.x,n.y)}return e},"pointsToArr"),i=me(function(t){return t.pstyle("width").pfValue*t.pstyle("arrow-scale").pfValue*2},"standardGap"),t=me(function(t,e){YJ(e)&&(e=r[e]),r[t]=vtt({name:t,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:me(function(t,e,r,n,i,a){return r=h(c(this.points,r+2*a,n,i)),Prt(t,e,r)},"collide"),roughCollide:n,draw:me(function(t,e,r,n){e=c(this.points,e,r,n),o.arrowShapeImpl("polygon")(t,e)},"draw"),spacing:me(function(t){return 0},"spacing"),gap:i},e)},"defineArrowShape");t("none",{collide:wet,roughCollide:wet,draw:Tet,spacing:ket,gap:ket}),t("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),t("arrow","triangle"),t("triangle-backcurve",{points:r.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:me(function(t,e,r,n,i){var a=c(this.points,e,r,n),s=this.controlPoint,s=l(s[0],s[1],e,r,n);o.arrowShapeImpl(this.name)(t,a,s)},"draw"),gap:me(function(t){return.8*i(t)},"gap")}),t("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:me(function(t,e,r,n,i,a,s){var o=h(c(this.points,r+2*s,n,i)),r=h(c(this.pointsTee,r+2*s,n,i));return Prt(t,e,o)||Prt(t,e,r)},"collide"),draw:me(function(t,e,r,n,i){var a=c(this.points,e,r,n),e=c(this.pointsTee,e,r,n);o.arrowShapeImpl(this.name)(t,a,e)},"draw")}),t("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:me(function(t,e,r,n,i,a,s){var o=i,o=Math.pow(o.x-t,2)+Math.pow(o.y-e,2)<=Math.pow((r+2*s)*this.radius,2),r=h(c(this.points,r+2*s,n,i));return Prt(t,e,r)||o},"collide"),draw:me(function(t,e,r,n,i){r=c(this.pointsTr,e,r,n),o.arrowShapeImpl(this.name)(t,r,n.x,n.y,this.radius*e)},"draw"),spacing:me(function(t){return o.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.radius},"spacing")}),t("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:me(function(t,e){var r=this.baseCrossLinePts.slice(),e=e/t;return r[3]=r[3]-e,r[5]=r[5]-e,r},"crossLinePts"),collide:me(function(t,e,r,n,i,a,s){var o=h(c(this.points,r+2*s,n,i)),a=h(c(this.crossLinePts(r,a),r+2*s,n,i));return Prt(t,e,o)||Prt(t,e,a)},"collide"),draw:me(function(t,e,r,n,i){var a=c(this.points,e,r,n),i=c(this.crossLinePts(e,i),e,r,n);o.arrowShapeImpl(this.name)(t,a,i)},"draw")}),t("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:me(function(t){return.525*i(t)},"gap")}),t("circle",{radius:.15,collide:me(function(t,e,r,n,i,a,s){return Math.pow(i.x-t,2)+Math.pow(i.y-e,2)<=Math.pow((r+2*s)*this.radius,2)},"collide"),draw:me(function(t,e,r,n,i){o.arrowShapeImpl(this.name)(t,n.x,n.y,this.radius*e)},"draw"),spacing:me(function(t){return o.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.radius},"spacing")}),t("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:me(function(t){return 1},"spacing"),gap:me(function(t){return 1},"gap")}),t("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),t("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:me(function(t){return t.pstyle("width").pfValue*t.pstyle("arrow-scale").value},"gap")}),t("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:me(function(t){return.95*t.pstyle("width").pfValue*t.pstyle("arrow-scale").value},"gap")})}},jot={projectIntoViewport:function(t,e){var r=this.cy,n=(a=this.findContainerClientCoords())[0],i=a[1],a=a[4],s=r.pan(),r=r.zoom();return[((t-n)/a-s.x)/r,((e-i)/a-s.y)/r]},findContainerClientCoords:function(){var e,t,r,n,i,a,s,o,l,c,h;return this.containerBB||(h=(o=this.container).getBoundingClientRect(),e=this.cy.window().getComputedStyle(o),t=(s=me(function(t){return parseFloat(e.getPropertyValue(t))},"styleValue"))("padding-left"),r=s("padding-right"),n=s("padding-top"),i=s("padding-bottom"),c=s("border-left-width"),l=s("border-right-width"),a=s("border-top-width"),s("border-bottom-width"),s=o.clientWidth,o=o.clientHeight,l=h.width/(s+(c+l)),c=h.left+t+c,h=h.top+n+a,this.containerBB=[c,h,s-(t+r),o-(n+i),l])},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0]},findNearestElements:function(y,v,t,e){var n,i,x=this,b=this,r=b.getCachedZSortedEles(),w=[],a=b.cy.zoom(),k=b.cy.hasCompoundNodes(),T=(e?24:8)/a,l=(e?8:2)/a,g=(e?8:2)/a,s=1/0;function E(t,e){if(t.isNode()){if(i)return;i=t,w.push(t)}if(t.isEdge()&&(null==e||e<s))if(n){if(n.pstyle("z-compound-depth").value===t.pstyle("z-compound-depth").value&&n.pstyle("z-compound-depth").value===t.pstyle("z-compound-depth").value)for(var r=0;r<w.length;r++)if(w[r].isEdge()){w[r]=t,n=t,s=e??s;break}}else w.push(t),n=t,s=e??s}function C(t){var e=t.outerWidth()+2*l,r=t.outerHeight()+2*l,n=e/2,i=r/2,a=t.position(),s="auto"===t.pstyle("corner-radius").value?"auto":t.pstyle("corner-radius").pfValue,o=t._private.rscratch;if(a.x-n<=y&&y<=a.x+n&&a.y-i<=v&&v<=a.y+i&&b.nodeShapes[x.getNodeShape(t)].checkPoint(y,v,0,e,r,a.x,a.y,s,o))return E(t,0),!0}function o(t){var e,r=t._private,n=r.rscratch,i=t.pstyle("width").pfValue,a=t.pstyle("arrow-scale").value,s=(l=i/2+T)*l,o=2*l,l=r.source,c=r.target;if("segments"===n.edgeType||"straight"===n.edgeType||"haystack"===n.edgeType){for(var h=n.allpts,u=0;u+3<h.length;u+=2)if(Nrt(y,v,h[u],h[u+1],h[u+2],h[u+3],o)&&s>(e=Ort(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(t,e),!0}else if("bezier"===n.edgeType||"multibezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType)for(h=n.allpts,u=0;u+5<n.allpts.length;u+=4)if(Irt(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5],o)&&s>(e=Drt(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return E(t,e),!0;for(var l=l||r.source,c=c||r.target,d=x.getArrowWidth(i,a),p=[{name:"source",x:n.arrowStartX,y:n.arrowStartY,angle:n.srcArrowAngle},{name:"target",x:n.arrowEndX,y:n.arrowEndY,angle:n.tgtArrowAngle},{name:"mid-source",x:n.midX,y:n.midY,angle:n.midsrcArrowAngle},{name:"mid-target",x:n.midX,y:n.midY,angle:n.midtgtArrowAngle}],u=0;u<p.length;u++){var g=p[u],f=b.arrowShapes[t.pstyle(g.name+"-arrow-shape").value],m=t.pstyle("width").pfValue;if(f.roughCollide(y,v,d,g.angle,{x:g.x,y:g.y},m,T)&&f.collide(y,v,d,g.angle,{x:g.x,y:g.y},m,T))return E(t),!0}k&&0<w.length&&(C(l),C(c))}function f(t,e,r){return $et(t,e,r)}function c(t,e){var r=t._private,n=g,i=e?e+"-":"",a=(t.boundingBox(),r.labelBounds[e||"main"]),s=t.pstyle(i+"label").value;if("yes"===t.pstyle("text-events").strValue&&s){var o=f(r.rscratch,"labelX",e),l=f(r.rscratch,"labelY",e),s=f(r.rscratch,"labelAngle",e),r=t.pstyle(i+"text-margin-x").pfValue,e=t.pstyle(i+"text-margin-y").pfValue,i=a.x1-n-r,c=a.x2+n-r,h=a.y1-n-e,n=a.y2+n-e;if(s){var u=Math.cos(s),d=Math.sin(s),p=(s=me(function(t,e){return{x:(t-=o)*u-(e-=l)*d+o,y:t*d+e*u+l}},"rotate"))(i,h),i=s(i,n),h=s(c,h),s=s(c,n),c=[p.x+r,p.y+e,h.x+r,h.y+e,s.x+r,s.y+e,i.x+r,i.y+e];if(Prt(y,v,c))return E(t),!0}else if(Srt(a,y,v))return E(t),!0}}t&&(r=r.interactive),me(E,"addEle"),me(C,"checkNode"),me(o,"checkEdge"),me(f,"preprop"),me(c,"checkLabel");for(var h=r.length-1;0<=h;h--){var u=r[h];u.isNode()?C(u)||c(u):o(u)||c(u)||c(u,"source")||c(u,"target")}return w},getAllInBox:function(t,e,r,n){for(var i=this.getCachedZSortedEles().interactive,a=[],s=Math.min(t,r),o=Math.max(t,r),l=Math.min(e,n),c=Math.max(e,n),h=mrt({x1:t=s,y1:e=l,x2:r=o,y2:n=c}),u=0;u<i.length;u++){var d=i[u];if(d.isNode()){var p=d,g=p.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});Crt(h,g)&&!Art(g,h)&&a.push(p)}else if((null==(d=(p=(g=d)._private).rscratch).startX||null==d.startY||Srt(h,d.startX,d.startY))&&(null==d.endX||null==d.endY||Srt(h,d.endX,d.endY)))if("bezier"===d.edgeType||"multibezier"===d.edgeType||"self"===d.edgeType||"compound"===d.edgeType||"segments"===d.edgeType||"haystack"===d.edgeType){for(var f=p.rstyle.bezierPts||p.rstyle.linePts||p.rstyle.haystackPts,m=!0,y=0;y<f.length;y++)if(!_rt(h,f[y])){m=!1;break}m&&a.push(g)}else"haystack"!==d.edgeType&&"straight"!==d.edgeType||a.push(g)}return a}},(Wot={calculateArrowAngles:function(t){var e,r,n,i,a,s,o,l,c,h,u,d,p,g,f="haystack"===(t=t._private.rscratch).edgeType,m="bezier"===t.edgeType,y="multibezier"===t.edgeType,v="segments"===t.edgeType,x="compound"===t.edgeType,b="self"===t.edgeType,w=f?(d=t.haystackPts[0],g=t.haystackPts[1],e=t.haystackPts[2],t.haystackPts[3]):(d=t.arrowStartX,g=t.arrowStartY,e=t.arrowEndX,t.arrowEndY),k=(k=t.midX,T=t.midY,n=v?(r=d-t.segpts[0],g-t.segpts[1]):y||x||b||m?(p=t.allpts,r=d-drt(p[0],p[2],p[4],.1),g-drt(p[1],p[3],p[5],.1)):(r=d-k,g-T),t.srcArrowAngle=srt(r,n),t.midX),T=t.midY;f&&(k=(d+e)/2,T=(g+w)/2),r=e-d,n=w-g,v?n=(p=t.allpts).length/2%2==0?(i=(u=p.length/2)-2,r=p[u]-p[i],p[u+1]-p[i+1]):t.isRound?(r=t.midVector[1],-t.midVector[0]):(i=(u=p.length/2-1)-2,r=p[u]-p[i],p[u+1]-p[i+1]):(y||x||b)&&(p=t.allpts,f=t.ctrlpts.length/2%2==0?(h=2+(l=2+(c=p.length/2-1)),a=drt(p[c],p[l],p[h],0),s=drt(p[c+1],p[l+1],p[h+1],0),o=drt(p[c],p[l],p[h],1e-4),drt(p[c+1],p[l+1],p[h+1],1e-4)):(h=2+(l=p.length/2-1),a=drt(p[c=l-2],p[l],p[h],.4999),s=drt(p[c+1],p[l+1],p[h+1],.4999),o=drt(p[c],p[l],p[h],.5),drt(p[c+1],p[l+1],p[h+1],.5)),r=o-a,n=f-s),t.midtgtArrowAngle=srt(r,n),t.midDispX=r,t.midDispY=n,r*=-1,n*=-1,v&&(p=t.allpts).length/2%2!=0&&!t.isRound&&(r=-(p[d=2+(u=p.length/2-1)]-p[u]),n=-(p[d+1]-p[u+1])),t.midsrcArrowAngle=srt(r,n),n=v?(r=e-t.segpts[t.segpts.length-2],w-t.segpts[t.segpts.length-1]):y||x||b||m?(g=(p=t.allpts).length,r=e-drt(p[g-6],p[g-4],p[g-2],.9),w-drt(p[g-5],p[g-3],p[g-1],.9)):(r=e-k,w-T),t.tgtArrowAngle=srt(r,n)}}).getArrowWidth=Wot.getArrowHeight=function(t,e){var r,n=this.arrowWidthCache=this.arrowWidthCache||{};return n[t+", "+e]||(r=Math.max(Math.pow(13.37*t,.9),29)*e,n[t+", "+e]=r)},not={},iot={},yot=me(function(t,e,r){r.x=e.x-t.x,r.y=e.y-t.y,r.len=Math.sqrt(r.x*r.x+r.y*r.y),r.nx=r.x/r.len,r.ny=r.y/r.len,r.ang=Math.atan2(r.ny,r.nx)},"asVec"),vot=me(function(t,e){e.x=-1*t.x,e.y=-1*t.y,e.nx=-1*t.nx,e.ny=-1*t.ny,e.ang=0<t.ang?-(Math.PI-t.ang):Math.PI+t.ang},"invertVec"),xot=me(function(t,e,r,n,i){t!==mot?yot(e,t,not):vot(iot,not),yot(e,r,iot),uot=not.nx*iot.ny-not.ny*iot.nx,oot=not.nx*iot.nx-not.ny*-iot.ny,uot=Math.asin(Math.max(-1,Math.min(1,uot))),Math.abs(uot)<1e-6?(eot=e.x,rot=e.y,lot=hot=0):(sot=!(aot=1),oot<0?uot<0?uot=Math.PI+uot:(uot=Math.PI-uot,aot=-1,sot=!0):0<uot&&(aot=-1,sot=!0),hot=void 0!==e.radius?e.radius:n,oot=uot/2,uot=Math.min(not.len/2,iot.len/2),lot=i?(cot=Math.abs(Math.cos(oot)*hot/Math.sin(oot)),uot<cot?(cot=uot,Math.abs(cot*Math.sin(oot)/Math.cos(oot))):hot):(cot=Math.min(uot,hot),Math.abs(cot*Math.sin(oot)/Math.cos(oot))),got=e.x+iot.nx*cot,fot=e.y+iot.ny*cot,eot=got-iot.ny*lot*aot,rot=fot+iot.nx*lot*aot,dot=e.x+not.nx*cot,pot=e.y+not.ny*cot,mot=e)},"calcCornerArc"),me(FQ,"drawPreparedRoundCorner"),me(zQ,"getRoundCorner"),Yot={findMidptPtsEtc:function(t,e){var r,n,i,a,s,o,l=e.posPts,c=e.intersectionPts,h=e.vectorNormInverse,u=t.pstyle("source-endpoint"),d=t.pstyle("target-endpoint"),p=null!=u.units&&null!=d.units,g=me(function(t,e,r,n){return n-=e,e=r-t,{x:-n/(r=Math.sqrt(e*e+n*n)),y:e/r}},"recalcVectorNormInverse");switch(t.pstyle("edge-distances").value){case"node-position":o=l;break;case"intersection":o=c;break;case"endpoints":o=p?(s={x1:r=(n=qK(this.manualEndptToPx(t.source()[0],u),2))[0],y1:n=n[1],x2:i=(a=qK(this.manualEndptToPx(t.target()[0],d),2))[0],y2:a=a[1]},h=g(r,n,i,a),s):(_et("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),c)}return{midptPts:o,vectorNormInverse:h}},findHaystackPoints:function(t){for(var e=0;e<t.length;e++){var r=t[e],n=(a=r._private).rscratch,i=(n.haystack||(i=2*Math.random()*Math.PI,n.source={x:Math.cos(i),y:Math.sin(i)},i=2*Math.random()*Math.PI,n.target={x:Math.cos(i),y:Math.sin(i)}),a.source),a=a.target,s=i.position(),o=a.position(),l=i.width(),c=a.width(),h=i.height(),a=a.height(),u=r.pstyle("haystack-radius").value/2;n.haystackPts=n.allpts=[n.source.x*l*u+s.x,n.source.y*h*u+s.y,n.target.x*c*u+o.x,n.target.y*a*u+o.y],n.midX=(n.allpts[0]+n.allpts[2])/2,n.midY=(n.allpts[1]+n.allpts[3])/2,n.edgeType="haystack",n.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},findSegmentsPoints:function(t,e){var r=t._private.rscratch,n=t.pstyle("segment-weights"),i=t.pstyle("segment-distances"),a=t.pstyle("segment-radii"),s=t.pstyle("radius-type"),o=Math.min(n.pfValue.length,i.pfValue.length),l=a.pfValue[a.pfValue.length-1],c=s.pfValue[s.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var h=0;h<o;h++){var u=n.pfValue[h],d=i.pfValue[h],p=1-u,g=this.findMidptPtsEtc(t,e),f=g.midptPts,m=f.x1*p+f.x2*u;r.segpts.push(m+(g=g.vectorNormInverse).x*d,f.y1*p+f.y2*u+g.y*d),r.radii.push(void 0!==a.pfValue[h]?a.pfValue[h]:l),r.isArcRadius.push("arc-radius"===(void 0!==s.pfValue[h]?s.pfValue[h]:c))}},findLoopPoints:function(t,e,r,n){var i=t._private.rscratch,a=e.dirCounts,e=e.srcPos,s=(s=t.pstyle("control-point-distances"))?s.pfValue[0]:void 0,o=t.pstyle("loop-direction").pfValue,l=t.pstyle("loop-sweep").pfValue,t=t.pstyle("control-point-step-size").pfValue;i.edgeType="self",n&&(r=0,t=s),s=(n=o-Math.PI/2)-l/2,n+=l/2,r=void 0===a[o=o+"_"+l]?a[o]=0:++a[o],i.ctrlpts=[e.x+1.4*Math.cos(s)*t*(r/3+1),e.y+1.4*Math.sin(s)*t*(r/3+1),e.x+1.4*Math.cos(n)*t*(r/3+1),e.y+1.4*Math.sin(n)*t*(r/3+1)]},findCompoundLoopPoints:function(t,e,r,n){var i=t._private.rscratch,a=(i.edgeType="compound",e.srcPos),s=e.tgtPos,o=e.srcW,l=e.srcH,c=e.tgtW,e=e.tgtH,h=t.pstyle("control-point-step-size").pfValue,t=(t=t.pstyle("control-point-distances"))?t.pfValue[0]:void 0,n=(n&&(r=0,h=t),{x:a.x-o/2,y:a.y-l/2}),t={x:s.x-c/2,y:s.y-e/2},a={x:Math.min(n.x,t.x),y:Math.min(n.y,t.y)},l=Math.max(.5,Math.log(.01*o)),s=Math.max(.5,Math.log(.01*c));i.ctrlpts=[a.x,a.y-(1+Math.pow(50,1.12)/100)*h*(r/3+1)*l,a.x-(1+Math.pow(50,1.12)/100)*h*(r/3+1)*s,a.y]},findStraightEdgePoints:function(t){t._private.rscratch.edgeType="straight"},findBezierPoints:function(t,e,r,n,i){var a=t._private.rscratch,s=t.pstyle("control-point-step-size").pfValue,o=t.pstyle("control-point-distances"),l=t.pstyle("control-point-weights"),c=o&&l?Math.min(o.value.length,l.value.length):1,h=o?o.pfValue[0]:void 0,u=l.value[0],d=n;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<c;p++){var g=(.5-e.eles.length/2+r)*s*(i?-1:1),f=lrt(g),f=(d&&(h=o?o.pfValue[p]:s,u=l.value[p]),void 0!==(m=n?h:void 0!==h?f*h:void 0)?m:g),m=1-u,g=u,y=this.findMidptPtsEtc(t,e),v=y.midptPts,x=v.x1*m+v.x2*g;a.ctrlpts.push(x+(y=y.vectorNormInverse).x*f,v.y1*m+v.y2*g+y.y*f)}},findTaxiPoints:function(t,e){var r=t._private.rscratch,n=(r.edgeType="segments","vertical"),i="horizontal",a=e.posPts,s=e.srcW,o=e.srcH,l=e.tgtW,e=e.tgtH,c="node-position"!==t.pstyle("edge-distances").value,h=t.pstyle("taxi-direction").value,u=h,d=t.pstyle("taxi-turn"),p="%"===d.units,g=(d=d.pfValue)<0,f=t.pstyle("taxi-turn-min-distance").pfValue,m=c?(s+l)/2:0,y=c?(o+e)/2:0,v=a.x2-a.x1,x=a.y2-a.y1,m=(b=me(function(t,e){return 0<t?Math.max(t-e,0):Math.min(t+e,0)},"subDWH"))(v,m),b=b(x,y),y=!1,w=("auto"===u?h=Math.abs(m)>Math.abs(b)?i:n:"upward"===u||"downward"===u?(h=n,y=!0):"leftward"!==u&&"rightward"!==u||(h=i,y=!0),(i=h===n)?b:m),n=lrt(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0<h||"leftward"===u&&0<h||"rightward"===u&&h<0)||(w=(n*=-1)*Math.abs(w),b=!0),m=p?(d<0?1+d:d)*w:(d<0?w:0)+d*n,g=(y=me(function(t){return Math.abs(t)<f||Math.abs(t)>=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-Math.abs(m)),!g&&!u||b?i?(h=a.y1+m+(c?o/2*n:0),x=a.x1,e=a.x2,r.segpts=[x,h,e,h]):(p=a.x1+m+(c?s/2*n:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):i?(p=Math.abs(h)<=o/2,d=Math.abs(v)<=l/2,p?(y=(a.x1+a.x2)/2,g=a.y1,u=a.y2,r.segpts=[y,g,y,u]):d?(b=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,b,l,b]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(x)<=e/2,p?(y=(a.y1+a.y2)/2,u=a.x1,d=a.x2,r.segpts=[u,y,d,y]):g?(v=(a.x1+a.x2)/2,l=a.y1,b=a.y2,r.segpts=[v,l,v,b]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=t.pstyle("taxi-radius").value,g="arc-radius"===t.pstyle("radius-type").value[0],r.radii=new Array(r.segpts.length/2).fill(y),r.isArcRadius=new Array(r.segpts.length/2).fill(g))},tryToCorrectInvalidPoints:function(t,e){var r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,E=t._private.rscratch;"bezier"===E.edgeType&&(m=e.srcPos,r=e.tgtPos,n=e.srcW,i=e.srcH,a=e.tgtW,s=e.tgtH,T=e.srcShape,o=e.tgtShape,v=e.srcCornerRadius,l=e.tgtCornerRadius,x=e.srcRs,e=e.tgtRs,y=!at(E.startX)||!at(E.startY),f=!at(E.arrowStartX)||!at(E.arrowStartY),c=!at(E.endX)||!at(E.endY),h=!at(E.arrowEndX)||!at(E.arrowEndY),u=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=crt({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))<u,p=(d=crt({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.endX,y:E.endY}))<u,g=!1,(y||f||b)&&(g=!0,y=E.ctrlpts[0]-m.x,f=E.ctrlpts[1]-m.y,k=y/(y=Math.sqrt(y*y+f*f)),f/=y,y=Math.max(n,i),y={x:E.ctrlpts[0]+2*k*y,y:E.ctrlpts[1]+2*f*y},T=T.intersectLine(m.x,m.y,n,i,y.x,y.y,0,v,x),b?(E.ctrlpts[0]=E.ctrlpts[0]+k*(u-w),E.ctrlpts[1]=E.ctrlpts[1]+f*(u-w)):(E.ctrlpts[0]=T[0]+k*u,E.ctrlpts[1]=T[1]+f*u)),(c||h||p)&&(g=!0,m=E.ctrlpts[0]-r.x,y=E.ctrlpts[1]-r.y,x=m/(v=Math.sqrt(m*m+y*y)),b=y/v,w=Math.max(n,i),k={x:E.ctrlpts[0]+2*x*w,y:E.ctrlpts[1]+2*b*w},T=o.intersectLine(r.x,r.y,a,s,k.x,k.y,0,l,e),p?(E.ctrlpts[0]=E.ctrlpts[0]+x*(u-d),E.ctrlpts[1]=E.ctrlpts[1]+b*(u-d)):(E.ctrlpts[0]=T[0]+x*u,E.ctrlpts[1]=T[1]+b*u)),g)&&this.findEndpoints(t)},storeAllpts:function(t){var e,r,n=t._private.rscratch;if("multibezier"===n.edgeType||"bezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType){n.allpts=[],n.allpts.push(n.startX,n.startY);for(var i,a=0;a+1<n.ctrlpts.length;a+=2)n.allpts.push(n.ctrlpts[a],n.ctrlpts[a+1]),a+3<n.ctrlpts.length&&n.allpts.push((n.ctrlpts[a]+n.ctrlpts[a+2])/2,(n.ctrlpts[a+1]+n.ctrlpts[a+3])/2);n.allpts.push(n.endX,n.endY),n.ctrlpts.length/2%2==0?(i=n.allpts.length/2-1,n.midX=n.allpts[i],n.midY=n.allpts[i+1]):(i=n.allpts.length/2-3,n.midX=drt(n.allpts[i],n.allpts[i+2],n.allpts[i+4],.5),n.midY=drt(n.allpts[i+1],n.allpts[i+3],n.allpts[i+5],.5))}else if("straight"===n.edgeType)n.allpts=[n.startX,n.startY,n.endX,n.endY],n.midX=(n.startX+n.endX+n.arrowStartX+n.arrowEndX)/4,n.midY=(n.startY+n.endY+n.arrowStartY+n.arrowEndY)/4;else if("segments"===n.edgeType){if(n.allpts=[],n.allpts.push(n.startX,n.startY),n.allpts.push.apply(n.allpts,n.segpts),n.allpts.push(n.endX,n.endY),n.isRound){n.roundCorners=[];for(var s=2;s+3<n.allpts.length;s+=2){var o=n.radii[s/2-1],l=n.isArcRadius[s/2-1];n.roundCorners.push(zQ({x:n.allpts[s-2],y:n.allpts[s-1]},{x:n.allpts[s],y:n.allpts[s+1],radius:o},{x:n.allpts[s+2],y:n.allpts[s+3]},o,l))}}n.segpts.length%4==0?(t=n.segpts.length/2,n.midX=(n.segpts[i=t-2]+n.segpts[t])/2,n.midY=(n.segpts[1+i]+n.segpts[1+t])/2):(i=n.segpts.length/2-1,n.isRound?(t=n.segpts[i],r=n.segpts[1+i],r=[t-(t=n.roundCorners[i/2]).cx,r-t.cy],e=t.radius/Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)),r=r.map(function(t){return t*e}),n.midX=t.cx+r[0],n.midY=t.cy+r[1],n.midVector=r):(n.midX=n.segpts[i],n.midY=n.segpts[1+i]))}},checkForInvalidEdgeWarning:function(t){var e=t[0]._private.rscratch;e.nodesOverlap||at(e.startX)&&at(e.startY)&&at(e.endX)&&at(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,_et("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},findEdgeControlPoints:function(t){var M=this;if(t&&0!==t.length){for(var D=this,O=D.cy.hasCompoundNodes(),P={map:new zet,get:me(function(t){var e=this.map.get(t[0]);return null!=e?e.get(t[1]):null},"get"),set:me(function(t,e){var r=this.map.get(t[0]);null==r&&(r=new zet,this.map.set(t[0],r)),r.set(t[1],e)},"set")},B=[],e=[],r=0;r<t.length;r++){var n,i,a=t[r],s=a._private,o=a.pstyle("curve-style").value;!a.removed()&&a.takesUpSpace()&&("haystack"===o?e.push(a):(n="unbundled-bezier"===o||o.endsWith("segments")||"straight"===o||"straight-triangle"===o||o.endsWith("taxi"),o="unbundled-bezier"===o||"bezier"===o,i=s.source,s=s.target,i=[i.poolIndex(),s.poolIndex()].sort(),null==(s=P.get(i))&&(P.set(i,s={eles:[]}),B.push(i)),s.eles.push(a),n&&(s.hasUnbundled=!0),o&&(s.hasBezier=!0)))}for(var l=me(function(t){var e=P.get(B[t]),r=void 0,n=(e.hasUnbundled||(t=e.eles[0].parallelEdges().filter(function(t){return t.isBundledBezier()}),Pet(e.eles),t.forEach(function(t){return e.eles.push(t)}),e.eles.sort(function(t,e){return t.poolIndex()-e.poolIndex()})),(t=e.eles[0]).source()),i=t.target(),a=(n.poolIndex()>i.poolIndex()&&(t=n,n=i,i=t),e.srcPos=n.position()),s=e.tgtPos=i.position(),o=e.srcW=n.outerWidth(),l=e.srcH=n.outerHeight(),c=e.tgtW=i.outerWidth(),h=e.tgtH=i.outerHeight(),u=e.srcShape=D.nodeShapes[M.getNodeShape(n)],d=e.tgtShape=D.nodeShapes[M.getNodeShape(i)],p=e.srcCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,g=e.tgtCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,f=e.tgtRs=i._private.rscratch,m=e.srcRs=n._private.rscratch;e.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y<e.eles.length;y++){var v,x,b,w,k,T,E,C,S,_=e.eles[y],A=_[0]._private.rscratch,L=_.pstyle("curve-style").value,N="unbundled-bezier"===L||L.endsWith("segments")||L.endsWith("taxi"),I=!n.same(_.source()),R=(e.calculatedIntersection||n===i||!e.hasBezier&&!e.hasUnbundled||(e.calculatedIntersection=!0,v=u.intersectLine(a.x,a.y,o,l,s.x,s.y,0,p,m),x=e.srcIntn=v,b=d.intersectLine(s.x,s.y,c,h,a.x,a.y,0,g,f),w=e.tgtIntn=b,k=e.intersectionPts={x1:v[0],x2:b[0],y1:v[1],y2:b[1]},T=e.posPts={x1:a.x,x2:s.x,y1:a.y,y2:s.y},C=b[1]-v[1],E=b[0]-v[0],R=Math.sqrt(E*E+C*C),E=e.vector={x:E,y:C},S={x:-(C=e.vectorNorm={x:E.x/R,y:E.y/R}).y,y:C.x},e.nodesOverlap=!at(R)||d.checkPoint(v[0],v[1],0,c,h,s.x,s.y,g,f)||u.checkPoint(b[0],b[1],0,o,l,a.x,a.y,p,m),e.vectorNormInverse=S,r={nodesOverlap:e.nodesOverlap,dirCounts:e.dirCounts,calculatedIntersection:!0,hasBezier:e.hasBezier,hasUnbundled:e.hasUnbundled,eles:e.eles,srcPos:s,srcRs:f,tgtPos:a,tgtRs:m,srcW:c,srcH:h,tgtW:o,tgtH:l,srcIntn:w,tgtIntn:x,srcShape:d,tgtShape:u,posPts:{x1:T.x2,y1:T.y2,x2:T.x1,y2:T.y1},intersectionPts:{x1:k.x2,y1:k.y2,x2:k.x1,y2:k.y1},vector:{x:-E.x,y:-E.y},vectorNorm:{x:-C.x,y:-C.y},vectorNormInverse:{x:-S.x,y:-S.y}}),I?r:e);A.nodesOverlap=R.nodesOverlap,A.srcIntn=R.srcIntn,A.tgtIntn=R.tgtIntn,A.isRound=L.startsWith("round"),O&&(n.isParent()||n.isChild()||i.isParent()||i.isChild())&&(n.parents().anySame(i)||i.parents().anySame(n)||n.same(i)&&n.isParent())?M.findCompoundLoopPoints(_,R,y,N):n===i?M.findLoopPoints(_,R,y,N):L.endsWith("segments")?M.findSegmentsPoints(_,R):L.endsWith("taxi")?M.findTaxiPoints(_,R):"straight"===L||!N&&e.eles.length%2==1&&y===Math.floor(e.eles.length/2)?M.findStraightEdgePoints(_):M.findBezierPoints(_,R,y,N,I),M.findEndpoints(_),M.tryToCorrectInvalidPoints(_,R),M.checkForInvalidEdgeWarning(_),M.storeAllpts(_),M.storeEdgeProjections(_),M.calculateArrowAngles(_),M.recalculateEdgeLabelProjections(_),M.calculateLabelAngles(_)}},"_loop"),c=0;c<B.length;c++)l(c);this.findHaystackPoints(e)}}},me(GQ,"getPts"),Yot.getSegmentPoints=function(t){var e=t[0]._private.rscratch;if(this.recalculateRenderedStyle(t),"segments"===e.edgeType)return GQ(e.segpts)},Yot.getControlPoints=function(t){var e=t[0]._private.rscratch;if(this.recalculateRenderedStyle(t),"bezier"===(t=e.edgeType)||"multibezier"===t||"self"===t||"compound"===t)return GQ(e.ctrlpts)},Yot.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}},Hot={manualEndptToPx:function(t,e){var r,n=t.position(),i=t.outerWidth(),a=t.outerHeight(),s=t._private.rscratch;return 2===e.value.length?(r=[e.pfValue[0],e.pfValue[1]],"%"===e.units[0]&&(r[0]=r[0]*i),"%"===e.units[1]&&(r[1]=r[1]*a),r[0]+=n.x,r[1]+=n.y,r):(r=e.pfValue[0],r=-Math.PI/2+r,e=2*Math.max(i,a),r=[n.x+Math.cos(r)*e,n.y+Math.sin(r)*e],this.nodeShapes[this.getNodeShape(t)].intersectLine(n.x,n.y,i,a,r[0],r[1],0,"auto"===t.pstyle("corner-radius").value?"auto":t.pstyle("corner-radius").pfValue,s))},findEndpoints:function(t){var e,r,n,i,a=t.source()[0],s=t.target()[0],o=a.position(),l=s.position(),c=t.pstyle("target-arrow-shape").value,h=t.pstyle("source-arrow-shape").value,u=t.pstyle("target-distance-from-node").pfValue,d=t.pstyle("source-distance-from-node").pfValue,p=a._private.rscratch,g=s._private.rscratch,f=t.pstyle("curve-style").value,m=t._private.rscratch,y="self"===(w=m.edgeType)||"compound"===w,v="bezier"===w||"multibezier"===w||y,x="bezier"!==w,b="straight"===w||"segments"===w,w="segments"===w,k=v||x||b,y=y||"taxi"===f,f=t.pstyle("source-endpoint"),T=y?"outside-to-node":f.value,E="auto"===a.pstyle("corner-radius").value?"auto":a.pstyle("corner-radius").pfValue,C=t.pstyle("target-endpoint"),y=y?"outside-to-node":C.value,S="auto"===s.pstyle("corner-radius").value?"auto":s.pstyle("corner-radius").pfValue,_=(m.srcManEndpt=f,m.tgtManEndpt=C,v?(v=[m.ctrlpts[0],m.ctrlpts[1]],i=x?[m.ctrlpts[m.ctrlpts.length-2],m.ctrlpts[m.ctrlpts.length-1]]:v,n=v):b&&(x=w?m.segpts.slice(0,2):[l.x,l.y],i=w?m.segpts.slice(m.segpts.length-2):[o.x,o.y],n=x),"inside-to-node"===y?e=[l.x,l.y]:C.units?e=this.manualEndptToPx(s,C):"outside-to-line"===y?e=m.tgtIntn:("outside-to-node"===y||"outside-to-node-or-label"===y?_=i:"outside-to-line"!==y&&"outside-to-line-or-label"!==y||(_=[o.x,o.y]),e=this.nodeShapes[this.getNodeShape(s)].intersectLine(l.x,l.y,s.outerWidth(),s.outerHeight(),_[0],_[1],0,S,g),"outside-to-node-or-label"!==y&&"outside-to-line-or-label"!==y||(b=(v=s._private.rscratch).labelWidth,w=v.labelX,x=v.labelY,C=b/2,S=v.labelHeight/2,"top"===(g=s.pstyle("text-valign").value)?x-=S:"bottom"===g&&(x+=S),"left"===(y=s.pstyle("text-halign").value)?w-=C:"right"===y&&(w+=C),0<(b=Yrt(_[0],_[1],[w-C,x-S,w+C,x-S,w+C,x+S,w-C,x+S],l.x,l.y)).length&&(g=hrt(v=o,trt(e)),(s=hrt(v,trt(b)))<(y=g)&&(e=b,y=s),2<b.length)&&hrt(v,{x:b[2],y:b[3]})<y&&(e=[b[2],b[3]]))),Vrt(e,i,this.arrowShapes[c].spacing(t)+u)),w=Vrt(e,i,this.arrowShapes[c].gap(t)+u),f=(m.endX=w[0],m.endY=w[1],m.arrowEndX=_[0],m.arrowEndY=_[1],"inside-to-node"===T?e=[o.x,o.y]:f.units?e=this.manualEndptToPx(a,f):"outside-to-line"===T?e=m.srcIntn:("outside-to-node"===T||"outside-to-node-or-label"===T?r=n:"outside-to-line"!==T&&"outside-to-line-or-label"!==T||(r=[l.x,l.y]),e=this.nodeShapes[this.getNodeShape(a)].intersectLine(o.x,o.y,a.outerWidth(),a.outerHeight(),r[0],r[1],0,E,p),"outside-to-node-or-label"!==T&&"outside-to-line-or-label"!==T||(x=(C=a._private.rscratch).labelWidth,S=C.labelX,g=C.labelY,s=x/2,v=C.labelHeight/2,"top"===(y=a.pstyle("text-valign").value)?g-=v:"bottom"===y&&(g+=v),"left"===(b=a.pstyle("text-halign").value)?S-=s:"right"===b&&(S+=s),0<(i=Yrt(r[0],r[1],[S-s,g-v,S+s,g-v,S+s,g+v,S-s,g+v],o.x,o.y)).length&&(u=hrt(c=l,trt(e)),(w=hrt(c,trt(i)))<(_=u)&&(e=[i[0],i[1]],_=w),2<i.length)&&hrt(c,{x:i[2],y:i[3]})<_&&(e=[i[2],i[3]]))),Vrt(e,n,this.arrowShapes[h].spacing(t)+d)),E=Vrt(e,n,this.arrowShapes[h].gap(t)+d);m.startX=E[0],m.startY=E[1],m.arrowStartX=f[0],m.arrowStartY=f[1],k&&(at(m.startX)&&at(m.startY)&&at(m.endX)&&at(m.endY)?m.badLine=!1:m.badLine=!0)},getSourceEndpoint:function(t){var e=t[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(t),e.edgeType)?{x:e.arrowStartX,y:e.arrowStartY}:{x:e.haystackPts[0],y:e.haystackPts[1]}},getTargetEndpoint:function(t){var e=t[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(t),e.edgeType)?{x:e.arrowEndX,y:e.arrowEndY}:{x:e.haystackPts[2],y:e.haystackPts[3]}}},Vot={},me(UQ,"pushBezierPts"),Vot.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,"multibezier"===n||"bezier"===n||"self"===n||"compound"===n){e.rstyle.bezierPts=[];for(var i=0;i+5<r.allpts.length;i+=4)UQ(this,t,r.allpts.slice(i,i+6))}else if("segments"===n)for(var a=e.rstyle.linePts=[],i=0;i+1<r.allpts.length;i+=2)a.push({x:r.allpts[i],y:r.allpts[i+1]});else"haystack"===n&&(n=r.haystackPts,e.rstyle.haystackPts=[{x:n[0],y:n[1]},{x:n[2],y:n[3]}]);e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},Vot.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)},Xot={recalculateNodeLabelProjection:function(t){var e=t.pstyle("label").strValue;if(!att(e)){var r,n,e=t._private,i=t.width(),a=t.height(),s=t.padding(),o=t.position(),l=t.pstyle("text-halign").strValue,c=t.pstyle("text-valign").strValue,h=e.rscratch,e=e.rstyle;switch(l){case"left":r=o.x-i/2-s;break;case"right":r=o.x+i/2+s;break;default:r=o.x}switch(c){case"top":n=o.y-a/2-s;break;case"bottom":n=o.y+a/2+s;break;default:n=o.y}h.labelX=r,h.labelY=n,e.labelX=r,e.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}}},bot=me(function(t,e){return e=Math.atan(e/t),0===t&&e<0&&(e*=-1),e},"lineAngleFromDelta"),wot=me(function(t,e){var r=e.x-t.x;return bot(r,e.y-t.y)},"lineAngle"),kot=me(function(t,e,r,n){var i=frt(0,n-.001,1),n=frt(0,n+.001,1),i=prt(t,e,r,i),t=prt(t,e,r,n);return wot(i,t)},"bezierAngle"),Xot.recalculateEdgeLabelProjections=function(E){var C,S,_,t,p=E._private,A=p.rscratch,g=this,L={mid:E.pstyle("label").strValue,source:E.pstyle("source-label").strValue,target:E.pstyle("target-label").strValue};(L.mid||L.source||L.target)&&(C={x:A.midX,y:A.midY},(S=me(function(t,e,r){Fet(p.rscratch,t,e,r),Fet(p.rstyle,t,e,r)},"setRs"))("labelX",null,C.x),S("labelY",null,C.y),t=bot(A.midDispX,A.midDispY),S("labelAutoAngle",null,t),_=me(function t(){if(t.cache)return t.cache;for(var e=[],r=0;r+5<A.allpts.length;r+=4){var n={x:A.allpts[r],y:A.allpts[r+1]},i={x:A.allpts[r+2],y:A.allpts[r+3]},a={x:A.allpts[r+4],y:A.allpts[r+5]};e.push({p0:n,p1:i,p2:a,startDist:0,length:0,segments:[]})}var s=p.rstyle.bezierPts,o=g.bezierProjPcts.length;function l(t,e,r,n,i){var a=crt(e,r),s=t.segments[t.segments.length-1],e={p0:e,p1:r,t0:n,t1:i,startDist:s?s.startDist+s.length:0,length:a};t.segments.push(e),t.length+=a}me(l,"addSegment");for(var c=0;c<e.length;c++){var h=e[c],u=e[c-1];u&&(h.startDist=u.startDist+u.length),l(h,h.p0,s[c*o],0,g.bezierProjPcts[0]);for(var d=0;d<o-1;d++)l(h,s[c*o+d],s[c*o+d+1],g.bezierProjPcts[d],g.bezierProjPcts[d+1]);l(h,s[c*o+o-1],h.p2,g.bezierProjPcts[o-1],1)}return t.cache=e},"createControlPointInfo"),(t=me(function(t){var e,r="source"===t;if(L[t]){var n=E.pstyle(t+"-text-offset").pfValue;switch(A.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var i,a=_(),s=0,o=0,l=0;l<a.length;l++){for(var c=a[r?l:a.length-1-l],h=0;h<c.segments.length;h++){var u=c.segments[r?h:c.segments.length-1-h],d=l===a.length-1&&h===c.segments.length-1,s=o;if(n<=(o+=u.length)||d){i={cp:c,segment:u};break}}if(i)break}var p=i.cp,g=(n-s)/(m=i.segment).length,f=m.t1-m.t0,m=r?m.t0+f*g:m.t1-f*g,m=frt(0,m,1);C=prt(p.p0,p.p1,p.p2,m),e=kot(p.p0,p.p1,p.p2,m);break;case"straight":case"segments":case"haystack":for(var y,v,x,b,w=0,k=A.allpts.length,T=0;T+3<k&&(b=r?(x={x:A.allpts[T],y:A.allpts[T+1]},{x:A.allpts[T+2],y:A.allpts[T+3]}):(x={x:A.allpts[k-2-T],y:A.allpts[k-1-T]},{x:A.allpts[k-4-T],y:A.allpts[k-3-T]}),v=w,!(n<=(w+=y=crt(x,b))));T+=2);f=frt(0,(n-v)/y,1),C=grt(x,b,f),e=wot(x,b)}S("labelX",t,C.x),S("labelY",t,C.y),S("labelAutoAngle",t,e)}},"calculateEndProjection"))("source"),t("target"),this.applyLabelDimensions(E))},Xot.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Xot.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),n=this.calculateLabelDimensions(t,n),i=t.pstyle("line-height").pfValue,t=t.pstyle("text-wrap").strValue,a=$et(r.rscratch,"labelWrapCachedLines",e)||[],t="wrap"!==t?1:Math.max(a.length,1),s=(a=n.height/t)*i,o=n.width,n=n.height+(t-1)*(i-1)*a;Fet(r.rstyle,"labelWidth",e,o),Fet(r.rscratch,"labelWidth",e,o),Fet(r.rstyle,"labelHeight",e,n),Fet(r.rscratch,"labelHeight",e,n),Fet(r.rscratch,"labelLineHeight",e,s)},Xot.getLabelText=function(t,r){var n=t._private,e=t.pstyle((r?r+"-":"")+"label").strValue,i=t.pstyle("text-transform").value,a=me(function(t,e){return e?(Fet(n.rscratch,t,r,e),e):$et(n.rscratch,t,r)},"rscratch");if(!e)return"";if("none"!=i&&("uppercase"==i?e=e.toUpperCase():"lowercase"==i&&(e=e.toLowerCase())),"wrap"===(i=t.pstyle("text-wrap").value)){var s=a("labelKey");if(null!=s&&a("labelWrapKey")===s)return a("labelWrapCachedText");for(var o=e.split(` +`),l=t.pstyle("text-max-width").pfValue,c="anywhere"===t.pstyle("text-overflow-wrap").value,h=[],u=/[\s\u200b]+|$/g,d=0;d<o.length;d++){var p=o[d],g=this.calculateLabelDimensions(t,p).width;if(c&&(p=p.split("").join("")),l<g){var f,m="",y=0,v=JK(p.matchAll(u));try{for(v.s();!(f=v.n()).done;){var x=f.value,b=x[0],w=p.substring(y,x.index),y=x.index+b.length,k=0===m.length?w:m+w+b;this.calculateLabelDimensions(t,k).width<=l?m+=w+b:(m&&h.push(m),m=w+b)}}catch(t){v.e(t)}finally{v.f()}m.match(/^[\s\u200b]+$/)||h.push(m)}else h.push(p)}a("labelWrapCachedLines",h),e=a("labelWrapCachedText",h.join(` +`)),a("labelWrapKey",s)}else if("ellipsis"===i){var T=t.pstyle("text-max-width").pfValue,E="",C=!1;if(this.calculateLabelDimensions(t,e).width<T)return e;for(var S=0;S<e.length&&!(T<this.calculateLabelDimensions(t,E+e[S]+"…").width);S++)E+=e[S],S===e.length-1&&(C=!0);return C||(E+="…"),E}return e},Xot.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(r){case"left":return"right";case"right":return"left";default:return"center"}},Xot.calculateLabelDimensions=function(t,e){var r=this.cy.window().document,n=pet(e,t._private.labelDimsKey),i=this.labelDimCache||(this.labelDimCache=[]);if(null!=(a=i[n]))return a;var a=t.pstyle("font-style").strValue,s=t.pstyle("font-size").pfValue,o=t.pstyle("font-family").strValue,t=t.pstyle("font-weight").strValue,l=this.labelCalcCanvas,c=this.labelCalcCanvasContext;l||(l=this.labelCalcCanvas=r.createElement("canvas"),c=this.labelCalcCanvasContext=l.getContext("2d"),(r=l.style).position="absolute",r.left="-9999px",r.top="-9999px",r.zIndex="-1",r.visibility="hidden",r.pointerEvents="none"),c.font="".concat(a," ").concat(t," ").concat(s,"px ").concat(o);for(var h=0,u=0,d=e.split(` +`),p=0;p<d.length;p++){var g=d[p],g=c.measureText(g),g=Math.ceil(g.width),f=s,h=Math.max(g,h);u+=f}return i[n]={width:h+=0,height:u+=0}},Xot.calculateLabelAngle=function(t,e){var r=t._private.rscratch,n=t.isEdge();return"none"===(e=(t=t.pstyle((e?e+"-":"")+"text-rotation")).strValue)?0:n&&"autorotate"===e?r.labelAutoAngle:"autorotate"===e?0:t.pfValue},Tot=!(Xot.calculateLabelAngles=function(t){var e=t.isEdge(),r=t._private.rscratch;r.labelAngle=this.calculateLabelAngle(t),e&&(r.sourceLabelAngle=this.calculateLabelAngle(t,"source"),r.targetLabelAngle=this.calculateLabelAngle(t,"target"))}),Eot={},[jot,Wot,Yot,Hot,Vot,Xot,{getNodeShape:function(t){var e=t.pstyle("shape").value;return"cutrectangle"===e&&(t.width()<28||t.height()<28)?(Tot||(_et("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Tot=!0),"rectangle"):t.isParent()?"rectangle"===e||"roundrectangle"===e||"round-rectangle"===e||"cutrectangle"===e||"cut-rectangle"===e||"barrel"===e?e:"rectangle":"polygon"===e?(t=t.pstyle("shape-polygon-points").value,this.nodeShapes.makePolygon(t).name):e}},{registerCalculationListeners:function(){var s=this.cy,o=s.collection(),l=this,c=me(function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(o.merge(t),e)for(var r=0;r<t.length;r++){var n=t[r]._private.rstyle;n.clean=!1,n.cleanConnected=!1}},"enqueue"),t=(l.binder(s).on("bounds.* dirty.*",me(function(t){t=t.target,c(t)},"onDirtyBounds")).on("style.* background.*",me(function(t){t=t.target,c(t,!1)},"onDirtyStyle")),me(function(t){if(t){var e=l.onUpdateEleCalcsFns;o.cleanStyle();for(var r=0;r<o.length;r++){var n=o[r],i=n._private.rstyle;n.isNode()&&!i.cleanConnected&&(c(n.connectedEdges()),i.cleanConnected=!0)}if(e)for(var a=0;a<e.length;a++)(0,e[a])(t,o);l.recalculateRenderedStyle(o),o=s.collection()}},"updateEleCalcs"));l.flushRenderedStyleQueue=function(){t(!0)},l.beforeRender(t,l.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(t){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(t)},recalculateRenderedStyle:function(t,e){var r=me(function(t){return t._private.rstyle.cleanConnected},"isCleanConnected"),n=[],i=[];if(!this.destroyed){void 0===e&&(e=!0);for(var a=0;a<t.length;a++){var s=t[a],o=s._private,l=o.rstyle;!s.isEdge()||r(s.source())&&r(s.target())||(l.clean=!1),e&&l.clean||s.removed()||"none"===s.pstyle("display").value||(("nodes"===o.group?i:n).push(s),l.clean=!0)}for(var c=0;c<i.length;c++){var h=i[c],u=h._private.rstyle,d=h.position();this.recalculateNodeLabelProjection(h),u.nodeX=d.x,u.nodeY=d.y,u.nodeW=h.pstyle("width").pfValue,u.nodeH=h.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var p=0;p<n.length;p++){var g=n[p]._private,f=g.rstyle;f.srcX=(g=g.rscratch).arrowStartX,f.srcY=g.arrowStartY,f.tgtX=g.arrowEndX,f.tgtY=g.arrowEndY,f.midX=g.midX,f.midY=g.midY,f.labelAngle=g.labelAngle,f.sourceLabelAngle=g.sourceLabelAngle,f.targetLabelAngle=g.targetLabelAngle}}}},{updateCachedGrabbedEles:function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=(i=t[r])._private.rscratch;(i.grabbed()&&!i.isParent()?e:n.inDragLayer?t.drag:t.nondrag).push(i)}for(r=0;r<e.length;r++){var i=e[r];t.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(t){var e;return t||!this.cachedZSortedEles?((e=this.cy.mutableElements().toArray()).sort(sst),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()):e=this.cachedZSortedEles,e}}].forEach(function(t){vtt(Eot,t)}),olt={getCachedImage:function(t,e,r){var n,i=this.imageCache=this.imageCache||{},a=i[t];return a?(a.image.complete||a.image.addEventListener("load",r),a.image):((n=(a=i[t]=i[t]||{}).image=new Image).addEventListener("load",r),n.addEventListener("error",function(){n.error=!0}),"data:"!==t.substring(0,"data:".length).toLowerCase()&&(n.crossOrigin=e="null"===e?null:e),n.src=t,n)}},glt={registerBinding:function(t,e,r,n){var i=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var a=[],s=0;s<t.length;s++){var o,l=t[s];void 0!==l&&(o=this.binder(l),a.push(o.on.apply(o,i)))}return a}return(o=this.binder(t)).on.apply(o,i)},binder:function(i){var a=this,t=a.cy.window(),s=i===t||i===t.document||i===t.document.body||stt(i);if(null==a.supportsPassiveEvents){var e=!1;try{var r=Object.defineProperty({},"passive",{get:me(function(){return e=!0},"get")});t.addEventListener("test",null,r)}catch{}a.supportsPassiveEvents=e}return{on:t=me(function(t,e,r){var n=Array.prototype.slice.call(arguments);return s&&a.supportsPassiveEvents&&(n[2]={capture:r??!1,passive:!1,once:!1}),a.bindings.push({target:i,args:n}),(i.addEventListener||i.on).apply(i,n),this},"on"),addEventListener:t,addListener:t,bind:t}},nodeIsDraggable:function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},nodeIsGrabbable:function(t){return this.nodeIsDraggable(t)&&t.interactive()},load:function(){var c,h,u,N=this,t=N.cy.window(),d=me(function(t){return t.selected()},"isSelected"),w=me(function(t){if((t=t.getRootNode())&&11===t.nodeType&&void 0!==t.host)return t},"getShadowRoot"),I=me(function(t,e,r,n){null==t&&(t=N.cy);for(var i=0;i<e.length;i++)t.emit({originalEvent:r,type:e[i],position:n})},"triggerEvents"),v=me(function(t){return t.shiftKey||t.metaKey||t.ctrlKey},"isMultSelKeyDown"),R=me(function(t,e){var r=!0;if(N.cy.hasCompoundNodes()&&t&&t.pannable()){for(var n=0;e&&n<e.length;n++)if((t=e[n]).isNode()&&t.isParent()&&!t.pannable()){r=!1;break}}else r=!0;return r},"allowPanningPassthrough"),k=me(function(t){t[0]._private.grabbed=!0},"setGrabbed"),T=me(function(t){t[0]._private.grabbed=!1},"setFreed"),n=me(function(t){t[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),E=me(function(t){t[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),C=me(function(t){t[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),S=me(function(t){t[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),i=me(function(t,e){(e=e.addToList).has(t)||!t.grabbable()||t.locked()||(e.merge(t),k(t))},"addToDragList"),_=me(function(t,e){!t.cy().hasCompoundNodes()||null==e.inDragLayer&&null==e.addToList||(t=t.descendants(),e.inDragLayer&&(t.forEach(n),t.connectedEdges().forEach(n)),e.addToList&&i(t,e))},"addDescendantsToDrag"),M=me(function(t,e){e=e||{};var r=t.cy().hasCompoundNodes();e.inDragLayer&&(t.forEach(n),t.neighborhood().stdFilter(function(t){return!r||t.isEdge()}).forEach(n)),e.addToList&&t.forEach(function(t){i(t,e)}),_(t,e),L(t,{inDragLayer:e.inDragLayer}),N.updateCachedGrabbedEles()},"addNodesToDrag"),A=M,D=me(function(t){t&&(N.getCachedZSortedEles().forEach(function(t){T(t),E(t),S(t)}),N.updateCachedGrabbedEles())},"freeDraggedElements"),L=me(function(t,e){var r;null==e.inDragLayer&&null==e.addToList||!t.cy().hasCompoundNodes()||(r=t.ancestors().orphans()).same(t)||(t=(r=r.descendants().spawnSelf().merge(r).unmerge(t).unmerge(t.descendants())).connectedEdges(),e.inDragLayer&&(t.forEach(n),r.forEach(n)),e.addToList&&r.forEach(function(t){i(t,e)}))},"updateAncestorsInDragLayer"),W=me(function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},"blurActiveDomElement"),e=typeof MutationObserver<"u",Y=typeof ResizeObserver<"u",r=(e?(N.removeObserver=new MutationObserver(function(t){for(var e=0;e<t.length;e++){var r=t[e].removedNodes;if(r)for(var n=0;n<r.length;n++)if(r[n]===N.container){N.destroy();break}}}),N.container.parentNode&&N.removeObserver.observe(N.container.parentNode,{childList:!0})):N.registerBinding(N.container,"DOMNodeRemoved",function(t){N.destroy()}),Jtt(function(){N.cy.resize()},100)),e=(e&&(N.styleObserver=new MutationObserver(r),N.styleObserver.observe(N.container,{attributes:!0})),N.registerBinding(t,"resize",r),Y&&(N.resizeObserver=new ResizeObserver(r),N.resizeObserver.observe(N.container)),me(function(t,e){for(;null!=t;)e(t),t=t.parentNode},"forEachUp")),a=me(function(){N.invalidateContainerClientCoordsCache()},"invalidateCoords"),H=(e(N.container,function(t){N.registerBinding(t,"transitionend",a),N.registerBinding(t,"animationend",a),N.registerBinding(t,"scroll",a)}),N.registerBinding(N.container,"contextmenu",function(t){t.preventDefault()}),me(function(){return 0!==N.selection[4]},"inBoxSelection")),O=me(function(t){for(var e=N.findContainerClientCoords(),r=e[0],n=e[1],i=e[2],a=e[3],s=t.touches||[t],o=!1,l=0;l<s.length;l++){var c=s[l];if(r<=c.clientX&&c.clientX<=r+i&&n<=c.clientY&&c.clientY<=n+a){o=!0;break}}if(!o)return!1;for(var h=N.container,u=t.target.parentNode,d=!1;u;){if(u===h){d=!0;break}u=u.parentNode}return!!d},"eventInContainer"),Y=(N.registerBinding(N.container,"mousedown",me(function(e){var t,r,n,i,a,s,o,l,c,h;!O(e)||1===N.hoverData.which&&1!==e.which||(e.preventDefault(),W(),N.hoverData.capture=!0,N.hoverData.which=e.which,t=N.cy,r=N.projectIntoViewport((s=[e.clientX,e.clientY])[0],s[1]),n=N.selection,a=(i=N.findNearestElements(r[0],r[1],!0,!1))[0],c=N.dragData.possibleDragElements,N.hoverData.mdownPos=r,N.hoverData.mdownGPos=s,s=me(function(){N.hoverData.tapholdCancelled=!1,clearTimeout(N.hoverData.tapholdTimeout),N.hoverData.tapholdTimeout=setTimeout(function(){N.hoverData.tapholdCancelled||(N.hoverData.down||t).emit({originalEvent:e,type:"taphold",position:{x:r[0],y:r[1]}})},N.tapholdDuration)},"checkForTaphold"),3==e.which?(N.hoverData.cxtStarted=!0,l={originalEvent:e,type:"cxttapstart",position:{x:r[0],y:r[1]}},a?(a.activate(),a.emit(l),N.hoverData.down=a):t.emit(l),N.hoverData.downTime=(new Date).getTime(),N.hoverData.cxtDragged=!1):1==e.which&&(a&&a.activate(),null!=a&&N.nodeIsGrabbable(a)&&(o=me(function(t){return{originalEvent:e,type:t,position:{x:r[0],y:r[1]}}},"makeEvent"),l=me(function(t){t.emit(o("grab"))},"triggerGrab"),C(a),a.selected()?(c=N.dragData.possibleDragElements=t.collection(),h=t.$(function(t){return t.isNode()&&t.selected()&&N.nodeIsGrabbable(t)}),M(h,{addToList:c}),a.emit(o("grabon")),h.forEach(l)):(c=N.dragData.possibleDragElements=t.collection(),A(a,{addToList:c}),a.emit(o("grabon")).emit(o("grab"))),N.redrawHint("eles",!0),N.redrawHint("drag",!0)),N.hoverData.down=a,N.hoverData.downs=i,N.hoverData.downTime=(new Date).getTime(),I(a,["mousedown","tapstart","vmousedown"],e,{x:r[0],y:r[1]}),null==a?(n[4]=1,N.data.bgActivePosistion={x:r[0],y:r[1]},N.redrawHint("select",!0),N.redraw()):a.pannable()&&(n[4]=1),s()),n[0]=n[2]=r[0],n[1]=n[3]=r[1])},"mousedownHandler"),!1),w(N.container)),V=(N.registerBinding([t,Y],"mousemove",me(function(t){if(N.hoverData.capture||O(t)){var e,r,n,i=!1,a=N.cy,s=a.zoom(),o=[t.clientX,t.clientY],l=N.projectIntoViewport(o[0],o[1]),c=N.hoverData.mdownPos,h=N.hoverData.mdownGPos,u=N.selection,d=null,p=(N.hoverData.draggingEles||N.hoverData.dragging||N.hoverData.selecting||(d=N.findNearestElement(l[0],l[1],!0,!1)),N.hoverData.last),g=N.hoverData.down,f=[l[0]-u[2],l[1]-u[3]],m=N.dragData.possibleDragElements,h=(h&&(e=o[0]-h[0],o=o[1]-h[1],N.hoverData.isOverThresholdDrag=e=e*e+o*o>=N.desktopTapThreshold2),v(t)),o=(e&&(N.hoverData.tapholdCancelled=!0),me(function(){var t=N.hoverData.dragDelta=N.hoverData.dragDelta||[];0===t.length?(t.push(f[0]),t.push(f[1])):(t[0]+=f[0],t[1]+=f[1])},"updateDragDelta")),y=(i=!0,I(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),me(function(){N.data.bgActivePosistion=void 0,N.hoverData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:l[0],y:l[1]}}),u[4]=1,N.hoverData.selecting=!0,N.redrawHint("select",!0),N.redraw()},"goIntoBoxMode"));if(3===N.hoverData.which?e&&(r={originalEvent:t,type:"cxtdrag",position:{x:l[0],y:l[1]}},(g||a).emit(r),N.hoverData.cxtDragged=!0,!N.hoverData.cxtOver||d!==N.hoverData.cxtOver)&&(N.hoverData.cxtOver&&N.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:l[0],y:l[1]}}),N.hoverData.cxtOver=d)&&d.emit({originalEvent:t,type:"cxtdragover",position:{x:l[0],y:l[1]}}):N.hoverData.dragging?(i=!0,a.panningEnabled()&&a.userPanningEnabled()&&(N.hoverData.justStartedPan?(r=N.hoverData.mdownPos,n={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},N.hoverData.justStartedPan=!1):n={x:f[0]*s,y:f[1]*s},a.panBy(n),a.emit("dragpan"),N.hoverData.dragged=!0),l=N.projectIntoViewport(t.clientX,t.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&I(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&I(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),N.hoverData.last=d),g&&(e?a.boxSelectionEnabled()&&h?(g&&g.grabbed()&&(D(m),g.emit("freeon"),m.emit("free"),N.dragData.didDrag)&&(g.emit("dragfreeon"),m.emit("dragfree")),y()):g&&g.grabbed()&&N.nodeIsDraggable(g)&&((r=!N.dragData.didDrag)&&N.redrawHint("eles",!0),N.dragData.didDrag=!0,N.hoverData.draggingEles||M(m,{inDragLayer:!0}),s={x:0,y:0},at(f[0])&&at(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((n=N.hoverData.dragDelta)&&at(n[0])&&at(n[1])&&(s.x+=n[0],s.y+=n[1])),N.hoverData.draggingEles=!0,m.silentShift(s).emit("position drag"),N.redrawHint("drag",!0),N.redraw()):o()),i=!0):e&&(N.hoverData.dragging||!a.boxSelectionEnabled()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!N.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&R(g,N.hoverData.downs)&&(N.hoverData.dragging=!0,N.hoverData.justStartedPan=!0,u[4]=0,N.data.bgActivePosistion=trt(c),N.redrawHint("select",!0),N.redraw()):y(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],i)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),N.registerBinding(t,"mouseup",me(function(t){var e,r,n,i,a,s,o,l;1===N.hoverData.which&&1!==t.which&&N.hoverData.capture||N.hoverData.capture&&(N.hoverData.capture=!1,e=N.cy,r=N.projectIntoViewport(t.clientX,t.clientY),n=N.selection,o=N.findNearestElement(r[0],r[1],!0,!1),i=N.dragData.possibleDragElements,a=N.hoverData.down,l=v(t),N.data.bgActivePosistion&&(N.redrawHint("select",!0),N.redraw()),N.hoverData.tapholdCancelled=!0,N.data.bgActivePosistion=void 0,a&&a.unactivate(),3===N.hoverData.which?(s={originalEvent:t,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||e).emit(s),N.hoverData.cxtDragged||(s={originalEvent:t,type:"cxttap",position:{x:r[0],y:r[1]}},(a||e).emit(s)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(o,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),h=!1,t.timeStamp-u<=e.multiClickDebounceTime()?(c&&clearTimeout(c),h=!0,u=null,I(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(c=setTimeout(function(){h||I(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),u=t.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||v(t)||(e.$(d).unselect(["tapunselect"]),0<i.length&&N.redrawHint("eles",!0),N.dragData.possibleDragElements=i=e.collection()),o!=a||N.dragData.didDrag||N.hoverData.selecting||null==o||!o._private.selectable||(N.hoverData.dragging||("additive"===e.selectionType()||l?o.selected()?o.unselect(["tapunselect"]):o.select(["tapselect"]):l||(e.$(d).unmerge(o).unselect(["tapunselect"]),o.select(["tapselect"]))),N.redrawHint("eles",!0)),N.hoverData.selecting&&(s=e.collection(N.getAllInBox(n[0],n[1],n[2],n[3])),N.redrawHint("select",!0),0<s.length&&N.redrawHint("eles",!0),e.emit({type:"boxend",originalEvent:t,position:{x:r[0],y:r[1]}}),o=me(function(t){return t.selectable()&&!t.selected()},"eleWouldBeSelected"),"additive"===e.selectionType()||l||e.$(d).unmerge(s).unselect(),s.emit("box").stdFilter(o).select().emit("boxselect"),N.redraw()),N.hoverData.dragging&&(N.hoverData.dragging=!1,N.redrawHint("select",!0),N.redrawHint("eles",!0),N.redraw()),n[4]||(N.redrawHint("drag",!0),N.redrawHint("eles",!0),l=a&&a.grabbed(),D(i),l&&(a.emit("freeon"),i.emit("free"),N.dragData.didDrag)&&(a.emit("dragfreeon"),i.emit("dragfree")))),n[4]=0,N.hoverData.down=null,N.hoverData.cxtStarted=!1,N.hoverData.draggingEles=!1,N.hoverData.selecting=!1,N.hoverData.isOverThresholdDrag=!1,N.dragData.didDrag=!1,N.hoverData.dragged=!1,N.hoverData.dragDelta=[],N.hoverData.mdownPos=null,N.hoverData.mdownGPos=null,N.hoverData.which=null)},"mouseupHandler"),!1),me(function(t){var e,r,n,i;N.scrollingPage||(n=(e=N.cy).zoom(),i=e.pan(),r=[(r=N.projectIntoViewport(t.clientX,t.clientY))[0]*n+i.x,r[1]*n+i.y],N.hoverData.draggingEles||N.hoverData.dragging||N.hoverData.cxtStarted||H()?t.preventDefault():e.panningEnabled()&&e.userPanningEnabled()&&e.zoomingEnabled()&&e.userZoomingEnabled()&&(t.preventDefault(),N.data.wheelZooming=!0,clearTimeout(N.data.wheelTimeout),N.data.wheelTimeout=setTimeout(function(){N.data.wheelZooming=!1,N.redrawHint("eles",!0),N.redraw()},150),n=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,n*=N.wheelSensitivity,1===t.deltaMode&&(n*=33),i=e.zoom()*Math.pow(10,n),"gesturechange"===t.type&&(i=N.gestureStartZoom*t.scale),e.zoom({level:i,renderedPosition:{x:r[0],y:r[1]}}),e.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")))},"wheelHandler"));N.registerBinding(N.container,"wheel",V,!0),N.registerBinding(t,"scroll",me(function(t){N.scrollingPage=!0,clearTimeout(N.scrollingPageTimeout),N.scrollingPageTimeout=setTimeout(function(){N.scrollingPage=!1},250)},"scrollHandler"),!0),N.registerBinding(N.container,"gesturestart",me(function(t){N.gestureStartZoom=N.cy.zoom(),N.hasTouchStarted||t.preventDefault()},"gestureStartHandler"),!0),N.registerBinding(N.container,"gesturechange",function(t){N.hasTouchStarted||V(t)},!0),N.registerBinding(N.container,"mouseout",me(function(t){var e=N.projectIntoViewport(t.clientX,t.clientY);N.cy.emit({originalEvent:t,type:"mouseout",position:{x:e[0],y:e[1]}})},"mouseOutHandler"),!1),N.registerBinding(N.container,"mouseover",me(function(t){var e=N.projectIntoViewport(t.clientX,t.clientY);N.cy.emit({originalEvent:t,type:"mouseover",position:{x:e[0],y:e[1]}})},"mouseOverHandler"),!1);var P,B,$,F,z,G,U,q,j,p,g,X,K,Z,Q,J,f,m,y,s,o,tt,et,l,rt,x,b,nt=me(function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))},"distance"),it=me(function(t,e,r,n){return(r-t)*(r-t)+(n-e)*(n-e)},"distanceSq");N.registerBinding(N.container,"touchstart",K=me(function(e){if(N.hasTouchStarted=!0,O(e)){W(),N.touchData.capture=!0,N.data.bgActivePosistion=void 0;var t,r,n,i=N.cy,a=N.touchData.now,s=N.touchData.earlier;if(e.touches[0]&&(t=N.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY),a[0]=t[0],a[1]=t[1]),e.touches[1]&&(t=N.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),a[2]=t[0],a[3]=t[1]),e.touches[2]&&(t=N.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),a[4]=t[0],a[5]=t[1]),e.touches[1]){N.touchData.singleTouchMoved=!0,D(N.dragData.touchDragEles);var o=N.findContainerClientCoords(),o=(q=o[0],j=o[1],p=o[2],g=o[3],P=e.touches[0].clientX-q,B=e.touches[0].clientY-j,$=e.touches[1].clientX-q,F=e.touches[1].clientY-j,X=0<=P&&P<=p&&0<=$&&$<=p&&0<=B&&B<=g&&0<=F&&F<=g,i.pan()),l=i.zoom();if(z=nt(P,B,$,F),G=it(P,B,$,F),U=[((p=[(P+$)/2,(B+F)/2])[0]-o.x)/l,(p[1]-o.y)/l],G<4e4&&!e.touches[2])return o=N.findNearestElement(a[0],a[1],!0,!0),l=N.findNearestElement(a[2],a[3],!0,!0),o&&o.isNode()?(o.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start=o):l&&l.isNode()?(l.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start=l):i.emit({originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxt=!0,N.touchData.cxtDragged=!1,N.data.bgActivePosistion=void 0,void N.redraw()}if(e.touches[2]?i.boxSelectionEnabled()&&e.preventDefault():e.touches[1]||e.touches[0]&&(null!=(l=(o=N.findNearestElements(a[0],a[1],!0,!0))[0])&&(l.activate(),N.touchData.start=l,N.touchData.starts=o,N.nodeIsGrabbable(l))&&(o=N.dragData.touchDragEles=i.collection(),N.redrawHint("eles",!(r=null)),N.redrawHint("drag",!0),l.selected()?(r=i.$(function(t){return t.selected()&&N.nodeIsGrabbable(t)}),M(r,{addToList:o})):A(l,{addToList:o}),C(l),n=me(function(t){return{originalEvent:e,type:t,position:{x:a[0],y:a[1]}}},"makeEvent"),l.emit(n("grabon")),r?r.forEach(function(t){t.emit(n("grab"))}):l.emit(n("grab"))),I(l,["touchstart","tapstart","vmousedown"],e,{x:a[0],y:a[1]}),null==l&&(N.data.bgActivePosistion={x:t[0],y:t[1]},N.redrawHint("select",!0),N.redraw()),N.touchData.singleTouchMoved=!1,N.touchData.singleTouchStartTime=+new Date,clearTimeout(N.touchData.tapholdTimeout),N.touchData.tapholdTimeout=setTimeout(function(){!1!==N.touchData.singleTouchMoved||N.pinching||N.touchData.selecting||I(N.touchData.start,["taphold"],e,{x:a[0],y:a[1]})},N.tapholdDuration)),1<=e.touches.length){for(var c=N.touchData.startPosition=[null,null,null,null,null,null],h=0;h<a.length;h++)c[h]=s[h]=a[h];i=e.touches[0],N.touchData.startGPosition=[i.clientX,i.clientY]}}},"touchstartHandler"),!1),N.registerBinding(t,"touchmove",Z=me(function(t){var e=N.touchData.capture;if(e||O(t)){var r=N.selection,n=N.cy,i=N.touchData.now,a=N.touchData.earlier,s=n.zoom(),o=(t.touches[0]&&(_=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),i[0]=_[0],i[1]=_[1]),t.touches[1]&&(_=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=_[0],i[3]=_[1]),t.touches[2]&&(_=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=_[0],i[5]=_[1]),N.touchData.startGPosition);if(e&&t.touches[0]&&o){for(var l=[],c=0;c<i.length;c++)l[c]=i[c]-a[c];var h=t.touches[0].clientX-o[0],u=t.touches[0].clientY-o[1],d=h*h+u*u>=N.touchTapThreshold2}if(e&&N.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-q,b=t.touches[0].clientY-j,w=t.touches[1].clientX-q,k=t.touches[1].clientY-j,2.25<=(o=it(x,b,w,k))/G||22500<=o)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),p={originalEvent:t,type:"cxttapend",position:{x:i[0],y:i[1]}},N.touchData.start?(N.touchData.start.unactivate().emit(p),N.touchData.start=null):n.emit(p)),e&&N.touchData.cxt){var p={originalEvent:t,type:"cxtdrag",position:{x:i[0],y:i[1]}},g=(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),(N.touchData.start||n).emit(p),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxtDragged=!0,N.findNearestElement(i[0],i[1],!0,!0));(!N.touchData.cxtOver||g!==N.touchData.cxtOver)&&(N.touchData.cxtOver&&N.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:i[0],y:i[1]}}),N.touchData.cxtOver=g)&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:i[0],y:i[1]}})}else if(e&&t.touches[2]&&n.boxSelectionEnabled())t.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||n.emit({originalEvent:t,type:"boxstart",position:{x:i[0],y:i[1]}}),N.touchData.selecting=!0,N.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(i[0]+i[2]+i[4])/3,r[3]=(i[1]+i[3]+i[5])/3):(r[0]=(i[0]+i[2]+i[4])/3,r[1]=(i[1]+i[3]+i[5])/3,r[2]=(i[0]+i[2]+i[4])/3+1,r[3]=(i[1]+i[3]+i[5])/3+1),N.redrawHint("select",!0),N.redraw();else if(e&&t.touches[1]&&!N.touchData.didSelect&&n.zoomingEnabled()&&n.panningEnabled()&&n.userZoomingEnabled()&&n.userPanningEnabled()){if(t.preventDefault(),N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),T=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var f=0;f<T.length;f++){var m=T[f]._private;m.grabbed=!1,m.rscratch.inDragLayer=!1}}var y,v,o=N.touchData.start,x=t.touches[0].clientX-q,b=t.touches[0].clientY-j,w=t.touches[1].clientX-q,k=t.touches[1].clientY-j,r=(p=nt(x,b,w,k))/z;X&&(v=(x-P+(w-$))/2,C=(b-B+(k-F))/2,r=(L=n.zoom())*r,E=n.pan(),A=U[0]*L+E.x,y=U[1]*L+E.y,v={x:-r/L*(A-E.x-v)+A,y:-r/L*(y-E.y-C)+y},o&&o.active()&&(T=N.dragData.touchDragEles,D(T),N.redrawHint("drag",!0),N.redrawHint("eles",!0),o.unactivate().emit("freeon"),T.emit("free"),N.dragData.didDrag)&&(o.emit("dragfreeon"),T.emit("dragfree")),n.viewport({zoom:r,pan:v,cancelOnFailedZoom:!0}),n.emit("pinchzoom"),z=p,P=x,B=b,$=w,F=k,N.pinching=!0),t.touches[0]&&(_=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),i[0]=_[0],i[1]=_[1]),t.touches[1]&&(_=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=_[0],i[3]=_[1]),t.touches[2]&&(_=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=_[0],i[5]=_[1])}else if(t.touches[0]&&!N.touchData.didSelect){var T,E,C,S,_,A=N.touchData.start,L=N.touchData.last;if(N.hoverData.draggingEles||N.swipePanning||(g=N.findNearestElement(i[0],i[1],!0,!0)),e&&null!=A&&t.preventDefault(),e&&null!=A&&N.nodeIsDraggable(A)&&(d?(T=N.dragData.touchDragEles,(E=!N.dragData.didDrag)&&M(T,{inDragLayer:!0}),N.dragData.didDrag=!0,C={x:0,y:0},at(l[0])&&at(l[1])&&(C.x+=l[0],C.y+=l[1],E)&&(N.redrawHint("eles",!0),(S=N.touchData.dragDelta)&&at(S[0])&&at(S[1])&&(C.x+=S[0],C.y+=S[1])),N.hoverData.draggingEles=!0,T.silentShift(C).emit("position drag"),N.redrawHint("drag",!0),N.touchData.startPosition[0]==a[0]&&N.touchData.startPosition[1]==a[1]&&N.redrawHint("eles",!0),N.redraw()):0===(S=N.touchData.dragDelta=N.touchData.dragDelta||[]).length?(S.push(l[0]),S.push(l[1])):(S[0]+=l[0],S[1]+=l[1])),I(A||g,["touchmove","tapdrag","vmousemove"],t,{x:i[0],y:i[1]}),A&&A.grabbed()||g==L||(L&&L.emit({originalEvent:t,type:"tapdragout",position:{x:i[0],y:i[1]}}),!g)||g.emit({originalEvent:t,type:"tapdragover",position:{x:i[0],y:i[1]}}),N.touchData.last=g,e)for(f=0;f<i.length;f++)i[f]&&N.touchData.startPosition[f]&&d&&(N.touchData.singleTouchMoved=!0);e&&(null==A||A.pannable())&&n.panningEnabled()&&n.userPanningEnabled()&&(R(A,N.touchData.starts)&&(t.preventDefault(),N.data.bgActivePosistion||(N.data.bgActivePosistion=trt(N.touchData.startPosition)),N.swipePanning?(n.panBy({x:l[0]*s,y:l[1]*s}),n.emit("dragpan")):d&&(N.swipePanning=!0,n.panBy({x:h*s,y:u*s}),n.emit("dragpan"),A)&&(A.unactivate(),N.redrawHint("select",!0),N.touchData.start=null)),_=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),i[0]=_[0],i[1]=_[1])}for(c=0;c<i.length;c++)a[c]=i[c];e&&0<t.touches.length&&!N.hoverData.draggingEles&&!N.swipePanning&&null!=N.data.bgActivePosistion&&(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),N.redraw())}},"touchmoveHandler"),!1),N.registerBinding(t,"touchcancel",Q=me(function(t){var e=N.touchData.start;N.touchData.capture=!1,e&&e.unactivate()},"touchcancelHandler")),N.registerBinding(t,"touchend",J=me(function(t){var e=N.touchData.start;if(N.touchData.capture){0===t.touches.length&&(N.touchData.capture=!1),t.preventDefault();var r,n=N.selection,i=(N.swipePanning=!1,N.hoverData.draggingEles=!1,N.cy),a=i.zoom(),s=N.touchData.now,o=N.touchData.earlier;if(t.touches[0]&&(r=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),s[0]=r[0],s[1]=r[1]),t.touches[1]&&(r=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),s[2]=r[0],s[3]=r[1]),t.touches[2]&&(r=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),s[4]=r[0],s[5]=r[1]),e&&e.unactivate(),N.touchData.cxt)r={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}},(e||i).emit(r),N.touchData.cxtDragged||(r={originalEvent:t,type:"cxttap",position:{x:s[0],y:s[1]}},(e||i).emit(r)),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxt=!1,N.touchData.start=null,N.redraw();else{!t.touches[2]&&i.boxSelectionEnabled()&&N.touchData.selecting&&(N.touchData.selecting=!1,r=i.collection(N.getAllInBox(n[0],n[1],n[2],n[3])),n[0]=void 0,n[1]=void 0,n[2]=void 0,n[3]=void 0,n[4]=0,N.redrawHint("select",!0),i.emit({type:"boxend",originalEvent:t,position:{x:s[0],y:s[1]}}),n=me(function(t){return t.selectable()&&!t.selected()},"eleWouldBeSelected"),r.emit("box").stdFilter(n).select().emit("boxselect"),r.nonempty()&&N.redrawHint("eles",!0),N.redraw()),e?.unactivate(),t.touches[2]?(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0)):t.touches[1]||t.touches[0]||(t.touches[0],N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),n=N.dragData.touchDragEles,null!=e?(r=e._private.grabbed,D(n),N.redrawHint("drag",!0),N.redrawHint("eles",!0),r&&(e.emit("freeon"),n.emit("free"),N.dragData.didDrag)&&(e.emit("dragfreeon"),n.emit("dragfree")),I(e,["touchend","tapend","vmouseup","tapdragout"],t,{x:s[0],y:s[1]}),e.unactivate(),N.touchData.start=null):(r=N.findNearestElement(s[0],s[1],!0,!0),I(r,["touchend","tapend","vmouseup","tapdragout"],t,{x:s[0],y:s[1]})),n=((n=N.touchData.startPosition[0]-s[0])*n+(r=N.touchData.startPosition[1]-s[1])*r)*a*a,N.touchData.singleTouchMoved||(e||i.$(":selected").unselect(["tapunselect"]),I(e,["tap","vclick"],t,{x:s[0],y:s[1]}),f=!1,t.timeStamp-y<=i.multiClickDebounceTime()?(m&&clearTimeout(m),f=!0,y=null,I(e,["dbltap","vdblclick"],t,{x:s[0],y:s[1]})):(m=setTimeout(function(){f||I(e,["onetap","voneclick"],t,{x:s[0],y:s[1]})},i.multiClickDebounceTime()),y=t.timeStamp)),null!=e&&!N.dragData.didDrag&&e._private.selectable&&n<N.touchTapThreshold2&&!N.pinching&&("single"===i.selectionType()?(i.$(d).unmerge(e).unselect(["tapunselect"]),e.select(["tapselect"])):e.selected()?e.unselect(["tapunselect"]):e.select(["tapselect"]),N.redrawHint("eles",!0)),N.touchData.singleTouchMoved=!0);for(var l=0;l<s.length;l++)o[l]=s[l];N.dragData.didDrag=!1,0===t.touches.length&&(N.touchData.dragDelta=[],N.touchData.startPosition=[null,null,null,null,null,null],N.touchData.startGPosition=null,N.touchData.didSelect=!1),t.touches.length<2&&(1===t.touches.length&&(N.touchData.startGPosition=[t.touches[0].clientX,t.touches[0].clientY]),N.pinching=!1,N.redrawHint("eles",!0),N.redraw())}}},"touchendHandler"),!1),"u"<typeof TouchEvent&&(s=[],o=me(function(t){return{clientX:t.clientX,clientY:t.clientY,force:1,identifier:t.pointerId,pageX:t.pageX,pageY:t.pageY,radiusX:t.width/2,radiusY:t.height/2,screenX:t.screenX,screenY:t.screenY,target:t.target}},"makeTouch"),tt=me(function(t){return{event:t,touch:o(t)}},"makePointer"),et=me(function(t){s.push(tt(t))},"addPointer"),l=me(function(t){for(var e=0;e<s.length;e++)if(s[e].event.pointerId===t.pointerId)return void s.splice(e,1)},"removePointer"),rt=me(function(e){var t=s.filter(function(t){return t.event.pointerId===e.pointerId})[0];t.event=e,t.touch=o(e)},"updatePointer"),x=me(function(t){t.touches=s.map(function(t){return t.touch})},"addTouchesToEvent"),b=me(function(t){return"mouse"===t.pointerType||4===t.pointerType},"pointerIsMouse"),N.registerBinding(N.container,"pointerdown",function(t){b(t)||(t.preventDefault(),et(t),x(t),K(t))}),N.registerBinding(N.container,"pointerup",function(t){b(t)||(l(t),x(t),J(t))}),N.registerBinding(N.container,"pointercancel",function(t){b(t)||(l(t),x(t),Q(t))}),N.registerBinding(N.container,"pointermove",function(t){b(t)||(t.preventDefault(),rt(t),x(t),Z(t))}))}},flt={generatePolygon:function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:me(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl("polygon",t,e,r,n,i,this.points)},"draw"),intersectLine:me(function(t,e,r,n,i,a,s,o){return Yrt(i,a,this.points,t,e,r/2,n/2,s)},"intersectLine"),checkPoint:me(function(t,e,r,n,i,a,s,o){return Brt(t,e,this.points,a,s,n,i,[0,-1],r)},"checkPoint")}},generateEllipse:function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:me(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},"draw"),intersectLine:me(function(t,e,r,n,i,a,s,o){return Grt(i,a,t,e,r/2+s,n/2+s)},"intersectLine"),checkPoint:me(function(t,e,r,n,i,a,s,o){return Urt(t,e,n,i,a,s,r)},"checkPoint")}},generateRoundPolygon:function(t,m){return this.nodeShapes[t]={renderer:this,name:t,points:m,getOrCreateCorners:me(function(t,e,r,n,i,a,s){if(void 0===a[s]||a[s+"-cx"]!==t||a[s+"-cy"]!==e){a[s]=new Array(m.length/2),a[s+"-cx"]=t,a[s+"-cy"]=e;var o=r/2,l=n/2;i="auto"===i?Jrt(r,n):i;for(var c=new Array(m.length/2),h=0;h<m.length/2;h++)c[h]={x:t+o*m[2*h],y:e+l*m[2*h+1]};for(var u,d,p=c.length,g=c[p-1],f=0;f<p;f++)u=c[f%p],d=c[(f+1)%p],a[s][f]=zQ(g,u,d,i),g=u}return a[s]},"getOrCreateCorners"),draw:me(function(t,e,r,n,i,a,s){this.renderer.nodeShapeImpl("round-polygon",t,e,r,n,i,this.points,this.getOrCreateCorners(e,r,n,i,a,s,"drawCorners"))},"draw"),intersectLine:me(function(t,e,r,n,i,a,s,o,l){return Hrt(i,a,this.points,t,e,r,n,s,this.getOrCreateCorners(t,e,r,n,o,l,"corners"))},"intersectLine"),checkPoint:me(function(t,e,r,n,i,a,s,o,l){return $rt(t,e,this.points,a,s,n,i,this.getOrCreateCorners(a,s,n,i,o,l,"corners"))},"checkPoint")}},generateRoundRectangle:function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Xrt(4,0),draw:me(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i,this.points,a)},"draw"),intersectLine:me(function(t,e,r,n,i,a,s,o){return Lrt(i,a,t,e,r,n,s,o)},"intersectLine"),checkPoint:me(function(t,e,r,n,i,a,s,o){var l=n/2,c=i/2,h=(o="auto"===o?Qrt(n,i):o,2*(o=Math.min(l,c,o)));return!!(Brt(t,e,this.points,a,s,n,i-h,[0,-1],r)||Brt(t,e,this.points,a,s,n-h,i,[0,-1],r)||Urt(t,e,h,h,a-l+o,s-c+o,r)||Urt(t,e,h,h,a+l-o,s-c+o,r)||Urt(t,e,h,h,a+l-o,s+c-o,r)||Urt(t,e,h,h,a-l+o,s+c-o,r))},"checkPoint")}},generateCutRectangle:function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:tnt(),points:Xrt(4,0),draw:me(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i,null,a)},"draw"),generateCutTrianglePts:me(function(t,e,r,n,i){var a=r-(t/=2),r=r+t;return{topLeft:[a,(t=n-(e/=2))+(i="auto"===i?this.cornerLength:i),a+i,t,a+i,t+i],topRight:[r-i,t,r,t+i,r-i,t+i],bottomRight:[r,(n+=e)-i,r-i,n,r-i,n-i],bottomLeft:[a+i,n,a,n-i,a+i,n-i]}},"generateCutTrianglePts"),intersectLine:me(function(t,e,r,n,i,a,s,o){return r=this.generateCutTrianglePts(r+2*s,n+2*s,t,e,o),n=[].concat.apply([],[r.topLeft.splice(0,4),r.topRight.splice(0,4),r.bottomRight.splice(0,4),r.bottomLeft.splice(0,4)]),Yrt(i,a,n,t,e)},"intersectLine"),checkPoint:me(function(t,e,r,n,i,a,s,o){return o="auto"===o?this.cornerLength:o,!(!Brt(t,e,this.points,a,s,n,i-2*o,[0,-1],r)&&!Brt(t,e,this.points,a,s,n-2*o,i,[0,-1],r))||(o=this.generateCutTrianglePts(n,i,a,s),Prt(t,e,o.topLeft))||Prt(t,e,o.topRight)||Prt(t,e,o.bottomRight)||Prt(t,e,o.bottomLeft)},"checkPoint")}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Xrt(4,0),draw:me(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},"draw"),intersectLine:me(function(t,e,r,n,i,a,s,o){return r=this.generateBarrelBezierPts(r+2*s,n+2*s,t,e),n=me(function(t){var e=prt({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.15),r=prt({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.5),n=prt({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.85);return[t[0],t[1],e.x,e.y,r.x,r.y,n.x,n.y,t[4],t[5]]},"approximateBarrelCurvePts"),s=[].concat(n(r.topLeft),n(r.topRight),n(r.bottomRight),n(r.bottomLeft)),Yrt(i,a,s,t,e)},"intersectLine"),generateBarrelBezierPts:me(function(t,e,r,n){var i=e/2,a=r-(s=t/2),r=r+s,s=n-i,n=n+i,e=(i=rnt(t,e)).heightOffset,o=i.widthOffset;return(t={topLeft:[a,s+e,a+(i=i.ctrlPtOffsetPct*t),s,a+o,s],topRight:[r-o,s,r-i,s,r,s+e],bottomRight:[r,n-e,r-i,n,r-o,n],bottomLeft:[a+o,n,a+i,n,a,n-e]}).topLeft.isTop=!0,t.topRight.isTop=!0,t.bottomLeft.isBottom=!0,t.bottomRight.isBottom=!0,t},"generateBarrelBezierPts"),checkPoint:me(function(t,e,r,n,i,a,s,o){var l=(c=rnt(n,i)).heightOffset,c=c.widthOffset;if(Brt(t,e,this.points,a,s,n,i-2*l,[0,-1],r)||Brt(t,e,this.points,a,s,n-2*c,i,[0,-1],r))return!0;for(var h=this.generateBarrelBezierPts(n,i,a,s),u=me(function(t,e,r){var n=r[4],i=r[2],a=r[0],s=r[5],r=r[1],o=Math.min(n,a),l=Math.max(n,a),c=Math.min(s,r),s=Math.max(s,r);return o<=t&&t<=l&&c<=e&&e<=s&&(r=ent(n,i,a),0<(o=Rrt(r[0],r[1],r[2],t).filter(function(t){return 0<=t&&t<=1})).length)?o[0]:null},"getCurveT"),d=Object.keys(h),p=0;p<d.length;p++){var g=h[d[p]],f=u(t,e,g);if(null!=f){var m=g[5],y=g[3],v=g[1],m=drt(m,y,v,f);if(g.isTop&&m<=e||g.isBottom&&e<=m)return!0}}return!1},"checkPoint")}},generateBottomRoundrectangle:function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Xrt(4,0),draw:me(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i,this.points,a)},"draw"),intersectLine:me(function(t,e,r,n,i,a,s,o){var l=e-(n/2+s);return 0<(l=Wrt(i,a,t,e,t-(r/2+s),l,t+(r/2+s),l,!1)).length?l:Lrt(i,a,t,e,r,n,s,o)},"intersectLine"),checkPoint:me(function(t,e,r,n,i,a,s,o){var l,c,h=2*(o="auto"===o?Qrt(n,i):o);return!(!Brt(t,e,this.points,a,s,n,i-h,[0,-1],r)&&!Brt(t,e,this.points,a,s,n-h,i,[0,-1],r)&&!(Prt(t,e,[a-(l=n/2+2*r),s-(c=i/2+2*r),a-l,s,a+l,s,a+l,s-c])||Urt(t,e,h,h,a+n/2-o,s+i/2-o,r)||Urt(t,e,h,h,a-n/2+o,s+i/2-o,r)))},"checkPoint")}},registerNodeShapes:function(){var t=this.nodeShapes={},r=this,e=(this.generateEllipse(),this.generatePolygon("triangle",Xrt(3,0)),this.generateRoundPolygon("round-triangle",Xrt(3,0)),this.generatePolygon("rectangle",Xrt(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle(),[0,1,1,0,0,-1,-1,0]),n=(this.generatePolygon("diamond",e),this.generateRoundPolygon("round-diamond",e),this.generatePolygon("pentagon",Xrt(5,0)),this.generateRoundPolygon("round-pentagon",Xrt(5,0)),this.generatePolygon("hexagon",Xrt(6,0)),this.generateRoundPolygon("round-hexagon",Xrt(6,0)),this.generatePolygon("heptagon",Xrt(7,0)),this.generateRoundPolygon("round-heptagon",Xrt(7,0)),this.generatePolygon("octagon",Xrt(8,0)),this.generateRoundPolygon("round-octagon",Xrt(8,0)),new Array(20)),i=Zrt(5,0),a=Zrt(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o<a.length/2;o++)a[2*o]*=s,a[2*o+1]*=s;for(o=0;o<5;o++)n[4*o]=i[2*o],n[4*o+1]=i[2*o+1],n[4*o+2]=a[2*o],n[4*o+3]=a[2*o+1];n=Krt(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]),this.generatePolygon("tag",e=[-1,-1,.25,-1,1,0,.25,1,-1,1]),this.generateRoundPolygon("round-tag",e),t.makePolygon=function(t){var e="polygon-"+t.join("$");return this[e]||r.generatePolygon(e,t)}}},mlt={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(t){t=t||Met(),void 0===this.averageRedrawTime&&(this.averageRedrawTime=0),void 0===this.lastRedrawTime&&(this.lastRedrawTime=0),void 0===this.lastDrawTime&&(this.lastDrawTime=0),this.requestedFrame=!0,this.renderOptions=t},beforeRender:function(t,e){var r;this.destroyed||(null==e&&Eet("Priority is not optional for beforeRender"),(r=this.beforeRenderCallbacks).push({fn:t,priority:e}),r.sort(function(t,e){return e.priority-t.priority}))}},Cot=me(function(t,e,r){for(var n=t.beforeRenderCallbacks,i=0;i<n.length;i++)n[i].fn(e,r)},"beforeRenderCallbacks"),mlt.startRenderLoop=function(){var t,i=this,a=i.cy;i.renderLoopStarted||(i.renderLoopStarted=!0,t=me(function t(e){var r,n;i.destroyed||(a.batching()||(i.requestedFrame&&!i.skipFrame?(Cot(i,!0,e),r=iet(),i.render(i.renderOptions),n=i.lastDrawTime=iet(),void 0===i.averageRedrawTime&&(i.averageRedrawTime=n-r),void 0===i.redrawCount&&(i.redrawCount=0),i.redrawCount++,void 0===i.redrawTotalTime&&(i.redrawTotalTime=0),i.redrawTotalTime+=n-=r,i.lastRedrawTime=n,i.averageRedrawTime=i.averageRedrawTime/2+n/2,i.requestedFrame=!1):Cot(i,!1,e)),i.skipFrame=!1,net(t))},"renderFn"),net(t))},Kot=me(function(t){this.init(t)},"BaseRenderer"),(_ot=(Sot=Kot).prototype).clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],_ot.init=function(t){var e,r,n,i,a=this,s=(a.options=t,a.cy=t.cy,a.container=t.cy.container()),o=a.cy.window();o&&(r=(e=o.document).head,n="__________cytoscape_container",i=null!=e.getElementById("__________cytoscape_stylesheet"),s.className.indexOf(n)<0&&(s.className=(s.className||"")+" "+n),i||((i=e.createElement("style")).id="__________cytoscape_stylesheet",i.textContent="."+n+" { position: relative; }",r.insertBefore(i,r.children[0])),"static"===o.getComputedStyle(s).getPropertyValue("position"))&&_et("A Cytoscape container has style position:static and so can not use UI extensions properly"),a.selection=[void 0,void 0,void 0,void 0,0],a.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],a.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},a.dragData={possibleDragElements:[]},a.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},a.redraws=0,a.showFps=t.showFps,a.debug=t.debug,a.webgl=t.webgl,a.hideEdgesOnViewport=t.hideEdgesOnViewport,a.textureOnViewport=t.textureOnViewport,a.wheelSensitivity=t.wheelSensitivity,a.motionBlurEnabled=t.motionBlur,a.forcedPixelRatio=at(t.pixelRatio)?t.pixelRatio:null,a.motionBlur=t.motionBlur,a.motionBlurOpacity=t.motionBlurOpacity,a.motionBlurTransparency=1-a.motionBlurOpacity,a.motionBlurPxRatio=1,a.mbPxRBlurry=1,a.minMbLowQualFrames=4,a.fullQualityMb=!1,a.clearedForMotionBlur=[],a.desktopTapThreshold=t.desktopTapThreshold,a.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,a.touchTapThreshold=t.touchTapThreshold,a.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,a.tapholdDuration=500,a.bindings=[],a.beforeRenderCallbacks=[],a.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},a.registerNodeShapes(),a.registerArrowShapes(),a.registerCalculationListeners()},_ot.notify=function(t,e){var r=this,n=r.cy;this.destroyed||("init"===t?r.load():"destroy"===t?r.destroy():(("add"===t||"remove"===t||"move"===t&&n.hasCompoundNodes()||"load"===t||"zorder"===t||"mount"===t)&&r.invalidateCachedZSortedEles(),"viewport"===t&&r.redrawHint("select",!0),"gc"===t&&r.redrawHint("gc",!0),"load"!==t&&"resize"!==t&&"mount"!==t||(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()))},_ot.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],n=r.target;(n.off||n.removeEventListener).apply(n,r.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}},_ot.isHeadless=function(){return!1},[slt,Eot,olt,glt,flt,mlt].forEach(function(t){vtt(_ot,t)}),Elt={setupDequeueing:me(function(f){return me(function(){var d,t,e,p=this,g=this.renderer;p.dequeueingSetup||(p.dequeueingSetup=!0,d=Jtt(function(){g.redrawHint("eles",!0),g.redrawHint("drag",!0),g.redraw()},f.deqRedrawThreshold),t=me(function(t,e){var r=iet(),n=g.averageRedrawTime,i=g.lastRedrawTime,a=[],s=g.cy.extent(),o=g.getPixelRatio();for(t||g.flushRenderedStyleQueue();;){var l=(c=iet())-r,c=c-e;if(i<1e3/60){if(c>=f.deqFastCost*(1e3/60-(t?n:0)))break}else if(t){if(l>=f.deqCost*i||l>=f.deqAvgCost*n)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,o,s);if(!(0<h.length))break;for(var u=0;u<h.length;u++)a.push(h[u])}0<a.length&&(f.onDeqd(p,a),!t)&&f.shouldRedraw(p,a,o,s)&&d()},"dequeue"),e=f.priority||Tet,g.beforeRender(t,e(p)))},"setupDequeueingImpl")},"setupDequeueing")},me(N,"ElementTextureCacheLookup"),GK(N,[{key:"getIdsFor",value:me(function(t){null==t&&Eet("Can not get id list for null key");var e=this.idsByKey,r=this.idsByKey.get(t);return r||(r=new Get,e.set(t,r)),r},"getIdsFor")},{key:"addIdForKey",value:me(function(t,e){null!=t&&this.getIdsFor(t).add(e)},"addIdForKey")},{key:"deleteIdForKey",value:me(function(t,e){null!=t&&this.getIdsFor(t).delete(e)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:me(function(t){return null==t?0:this.getIdsFor(t).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:me(function(t){var e=t.id(),r=this.keyForId.get(e),t=this.getKey(t);this.deleteIdForKey(r,e),this.addIdForKey(t,e),this.keyForId.set(e,t)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:me(function(t){var t=t.id(),e=this.keyForId.get(t);this.deleteIdForKey(e,t),this.keyForId.delete(t)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:me(function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)},"keyHasChangedFor")},{key:"isInvalid",value:me(function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)},"isInvalid")},{key:"getCachesAt",value:me(function(t){var e=this.cachesByLvl,r=this.lvls,n=e.get(t);return n||(n=new zet,e.set(t,n),r.push(t)),n},"getCachesAt")},{key:"getCache",value:me(function(t,e){return this.getCachesAt(e).get(t)},"getCache")},{key:"get",value:me(function(t,e){var r=this.getKey(t);return null!=(r=this.getCache(r,e))&&this.updateKeyMappingFor(t),r},"get")},{key:"getForCachedKey",value:me(function(t,e){return t=this.keyForId.get(t.id()),this.getCache(t,e)},"getForCachedKey")},{key:"hasCache",value:me(function(t,e){return this.getCachesAt(e).has(t)},"hasCache")},{key:"has",value:me(function(t,e){return t=this.getKey(t),this.hasCache(t,e)},"has")},{key:"setCache",value:me(function(t,e,r){r.key=t,this.getCachesAt(e).set(t,r)},"setCache")},{key:"set",value:me(function(t,e,r){var n=this.getKey(t);this.setCache(n,e,r),this.updateKeyMappingFor(t)},"set")},{key:"deleteCache",value:me(function(t,e){this.getCachesAt(e).delete(t)},"deleteCache")},{key:"delete",value:me(function(t,e){t=this.getKey(t),this.deleteCache(t,e)},"_delete")},{key:"invalidateKey",value:me(function(e){var r=this;this.lvls.forEach(function(t){return r.deleteCache(e,t)})},"invalidateKey")},{key:"invalidate",value:me(function(t){var e=t.id(),e=this.keyForId.get(e);return this.deleteKeyMappingFor(t),(t=this.doesEleInvalidateKey(t))&&this.invalidateKey(e),t||0===this.getNumberOfIdsForKey(e)},"invalidate")}]),Aot=N,Lot={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Not=Det({getKey:null,doesEleInvalidateKey:wet,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:bet,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Iot=me(function(t,e){this.renderer=t,this.onDequeues=[],t=Not(e),vtt(this,t),this.lookup=new Aot(t.getKey,t.doesEleInvalidateKey),this.setupDequeueing()},"ElementTextureCache"),(xlt=Iot.prototype).reasons=Lot,xlt.getTextureQueue=function(t){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[t]=this.eleImgCaches[t]||[]},xlt.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},xlt.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new qet(function(t,e){return e.reqs-t.reqs})},xlt.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},xlt.getElement=function(t,e,r,n,i){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if((n=null==n?Math.ceil(ort(o*r)):n)<-4)n=-4;else if(7.99<=o||3<n)return null;var o=Math.pow(2,n),c=e.h*o,h=e.w*o,u=s.eleTextBiggerThanMin(t,o);if(!this.isVisible(t,u))return null;if((s=l.get(t,n))&&s.invalidated&&(s.invalidated=!1,s.texture.invalidatedWidth-=s.width),!s){var d=c<=25?25:c<=50?50:50*Math.ceil(c/50);if(1024<c||1024<h)return null;var p=(m=a.getTextureQueue(d))[m.length-2],g=me(function(){return a.recycleTexture(d,h)||a.addTexture(d,h)},"addNewTxr");(p=(p=p||m[m.length-1])||g()).width-p.usedWidth<h&&(p=g());for(var f,m=me(function(t){return t&&t.scaledLabelShown===u},"scalableFrom"),g=i&&i===Lot.dequeue,y=i&&i===Lot.highQuality,i=i&&i===Lot.downscale,v=n+1;v<=3;v++){var x=l.get(t,v);if(x){f=x;break}}var b,w=f&&f.level===n+1?f:null,k=me(function(){p.context.drawImage(w.texture.canvas,w.x,0,w.width,w.height,p.usedWidth,0,h,c)},"downscale");if(p.context.setTransform(1,0,0,1,0,0),p.context.clearRect(p.usedWidth,0,h,d),m(w))k();else if(m(f)){if(!y)return a.queueElement(t,f.level-1),f;for(var T=f.level;n<T;T--)w=a.getElement(t,e,r,T,Lot.downscale);k()}else{if(!g&&!y&&!i)for(var E=n-1;-4<=E;E--){var C=l.get(t,E);if(C){b=C;break}}if(m(b))return a.queueElement(t,n),b;p.context.translate(p.usedWidth,0),p.context.scale(o,o),this.drawElement(p.context,t,e,u,!1),p.context.scale(1/o,1/o),p.context.translate(-p.usedWidth,0)}s={x:p.usedWidth,texture:p,level:n,scale:o,width:h,height:c,scaledLabelShown:u},p.usedWidth+=Math.ceil(8+h),p.eleCaches.push(s),l.set(t,n,s),a.checkTextureFullness(p)}return s},xlt.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])},xlt.invalidateElement=function(t){var e=this.lookup,r=[];if(e.isInvalid(t)){for(var n=-4;n<=3;n++){var i=e.getForCachedKey(t,n);i&&r.push(i)}if(e.invalidate(t))for(var a=0;a<r.length;a++){var s=r[a],o=s.texture;o.invalidatedWidth+=s.width,s.invalidated=!0,this.checkTextureUtility(o)}this.removeFromQueue(t)}},xlt.checkTextureUtility=function(t){t.invalidatedWidth>=.2*t.width&&this.retireTexture(t)},xlt.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);.8<t.usedWidth/t.width&&10<=t.fullnessChecks?Oet(e,t):t.fullnessChecks++},xlt.retireTexture=function(t){var e=t.height,r=this.getTextureQueue(e),n=this.lookup;Oet(r,t),t.retired=!0;for(var i=t.eleCaches,a=0;a<i.length;a++){var s=i[a];n.deleteCache(s.key,s.level)}Pet(i),this.getRetiredTextureQueue(e).push(t)},xlt.addTexture=function(t,e){var r={};return this.getTextureQueue(t).push(r),r.eleCaches=[],r.height=t,r.width=Math.max(1024,e),r.usedWidth=0,r.invalidatedWidth=0,r.fullnessChecks=0,r.canvas=this.renderer.makeOffscreenCanvas(r.width,r.height),r.context=r.canvas.getContext("2d"),r},xlt.recycleTexture=function(t,e){for(var r=this.getTextureQueue(t),n=this.getRetiredTextureQueue(t),i=0;i<n.length;i++){var a=n[i];if(a.width>=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,Pet(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),Oet(n,a),r.push(a),a}},xlt.queueElement=function(t,e){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a?(a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,r.updateItem(a)):(a={eles:t.spawn().merge(t),level:e,reqs:1,key:i},r.push(a),n[i]=a)},xlt.dequeue=function(t){for(var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=[],i=this.lookup,a=0;a<1&&0<e.size();a++){var s=e.pop(),o=s.key,l=s.eles[0],c=i.hasCache(l,s.level);r[o]=null,c||(n.push(s),o=this.getBoundingBox(l),this.getElement(l,o,t,s.level,Lot.dequeue))}return n},xlt.removeFromQueue=function(t){var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=this.getKey(t),i=r[n];null!=i&&(1===i.eles.length?(i.reqs=xet,e.updateItem(i),e.pop(),r[n]=null):i.eles.unmerge(t))},xlt.onDequeue=function(t){this.onDequeues.push(t)},xlt.offDequeue=function(t){Oet(this.onDequeues,t)},xlt.setupDequeueing=Elt.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:me(function(t,e,r){return t.dequeue(e,r)},"deq"),onDeqd:me(function(t,e){for(var r=0;r<t.onDequeues.length;r++)(0,t.onDequeues[r])(e)},"onDeqd"),shouldRedraw:me(function(t,e,r,n){for(var i=0;i<e.length;i++)for(var a=e[i].eles,s=0;s<a.length;s++){var o=a[s].boundingBox();if(Crt(o,n))return!0}return!1},"shouldRedraw"),priority:me(function(t){return t.renderer.beforeRenderPriorities.eleTxrDeq},"priority")}),Rot=me(function(t){var r=this,e=(t=r.renderer=t).cy,e=(r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=iet()-500,r.skipping=!1,r.eleTxrDeqs=e.collection(),r.scheduleElementRefinement=Jtt(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},50),t.beforeRender(function(t,e){e-r.lastInvalidationTime<=250?r.skipping=!0:r.skipping=!1},t.beforeRenderPriorities.lyrTxrSkip),me(function(t,e){return e.reqs-t.reqs},"qSort"));r.layersQueue=new qet(e),r.setupDequeueing()},"LayeredTextureCache"),Tlt=Rot.prototype,Mot=0,Dot=Math.pow(2,53)-1,Tlt.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),i=Math.ceil(t.h*r),a=this.renderer.makeOffscreenCanvas(n,i),e=(t={id:Mot=++Mot%Dot,bb:t,level:e,width:n,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0}).context,n=-t.bb.x1,i=-t.bb.y1;return e.scale(r,r),e.translate(n,i),t},Tlt.getLayers=function(i,t,a){var s=this,e=s.renderer.cy.zoom(),r=s.firstGet;if(s.firstGet=!1,null==a)if((a=Math.ceil(ort(e*t)))<-4)a=-4;else if(3.99<=e||2<a)return null;s.validateLayersElesOrdering(a,i);var o,l,c=s.layersByLevel,h=Math.pow(2,a),u=c[a]=c[a]||[],e=s.levelIsComplete(a,i),n=me(function(){var r=me(function(t){if(s.validateLayersElesOrdering(t,i),s.levelIsComplete(t,i))return l=c[t],!0},"canUseAsTmpLvl"),t=me(function(t){if(!l)for(var e=a+t;-4<=e&&e<=2&&!r(e);e+=t);},"checkLvls");t(1),t(-1);for(var e=u.length-1;0<=e;e--){var n=u[e];n.invalid&&Oet(u,n)}},"checkTempLevels");if(e)return u;n();var d=me(function(){if(!o){o=mrt();for(var t=0;t<i.length;t++)brt(o,i[t].boundingBox())}return o},"getBb"),p=me(function(t){var e=(t=t||{}).after,r=(d(),Math.ceil(o.w*h)),n=Math.ceil(o.h*h);return 32767<r||32767<n||16e6<r*n?null:(r=s.makeLayer(o,a),null!=e?(n=u.indexOf(e)+1,u.splice(n,0,r)):void 0!==t.insert&&!t.insert||u.unshift(r),r)},"makeLayer");if(s.skipping&&!r)return null;for(var g=null,f=+i.length,m=!r,y=0;y<i.length;y++){var v=i[y],x=v._private.rscratch,b=(x=x.imgLayerCaches=x.imgLayerCaches||{})[a];if(b)g=b;else{if((!g||g.eles.length>=f||!Art(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,t),g.eles.push(v),x[a]=g}}return l||(m?null:u)},Tlt.getEleLevelForLayerLevel=function(t,e){return t},Tlt.drawEleInLayer=function(t,e,r,n){var i=this.renderer,t=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(t,!1),i.drawCachedElement(t,e,null,null,r,!0),i.setImgSmoothing(t,!0))},Tlt.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var n=0,i=0;i<r.length;i++){var a=r[i];if(0<a.reqs||a.invalid)return!1;n+=a.eles.length}return n===e.length},Tlt.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=-1,s=0;s<e.length;s++)if(i.eles[0]===e[s]){a=s;break}if(a<0)this.invalidateLayer(i);else for(var o=a,s=0;s<i.eles.length;s++)if(i.eles[s]!==e[o+s]){this.invalidateLayer(i);break}}},Tlt.updateElementsInLayers=function(t,e){for(var r=ttt(t[0]),n=0;n<t.length;n++)for(var i=r?null:t[n],a=r?t[n]:t[n].ele,s=a._private.rscratch,o=s.imgLayerCaches=s.imgLayerCaches||{},l=-4;l<=2;l++){var c=o[l];!c||i&&this.getEleLevelForLayerLevel(c.level)!==i.level||e(c,a,i)}},Tlt.haveLayers=function(){for(var t=!1,e=-4;e<=2;e++){var r=this.layersByLevel[e];if(r&&0<r.length){t=!0;break}}return t},Tlt.invalidateElements=function(t){var n=this;0!==t.length&&(n.lastInvalidationTime=iet(),0!==t.length)&&n.haveLayers()&&n.updateElementsInLayers(t,me(function(t,e,r){n.invalidateLayer(t)},"invalAssocLayers"))},Tlt.invalidateLayer=function(t){if(this.lastInvalidationTime=iet(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];Oet(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i<r.length;i++){var a=r[i]._private.rscratch.imgLayerCaches;a&&(a[e]=null)}}},Tlt.refineElementTextures=function(t){var a=this;a.updateElementsInLayers(t,me(function(t,e,r){var n=t.replacement;if(n||((n=t.replacement=a.makeLayer(t.bb,t.level)).replaces=t,n.eles=t.eles),!n.reqs)for(var i=0;i<n.eles.length;i++)a.queueLayer(n,n.eles[i])},"refineEachEle"))},Tlt.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},Tlt.queueLayer=function(t,e){var r=this.layersQueue,n=t.elesQueue,i=n.hasId=n.hasId||{};if(!t.replacement){if(e){if(i[e.id()])return;n.push(e),i[e.id()]=!0}t.reqs?(t.reqs++,r.updateItem(t)):(t.reqs=1,r.push(t))}},Tlt.dequeue=function(t){for(var e=this.layersQueue,r=[],n=0;n<1&&0!==e.size();){var i,a=e.peek();a.replacement||a.replaces&&a!==a.replaces.replacement||a.invalid?e.pop():((i=a.elesQueue.shift())&&(this.drawEleInLayer(a,i,a.level,t),n++),0===r.length&&r.push(!0),0===a.elesQueue.length&&(e.pop(),a.reqs=0,a.replaces&&this.applyLayerReplacement(a),this.requestRedraw()))}return r},Tlt.applyLayerReplacement=function(t){var e=this.layersByLevel[t.level],r=t.replaces,n=e.indexOf(r);if(!(n<0||r.invalid)){e[n]=t;for(var i=0;i<t.eles.length;i++){var a=t.eles[i]._private;(a=a.imgLayerCaches=a.imgLayerCaches||{})&&(a[t.level]=t)}this.requestRedraw()}},Tlt.requestRedraw=Jtt(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),Tlt.setupDequeueing=Elt.setupDequeueing({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:me(function(t,e){return t.dequeue(e)},"deq"),onDeqd:Tet,shouldRedraw:bet,priority:me(function(t){return t.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")}),Oot={},me(qQ,"polygon"),me(jQ,"triangleBackcurve"),me(WQ,"triangleTee"),me(YQ,"circleTriangle"),me(HQ,"circle"),Oot.arrowShapeImpl=function(t){return(Pot=Pot||{polygon:qQ,"triangle-backcurve":jQ,"triangle-tee":WQ,"circle-triangle":YQ,"triangle-cross":WQ,circle:HQ})[t]},Bot={drawElement:function(t,e,r,n,i,a){e.isNode()?this.drawNode(t,e,r,n,i,a):this.drawEdge(t,e,r,n,i,a)},drawElementOverlay:function(t,e){e.isNode()?this.drawNodeOverlay(t,e):this.drawEdgeOverlay(t,e)},drawElementUnderlay:function(t,e){e.isNode()?this.drawNodeUnderlay(t,e):this.drawEdgeUnderlay(t,e)},drawCachedElementPortion:function(t,e,r,n,i,a,s,o){var l,c,h,u,d,p,g,f=r.getBoundingBox(e);0!==f.w&&0!==f.h&&(null!=(n=r.getElement(e,f,n,i,a))?0!==(i=o(this,e))&&(a=s(this,e),o=f.x1,s=f.y1,l=f.w,f=f.h,p=0!==a?(h=(u=r.getRotationPoint(e)).x,t.translate(h,u=u.y),t.rotate(a),(c=this.getImgSmoothing(t))||this.setImgSmoothing(t,!0),d=(p=r.getRotationOffset(e)).x,p.y):(d=o,s),1!==i&&(g=t.globalAlpha,t.globalAlpha=g*i),t.drawImage(n.texture.canvas,n.x,0,n.width,n.height,d,p,l,f),1!==i&&(t.globalAlpha=g),0!==a)&&(t.rotate(-a),t.translate(-h,-u),c||this.setImgSmoothing(t,!1)):r.drawElement(t,e))}},$ot=me(function(){return 0},"getZeroRotation"),Fot=me(function(t,e){return t.getTextAngle(e,null)},"getLabelRotation"),zot=me(function(t,e){return t.getTextAngle(e,"source")},"getSourceLabelRotation"),Got=me(function(t,e){return t.getTextAngle(e,"target")},"getTargetLabelRotation"),Uot=me(function(t,e){return e.effectiveOpacity()},"getOpacity"),qot=me(function(t,e){return e.pstyle("text-opacity").pfValue*e.effectiveOpacity()},"getTextOpacity"),Bot.drawCachedElement=function(t,e,r,n,i,a){var s=(c=this.data).eleTxrCache,o=c.lblTxrCache,l=c.slbTxrCache,c=c.tlbTxrCache,h=e.boundingBox(),a=!0===a?s.reasons.highQuality:null;0===h.w||0===h.h||!e.visible()||n&&!Crt(h,n)||(h=e.isEdge(),n=e.element()._private.rscratch.badLine,this.drawElementUnderlay(t,e),this.drawCachedElementPortion(t,e,s,r,i,a,$ot,Uot),h&&n||this.drawCachedElementPortion(t,e,o,r,i,a,Fot,qot),h&&!n&&(this.drawCachedElementPortion(t,e,l,r,i,a,zot,qot),this.drawCachedElementPortion(t,e,c,r,i,a,Got,qot)),this.drawElementOverlay(t,e))},Bot.drawElements=function(t,e){for(var r=0;r<e.length;r++)this.drawElement(t,e[r])},Bot.drawCachedElements=function(t,e,r,n){for(var i=0;i<e.length;i++)this.drawCachedElement(t,e[i],r,n)},Bot.drawCachedNodes=function(t,e,r,n){for(var i=0;i<e.length;i++){var a=e[i];a.isNode()&&this.drawCachedElement(t,a,r,n)}},Bot.drawLayeredElements=function(t,e,r,n){var i=this.data.lyrTxrCache.getLayers(e,r);if(i)for(var a=0;a<i.length;a++){var s=i[a],o=s.bb;0!==o.w&&0!==o.h&&t.drawImage(s.canvas,o.x1,o.y1,o.w,o.h)}else this.drawCachedElements(t,e,r,n)},jot={drawEdge:function(e,r,t){var n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],w=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],k=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],T=this,E=r._private.rscratch;k&&!r.visible()||E.badLine||null==E.allpts||isNaN(E.allpts[0])||(t&&e.translate(-(n=t).x1,-n.y1),d=k?r.pstyle("opacity").value:1,k=k?r.pstyle("line-opacity").value:1,i=r.pstyle("curve-style").value,a=r.pstyle("line-style").value,s=r.pstyle("width").pfValue,o=r.pstyle("line-cap").value,l=r.pstyle("line-outline-width").value,c=r.pstyle("line-outline-color").value,u=h=d*k,d=me(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;"straight-triangle"===i?(T.eleStrokeStyle(e,r,t),T.drawEdgeTrianglePath(r,e,E.allpts)):(e.lineWidth=s,e.lineCap=o,T.eleStrokeStyle(e,r,t),T.drawEdgePath(r,e,E.allpts,a),e.lineCap="butt")},"drawLine"),k=me(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;e.lineWidth=s+l,e.lineCap=o,0<l?(T.colorStrokeStyle(e,c[0],c[1],c[2],t),"straight-triangle"===i?T.drawEdgeTrianglePath(r,e,E.allpts):(T.drawEdgePath(r,e,E.allpts,a),e.lineCap="butt")):e.lineCap="butt"},"drawLineOutline"),p=me(function(){w&&T.drawEdgeOverlay(e,r)},"drawOverlay"),g=me(function(){w&&T.drawEdgeUnderlay(e,r)},"drawUnderlay"),f=me(function(){T.drawArrowheads(e,r,0<arguments.length&&void 0!==arguments[0]?arguments[0]:u)},"drawArrows"),m=me(function(){T.drawElementText(e,r,null,b)},"drawText"),e.lineJoin="round","yes"===r.pstyle("ghost").value?(y=r.pstyle("ghost-offset-x").pfValue,v=r.pstyle("ghost-offset-y").pfValue,x=r.pstyle("ghost-opacity").value,x*=h,e.translate(y,v),d(x),f(x),e.translate(-y,-v)):k(),g(),d(),f(),p(),m(),t&&e.translate(n.x1,n.y1))}},Wot=me(function(o){if(["overlay","underlay"].includes(o))return function(t,e){var r,n,i,a,s;e.visible()&&0!==(r=e.pstyle("".concat(o,"-opacity")).value)&&(n=this.usePaths(),i=e._private.rscratch,a=2*e.pstyle("".concat(o,"-padding")).pfValue,s=e.pstyle("".concat(o,"-color")).value,t.lineWidth=a,"self"!==i.edgeType||n?t.lineCap="round":t.lineCap="butt",this.colorStrokeStyle(t,s[0],s[1],s[2],r),this.drawEdgePath(e,t,i.allpts,"solid"))};throw new Error("Invalid state")},"drawEdgeOverlayUnderlay"),jot.drawEdgeOverlay=Wot("overlay"),jot.drawEdgeUnderlay=Wot("underlay"),jot.drawEdgePath=function(t,e,r,n){var i,a=t._private.rscratch,s=e,o=!1,l=this.usePaths(),c=t.pstyle("line-dash-pattern").pfValue,h=t.pstyle("line-dash-offset").pfValue;if(l&&(t=r.join("$"),a.pathCacheKey&&a.pathCacheKey===t?(i=e=a.pathCache,o=!0):(i=e=new Path2D,a.pathCacheKey=t,a.pathCache=i)),s.setLineDash)switch(n){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(c),s.lineDashOffset=h;break;case"solid":s.setLineDash([])}if(!o&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var u=2;u+3<r.length;u+=4)e.quadraticCurveTo(r[u],r[u+1],r[u+2],r[u+3]);break;case"straight":case"haystack":for(var d=2;d+1<r.length;d+=2)e.lineTo(r[d],r[d+1]);break;case"segments":if(a.isRound){var p,g=JK(a.roundCorners);try{for(g.s();!(p=g.n()).done;)FQ(e,p.value)}catch(t){g.e(t)}finally{g.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var f=2;f+1<r.length;f+=2)e.lineTo(r[f],r[f+1])}e=s,l?e.stroke(i):e.stroke(),e.setLineDash&&e.setLineDash([])},jot.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle("width").pfValue,i=0;i+1<r.length;i+=2){var a=[r[i+2]-r[i],r[i+3]-r[i+1]],s=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[(a=[a[1]/s,-a[0]/s])[0]*n/2,a[1]*n/2];e.beginPath(),e.moveTo(r[i]-s[0],r[i+1]-s[1]),e.lineTo(r[i]+s[0],r[i+1]+s[1]),e.lineTo(r[i+2],r[i+3]),e.closePath(),e.fill()}},jot.drawArrowheads=function(t,e,r){var n=e._private.rscratch,i="haystack"===n.edgeType;i||this.drawArrowhead(t,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),i||this.drawArrowhead(t,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)},jot.drawArrowhead=function(t,e,r,n,i,a,s){var o,l,c,h,u,d,p;isNaN(n)||null==n||isNaN(i)||null==i||isNaN(a)||null==a||"none"!==(o=e.pstyle(r+"-arrow-shape").value)&&(l="hollow"===e.pstyle(r+"-arrow-fill").value?"both":"filled",c=e.pstyle(r+"-arrow-fill").value,h=e.pstyle("width").pfValue,u="match-line"===(p=e.pstyle(r+"-arrow-width")).value?h:p.pfValue,"%"===p.units&&(u*=h),p=e.pstyle("opacity").value,d=t.globalCompositeOperation,1===(s=void 0===s?p:s)&&"hollow"!==c||(t.globalCompositeOperation="destination-out",this.colorFillStyle(t,255,255,255,1),this.colorStrokeStyle(t,255,255,255,1),this.drawArrowShape(e,t,l,h,o,u,n,i,a),t.globalCompositeOperation=d),p=e.pstyle(r+"-arrow-color").value,this.colorFillStyle(t,p[0],p[1],p[2],s),this.colorStrokeStyle(t,p[0],p[1],p[2],s),this.drawArrowShape(e,t,c,h,o,u,n,i,a))},jot.drawArrowShape=function(t,e,r,n,i,a,s,o,l){var c,h,u,d=this.usePaths()&&"triangle-cross"!==i,p=!1,g=e,f={x:s,y:o},t=t.pstyle("arrow-scale").value,t=this.getArrowWidth(n,t),m=this.arrowShapes[i];d&&(null!=(u=(h=this.arrowPathCache=this.arrowPathCache||[])[i=pet(i)])?(c=e=u,p=!0):(c=e=new Path2D,h[i]=c)),p||(e.beginPath&&e.beginPath(),d?m.draw(e,1,0,{x:0,y:0},1):m.draw(e,t,l,f,n),e.closePath&&e.closePath()),e=g,d&&(e.translate(s,o),e.rotate(l),e.scale(t,t)),"filled"!==r&&"both"!==r||(d?e.fill(c):e.fill()),"hollow"!==r&&"both"!==r||(e.lineWidth=a/(d?t:1),e.lineJoin="miter",d?e.stroke(c):e.stroke()),d&&(e.scale(1/t,1/t),e.rotate(-l),e.translate(-s,-o))},Yot={safeDrawImage:function(t,e,r,n,i,a,s,o,l,c){if(!(i<=0||a<=0||l<=0||c<=0))try{t.drawImage(e,r,n,i,a,s,o,l,c)}catch(t){_et(t)}},drawInscribedImage:function(t,e,r,n,i){var a,s,o,l=(c=r.position()).x,c=c.y,h=r.cy().style(),u=(h=h.getIndexedStyle.bind(h))(r,"background-fit","value",n),d=h(r,"background-repeat","value",n),p=r.width(),g=r.height(),f=2*r.padding(),p=p+("inner"===h(r,"background-width-relative-to","value",n)?0:f),g=g+("inner"===h(r,"background-height-relative-to","value",n)?0:f),f=r._private.rscratch,m="node"===h(r,"background-clip","value",n),i=h(r,"background-image-opacity","value",n)*i,y=h(r,"background-image-smoothing","value",n),v=r.pstyle("corner-radius").value,x=("auto"!==v&&(v=r.pstyle("corner-radius").pfValue),e.width||e.cachedW),b=e.height||e.cachedH,w=(null!=x&&null!=b||(document.body.appendChild(e),x=e.cachedW=e.width||e.offsetWidth,b=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e)),x),k=b;"auto"!==h(r,"background-width","value",n)&&(w="%"===h(r,"background-width","units",n)?h(r,"background-width","pfValue",n)*p:h(r,"background-width","pfValue",n)),"auto"!==h(r,"background-height","value",n)&&(k="%"===h(r,"background-height","units",n)?h(r,"background-height","pfValue",n)*g:h(r,"background-height","pfValue",n)),0!==w&&0!==k&&("contain"===u?(w*=a=Math.min(p/w,g/k),k*=a):"cover"===u&&(w*=a=Math.max(p/w,g/k),k*=a),u=l-p/2,a=h(r,"background-position-x","units",n),s=h(r,"background-position-x","pfValue",n),u+="%"===a?(p-w)*s:s,a=h(r,"background-offset-x","units",n),s=h(r,"background-offset-x","pfValue",n),u+="%"===a?(p-w)*s:s,a=c-g/2,s=h(r,"background-position-y","units",n),o=h(r,"background-position-y","pfValue",n),a+="%"===s?(g-k)*o:o,s=h(r,"background-offset-y","units",n),o=h(r,"background-offset-y","pfValue",n),a+="%"===s?(g-k)*o:o,f.pathCache&&(u-=l,a-=c,c=l=0),h=t.globalAlpha,t.globalAlpha=i,n=this.getImgSmoothing(t),s=!1,"no"===y&&n?(this.setImgSmoothing(t,!1),s=!0):"yes"!==y||n||(this.setImgSmoothing(t,!0),s=!0),"no-repeat"===d?(m&&(t.save(),f.pathCache?t.clip(f.pathCache):(this.nodeShapes[this.getNodeShape(r)].draw(t,l,c,p,g,v,f),t.clip())),this.safeDrawImage(t,e,0,0,x,b,u,a,w,k),m&&t.restore()):(o=t.createPattern(e,d),t.fillStyle=o,this.nodeShapes[this.getNodeShape(r)].draw(t,l,c,p,g,v,f),t.translate(u,a),t.fill(),t.translate(-u,-a)),t.globalAlpha=h,s)&&this.setImgSmoothing(t,n)}},Hot={eleTextBiggerThanMin:function(t,e){var r,n;return e||(n=t.cy().zoom(),r=this.getPixelRatio(),n=Math.ceil(ort(n*r)),e=Math.pow(2,n)),!(t.pstyle("font-size").pfValue*e<t.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(t,e,r,n,i){var a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];if(null==n){if(a&&!this.eleTextBiggerThanMin(e))return}else if(!1===n)return;if(e.isNode()){if(!(n=e.pstyle("label"))||!n.value)return;n=this.getLabelJustification(e),t.textAlign=n}else{var n=e.element()._private.rscratch.badLine,s=e.pstyle("label"),o=e.pstyle("source-label"),l=e.pstyle("target-label");if(n||(!s||!s.value)&&(!o||!o.value)&&(!l||!l.value))return;t.textAlign="center"}t.textBaseline="bottom";var c,n=!r;r&&t.translate(-(c=r).x1,-c.y1),null==i?(this.drawText(t,e,null,n,a),e.isEdge()&&(this.drawText(t,e,"source",n,a),this.drawText(t,e,"target",n,a))):this.drawText(t,e,i,n,a),r&&t.translate(c.x1,c.y1)},getFontCache:function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if((e=this.fontCaches[r]).context===t)return e;return this.fontCaches.push(e={context:t}),e},setupTextStyle:function(t,e){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,r=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,o=e.pstyle("text-outline-opacity").value*r,l=e.pstyle("color").value,e=e.pstyle("text-outline-color").value;t.font=n+" "+s+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,l[0],l[1],l[2],r),this.colorStrokeStyle(t,e[0],e[1],e[2],o)}},me(VQ,"roundRect"),Hot.getTextAngle=function(t,e){var r=t._private.rscratch,n=t.pstyle((e?e+"-":"")+"text-rotation");return"autorotate"===n.strValue?(r=$et(r,"labelAngle",e),t.isEdge()?r:0):"none"===n.strValue?0:n.pfValue},Hot.drawText=function(t,e,r){var n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],i=e._private.rscratch,a=(u=!(4<arguments.length&&void 0!==arguments[4])||arguments[4])?e.effectiveOpacity():1;if(!u||0!==a&&0!==e.pstyle("text-opacity").value){var s,o,l=$et(i,"labelX",r="main"===r?null:r),c=$et(i,"labelY",r),h=this.getLabelText(e,r);if(null!=h&&""!==h&&!isNaN(l)&&!isNaN(c)){this.setupTextStyle(t,e,u);var u=r?r+"-":"",d=$et(i,"labelWidth",r),p=$et(i,"labelHeight",r),g=e.pstyle(u+"text-margin-x").pfValue,u=e.pstyle(u+"text-margin-y").pfValue,f=e.isEdge(),m=e.pstyle("text-halign").value,y=e.pstyle("text-valign").value;switch(f&&(y=m="center"),l+=g,c+=u,0!==(f=n?this.getTextAngle(e,r):0)&&(s=l,o=c,t.translate(s,o),t.rotate(f),c=l=0),y){case"top":break;case"center":c+=p/2;break;case"bottom":c+=p}var g=e.pstyle("text-background-opacity").value,u=e.pstyle("text-border-opacity").value,v=e.pstyle("text-border-width").pfValue,n=e.pstyle("text-background-padding").pfValue,x=0===e.pstyle("text-background-shape").strValue.indexOf("round");if(0<g||0<v&&0<u){var b=l-n;switch(m){case"left":b-=d;break;case"center":b-=d/2}var w=c-p-n,k=d+2*n,n=p+2*n;if(0<g&&(E=t.fillStyle,T=e.pstyle("text-background-color").value,t.fillStyle="rgba("+T[0]+","+T[1]+","+T[2]+","+g*a+")",x?VQ(t,b,w,k,n,2):t.fillRect(b,w,k,n),t.fillStyle=E),0<v&&0<u){var T=t.strokeStyle,g=t.lineWidth,E=e.pstyle("text-border-color").value,C=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+E[0]+","+E[1]+","+E[2]+","+u*a+")",t.lineWidth=v,t.setLineDash)switch(C){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=v/4,t.setLineDash([]);break;case"solid":t.setLineDash([])}x?VQ(t,b,w,k,n,2,"stroke"):t.strokeRect(b,w,k,n),"double"===C&&(E=v/2,x?VQ(t,b+E,w+E,k-2*E,n-2*E,2,"stroke"):t.strokeRect(b+E,w+E,k-2*E,n-2*E)),t.setLineDash&&t.setLineDash([]),t.lineWidth=g,t.strokeStyle=T}}var S=2*e.pstyle("text-outline-width").pfValue;if(0<S&&(t.lineWidth=S),"wrap"===e.pstyle("text-wrap").value){var _=$et(i,"labelWrapCachedLines",r),A=$et(i,"labelLineHeight",r),u=d/2;switch("auto"!==(a=this.getLabelJustification(e))&&("left"===m?"left"===a?l+=-d:"center"===a&&(l+=-u):"center"===m?"left"===a?l+=-u:"right"===a&&(l+=u):"right"===m&&("center"===a?l+=u:"right"===a&&(l+=d))),y){case"top":c-=(_.length-1)*A;break;case"center":case"bottom":c-=(_.length-1)*A}for(var L=0;L<_.length;L++)0<S&&t.strokeText(_[L],l,c),t.fillText(_[L],l,c),c+=A}else 0<S&&t.strokeText(h,l,c),t.fillText(h,l,c);0!==f&&(t.rotate(-f),t.translate(-s,-o))}}},Vot={drawNode:function(T,E,t){var O=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],e=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],r=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],C=this,s=E._private,o=s.rscratch,S=E.position();if(at(S.x)&&at(S.y)&&(!r||E.visible())){var n,l=r?E.effectiveOpacity():1,_=C.usePaths(),i=!1,r=E.padding(),A=E.width()+2*r,L=E.height()+2*r;t&&T.translate(-(n=t).x1,-n.y1);for(var a=E.pstyle("background-image").value,c=new Array(a.length),h=new Array(a.length),P=0,u=0;u<a.length;u++){var B,d=a[u];(c[u]=null!=d&&"none"!==d)&&(B=E.cy().style().getIndexedStyle(E,"background-image-crossorigin","value",u),P++,h[u]=C.getCachedImage(d,B,function(){s.backgroundTimestamp=Date.now(),E.emitAndNotify("background")}))}var p,g,f,m,y,v=E.pstyle("background-blacken").value,N=E.pstyle("border-width").pfValue,$=E.pstyle("background-opacity").value*l,x=E.pstyle("border-color").value,F=E.pstyle("border-style").value,z=E.pstyle("border-join").value,G=E.pstyle("border-cap").value,I=E.pstyle("border-position").value,U=E.pstyle("border-dash-pattern").pfValue,q=E.pstyle("border-dash-offset").pfValue,j=E.pstyle("border-opacity").value*l,R=E.pstyle("outline-width").pfValue,b=E.pstyle("outline-color").value,W=E.pstyle("outline-style").value,Y=E.pstyle("outline-opacity").value*l,M=E.pstyle("outline-offset").value,D=E.pstyle("corner-radius").value,r=("auto"!==D&&(D=E.pstyle("corner-radius").pfValue),me(function(){C.eleFillStyle(T,E,0<arguments.length&&void 0!==arguments[0]?arguments[0]:$)},"setupShapeColor")),H=me(function(){C.colorStrokeStyle(T,x[0],x[1],x[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:j)},"setupBorderColor"),V=me(function(){C.colorStrokeStyle(T,b[0],b[1],b[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:Y)},"setupOutlineColor"),X=me(function(t,e,r,n){var i,a=C.nodePathCache=C.nodePathCache||[],n=get("polygon"===r?r+","+n.join(","):r,""+e,""+t,""+D),e=!1;return null!=(r=a[n])?(e=!0,o.pathCache=i=r):(i=new Path2D,a[n]=o.pathCache=i),{path:i,cacheHit:e}},"getPath"),w=E.pstyle("shape").strValue,k=E.pstyle("shape-polygon-points").pfValue,k=(_&&(T.translate(S.x,S.y),w=X(A,L,w,k),p=w.path,i=w.cacheHit),me(function(){var t;i||(t=_?{x:0,y:0}:S,C.nodeShapes[C.getNodeShape(E)].draw(p||T,t.x,t.y,A,L,D,o)),_?T.fill(p):T.fill()},"drawShape")),w=me(function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:l,e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=s.backgrounding,n=0,i=0;i<h.length;i++){var a=E.cy().style().getIndexedStyle(E,"background-image-containment","value",i);e&&"over"===a||!e&&"inside"===a?n++:c[i]&&h[i].complete&&!h[i].error&&(n++,C.drawInscribedImage(T,h[i],E,i,t))}s.backgrounding=n!==P,r!==s.backgrounding&&E.updateStyle(!1)},"drawImages"),K=me(function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;C.hasPie(E)&&(C.drawPie(T,E,e),t)&&(_||C.nodeShapes[C.getNodeShape(E)].draw(T,S.x,S.y,A,L,D,o))},"drawPie"),Z=me(function(){var t=0<v?0:255;0!==v&&(C.colorFillStyle(T,t,t,t,(0<v?v:-v)*(0<arguments.length&&void 0!==arguments[0]?arguments[0]:l)),_?T.fill(p):T.fill())},"darken"),Q=me(function(){if(0<N){if(T.lineWidth=N,T.lineCap=G,T.lineJoin=z,T.setLineDash)switch(F){case"dotted":T.setLineDash([1,1]);break;case"dashed":T.setLineDash(U),T.lineDashOffset=q;break;case"solid":case"double":T.setLineDash([])}var t;"center"!==I?(T.save(),T.lineWidth*=2,"inside"===I?_?T.clip(p):T.clip():((t=new Path2D).rect(-A/2-N,-L/2-N,A+2*N,L+2*N),t.addPath(p),T.clip(t,"evenodd")),_?T.stroke(p):T.stroke(),T.restore()):_?T.stroke(p):T.stroke(),"double"===F&&(T.lineWidth=N/3,t=T.globalCompositeOperation,T.globalCompositeOperation="destination-out",_?T.stroke(p):T.stroke(),T.globalCompositeOperation=t),T.setLineDash&&T.setLineDash([])}},"drawBorder"),J=me(function(){if(0<R){if(T.lineWidth=R,T.lineCap="butt",T.setLineDash)switch(W){case"dotted":T.setLineDash([1,1]);break;case"dashed":T.setLineDash([4,2]);break;case"solid":case"double":T.setLineDash([])}var t,e=S,r=(_&&(e={x:0,y:0}),C.getNodeShape(E)),n="inside"===I?0:N,i=("outside"===I&&(n*=2),(A+n+(R+M))/A),a=(L+n+(R+M))/L,s=A*i,o=L*a,l=C.nodeShapes[r].points;if(_&&(t=X(s,o,r,l).path),"ellipse"===r)C.drawEllipsePath(t||T,e.x,e.y,s,o);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(r)){var c=0,h=0,u=0;"round-diamond"===r?c=1.4*(n+M+R):"round-heptagon"===r?(c=1.075*(n+M+R),u=-(n/2+M+R)/35):"round-hexagon"===r?c=1.12*(n+M+R):"round-pentagon"===r?(c=1.13*(n+M+R),u=-(n/2+M+R)/15):"round-tag"===r?(c=1.12*(n+M+R),h=.07*(n/2+R+M)):"round-triangle"===r&&(c=(n+M+R)*(Math.PI/2),u=-(n+M/2+R)/Math.PI),0!==c&&(s=A*(i=(A+c)/A),["round-hexagon","round-tag"].includes(r)||(o=L*(a=(L+c)/L)));for(var d=s/2,p=o/2,g=(D="auto"===D?Jrt(s,o):D)+(n+R+M)/2,f=new Array(l.length/2),m=new Array(l.length/2),y=0;y<l.length/2;y++)f[y]={x:e.x+h+d*l[2*y],y:e.y+u+p*l[2*y+1]};for(var v,x,b=f.length,w=f[b-1],k=0;k<b;k++)v=f[k%b],x=f[(k+1)%b],m[k]=zQ(w,v,x,g),w=v;C.drawRoundPolygonPath(t||T,e.x+h,e.y+u,A*i,L*a,l,m)}else["roundrectangle","round-rectangle"].includes(r)?(D="auto"===D?Qrt(s,o):D,C.drawRoundRectanglePath(t||T,e.x,e.y,s,o,D+(n+R+M)/2)):["cutrectangle","cut-rectangle"].includes(r)?(D="auto"===D?tnt():D,C.drawCutRectanglePath(t||T,e.x,e.y,s,o,null,D+(n+R+M)/4)):["bottomroundrectangle","bottom-round-rectangle"].includes(r)?(D="auto"===D?Qrt(s,o):D,C.drawBottomRoundRectanglePath(t||T,e.x,e.y,s,o,D+(n+R+M)/2)):"barrel"===r?C.drawBarrelPath(t||T,e.x,e.y,s,o):(l=r.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(r)?Frt(zrt(l,(n+R+M)/A)):Frt(zrt(l,-(n+R+M)/A)),C.drawPolygonPath(t||T,e.x,e.y,A,L,l));_?T.stroke(t):T.stroke(),"double"===W&&(T.lineWidth=n/3,c=T.globalCompositeOperation,T.globalCompositeOperation="destination-out",_?T.stroke(t):T.stroke(),T.globalCompositeOperation=c),T.setLineDash&&T.setLineDash([])}},"drawOutline"),tt=me(function(){e&&C.drawNodeOverlay(T,E,S,A,L)},"drawOverlay"),et=me(function(){e&&C.drawNodeUnderlay(T,E,S,A,L)},"drawUnderlay"),rt=me(function(){C.drawElementText(T,E,null,O)},"drawText");"yes"===E.pstyle("ghost").value&&(g=E.pstyle("ghost-offset-x").pfValue,f=E.pstyle("ghost-offset-y").pfValue,y=(m=E.pstyle("ghost-opacity").value)*l,T.translate(g,f),V(),J(),r(m*$),k(),w(y,!0),H(m*j),Q(),K(0!==v||0!==N),w(y,!1),Z(y),T.translate(-g,-f)),_&&T.translate(-S.x,-S.y),et(),_&&T.translate(S.x,S.y),V(),J(),r(),k(),w(l,!0),H(),Q(),K(0!==v||0!==N),w(l,!1),Z(),_&&T.translate(-S.x,-S.y),rt(),tt(),t&&T.translate(n.x1,n.y1)}}},Xot=me(function(u){if(["overlay","underlay"].includes(u))return function(t,e,r,n,i){var a,s,o,l,c,h;e.visible()&&(a=e.pstyle("".concat(u,"-padding")).pfValue,s=e.pstyle("".concat(u,"-opacity")).value,o=e.pstyle("".concat(u,"-color")).value,l=e.pstyle("".concat(u,"-shape")).value,c=e.pstyle("".concat(u,"-corner-radius")).value,0<s)&&(r=r||e.position(),null!=n&&null!=i||(h=e.padding(),n=e.width()+2*h,i=e.height()+2*h),this.colorFillStyle(t,o[0],o[1],o[2],s),this.nodeShapes[l].draw(t,r.x,r.y,n+2*a,i+2*a,c),t.fill())};throw new Error("Invalid state")},"drawNodeOverlayUnderlay"),Vot.drawNodeOverlay=Xot("overlay"),Vot.drawNodeUnderlay=Xot("underlay"),Vot.hasPie=function(t){return(t=t[0])._private.hasPie},Vot.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),s=n.x,o=n.y,n=e.width(),l=e.height(),c=Math.min(n,l)/2,h=0;this.usePaths()&&(o=s=0),"%"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var u=1;u<=i.pieBackgroundN;u++){var d=e.pstyle("pie-"+u+"-background-size").value,p=e.pstyle("pie-"+u+"-background-color").value,g=e.pstyle("pie-"+u+"-background-opacity").value*r,f=d/100,m=(1<f+h&&(f=1-h),1.5*Math.PI+2*Math.PI*h),y=m+2*Math.PI*f;0===d||1<=h||1<h+f||(t.beginPath(),t.moveTo(s,o),t.arc(s,o,c,m,y),t.closePath(),this.colorFillStyle(t,p[0],p[1],p[2],g),t.fill(),h+=f)}},Kot={getPixelRatio:function(){var t,e=this.data.contexts[0];return null!=this.forcedPixelRatio?this.forcedPixelRatio:(t=this.cy.window(),e=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1,(t.devicePixelRatio||1)/e)},paintCache:function(t){for(var e,r=this.paintCaches=this.paintCaches||[],n=!0,i=0;i<r.length;i++)if((e=r[i]).context===t){n=!1;break}return n&&r.push(e={context:t}),e},createGradientStyleFor:function(t,e,r,n,i){var a=this.usePaths(),s=r.pstyle(e+"-gradient-stop-colors").value,o=r.pstyle(e+"-gradient-stop-positions").pfValue;if("radial-gradient"===n)n=r.isEdge()?(e=r.sourceEndpoint(),n=r.targetEndpoint(),l=r.midpoint(),e=crt(e,l),crt(n,l)):(l=a?{x:0,y:0}:r.position(),e=r.paddedWidth(),r.paddedHeight()),c=t.createRadialGradient(l.x,l.y,0,l.x,l.y,Math.max(e,n));else if(r.isEdge())var l=r.sourceEndpoint(),e=r.targetEndpoint(),c=t.createLinearGradient(l.x,l.y,e.x,e.y);else{var h=a?{x:0,y:0}:r.position(),u=r.paddedWidth()/2,d=r.paddedHeight()/2;switch(r.pstyle("background-gradient-direction").value){case"to-bottom":c=t.createLinearGradient(h.x,h.y-d,h.x,h.y+d);break;case"to-top":c=t.createLinearGradient(h.x,h.y+d,h.x,h.y-d);break;case"to-left":c=t.createLinearGradient(h.x+u,h.y,h.x-u,h.y);break;case"to-right":c=t.createLinearGradient(h.x-u,h.y,h.x+u,h.y);break;case"to-bottom-right":case"to-right-bottom":c=t.createLinearGradient(h.x-u,h.y-d,h.x+u,h.y+d);break;case"to-top-right":case"to-right-top":c=t.createLinearGradient(h.x-u,h.y+d,h.x+u,h.y-d);break;case"to-bottom-left":case"to-left-bottom":c=t.createLinearGradient(h.x+u,h.y-d,h.x-u,h.y+d);break;case"to-top-left":case"to-left-top":c=t.createLinearGradient(h.x+u,h.y+d,h.x-u,h.y-d)}}if(!c)return null;for(var p=o.length===s.length,g=s.length,f=0;f<g;f++)c.addColorStop(p?o[f]:f/(g-1),"rgba("+s[f][0]+","+s[f][1]+","+s[f][2]+","+i+")");return c},gradientFillStyle:function(t,e,r,n){if(!(e=this.createGradientStyleFor(t,"background",e,r,n)))return null;t.fillStyle=e},colorFillStyle:function(t,e,r,n,i){t.fillStyle="rgba("+e+","+r+","+n+","+i+")"},eleFillStyle:function(t,e,r){var n=e.pstyle("background-fill").value;"linear-gradient"===n||"radial-gradient"===n?this.gradientFillStyle(t,e,n,r):(n=e.pstyle("background-color").value,this.colorFillStyle(t,n[0],n[1],n[2],r))},gradientStrokeStyle:function(t,e,r,n){if(!(e=this.createGradientStyleFor(t,"line",e,r,n)))return null;t.strokeStyle=e},colorStrokeStyle:function(t,e,r,n,i){t.strokeStyle="rgba("+e+","+r+","+n+","+i+")"},eleStrokeStyle:function(t,e,r){var n=e.pstyle("line-fill").value;"linear-gradient"===n||"radial-gradient"===n?this.gradientStrokeStyle(t,e,n,r):(n=e.pstyle("line-color").value,this.colorStrokeStyle(t,n[0],n[1],n[2],r))},matchCanvasSize:function(t){var e,r=this,n=r.data,i=(s=r.findContainerClientCoords())[2],a=s[3],s=r.getPixelRatio(),o=r.motionBlurPxRatio,l=i*(s=t!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]&&t!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]?s:o),c=a*s;if(l!==r.canvasWidth||c!==r.canvasHeight){r.fontCaches=null,(t=n.canvasContainer).style.width=i+"px",t.style.height=a+"px";for(var h=0;h<r.CANVAS_LAYERS;h++)(e=n.canvases[h]).width=l,e.height=c,e.style.width=i+"px",e.style.height=a+"px";for(h=0;h<r.BUFFER_COUNT;h++)(e=n.bufferCanvases[h]).width=l,e.height=c,e.style.width=i+"px",e.style.height=a+"px";s<=(r.textureMult=1)&&(e=n.bufferCanvases[r.TEXTURE_BUFFER],r.textureMult=2,e.width=l*r.textureMult,e.height=c*r.textureMult),r.canvasWidth=l,r.canvasHeight=c,r.pixelRatio=s}},renderTo:function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})},clearCanvas:function(){var e=this,t=e.data;function r(t){t.clearRect(0,0,e.canvasWidth,e.canvasHeight)}me(r,"clear"),r(t.contexts[e.NODE]),r(t.contexts[e.DRAG])},render:function(t){var s=this,e=(t=t||Met(),s.cy),o=t.forcedContext,l=t.drawAllLayers,r=t.drawOnlyNodeLayer,c=t.forcedZoom,h=t.forcedPan,n=void 0===t.forcedPxRatio?this.getPixelRatio():t.forcedPxRatio,u=s.data,i=u.canvasNeedsRedraw,a=s.textureOnViewport&&!o&&(s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming),d=(void 0!==t.motionBlur?t:s).motionBlur,p=s.motionBlurPxRatio,g=e.hasCompoundNodes(),f=s.hoverData.draggingEles,m=!(!s.hoverData.selecting&&!s.touchData.selecting),y=d=d&&!o&&s.motionBlurEnabled&&!m,m=(o||(s.prevPxRatio!==n&&(s.invalidateContainerClientCoordsCache(),s.matchCanvasSize(s.container),s.redrawHint("eles",!0),s.redrawHint("drag",!0)),s.prevPxRatio=n),!o&&s.motionBlurTimeout&&clearTimeout(s.motionBlurTimeout),d&&(null==s.mbFrames&&(s.mbFrames=0),s.mbFrames++,s.mbFrames<3&&(y=!1),s.mbFrames>s.minMbLowQualFrames)&&(s.motionBlurPxRatio=s.mbPxRBlurry),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!a&&(i[s.NODE]=!0,i[s.SELECT_BOX]=!0),e.style()),v=e.zoom(),x=void 0!==c?c:v,b=e.pan(),w={x:b.x,y:b.y},k={zoom:v,pan:{x:b.x,y:b.y}},T=(void 0===(T=s.prevViewport)||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||f&&!g||(s.motionBlurPxRatio=1),x*=n,(w=h||w).x*=n,w.y*=n,s.getCachedZSortedEles());function E(t,e,r,n,i){var a=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",s.colorFillStyle(t,255,255,255,s.motionBlurTransparency),t.fillRect(e,r,n,i),t.globalCompositeOperation=a}function C(t,e){var r,n,i,a=s.clearingMotionBlur||t!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&t!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=w,n=x,i=s.canvasWidth,s.canvasHeight):(r={x:b.x*p,y:b.y*p},n=v*p,i=s.canvasWidth*p,s.canvasHeight*p);t.setTransform(1,0,0,1,0,0),"motionBlur"===e?E(t,0,0,i,a):o||void 0!==e&&!e||t.clearRect(0,0,i,a),l||(t.translate(r.x,r.y),t.scale(n,n)),h&&t.translate(h.x,h.y),c&&t.scale(c,c)}me(E,"mbclear"),me(C,"setContextTransform"),a||(s.textureDrawLastFrame=!1),a?(s.textureDrawLastFrame=!0,s.textureCache||(s.textureCache={},s.textureCache.bb=e.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER],(f=s.data.bufferContexts[s.TEXTURE_BUFFER]).setTransform(1,0,0,1,0,0),f.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:f,drawOnlyNodeLayer:!0,forcedPxRatio:n*s.textureMult}),(k=s.textureCache.viewport={zoom:e.zoom(),pan:e.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}),i[s.DRAG]=!1,i[s.NODE]=!1,S=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,S.setTransform(1,0,0,1,0,0),d?E(S,0,0,k.width,k.height):S.clearRect(0,0,k.width,k.height),f=m.core("outside-texture-bg-color").value,m=m.core("outside-texture-bg-opacity").value,s.colorFillStyle(S,f[0],f[1],f[2],m),S.fillRect(0,0,k.width,k.height),v=e.zoom(),C(S,!1),S.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n),S.drawImage(g,k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n)):s.textureOnViewport&&!o&&(s.textureCache=null);var S,_,f=e.extent(),m=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),g=s.hideEdgesOnViewport&&m;(m=[])[s.NODE]=!i[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,m[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),m[s.DRAG]=!i[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,m[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),(i[s.NODE]||l||r||m[s.NODE])&&(_=d&&!m[s.NODE]&&1!==p,C(S=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(S,T.nondrag,n,f):s.drawLayeredElements(S,T.nondrag,n,f),s.debug&&s.drawDebugPoints(S,T.nondrag),l||d||(i[s.NODE]=!1)),!r&&(i[s.DRAG]||l||m[s.DRAG])&&(_=d&&!m[s.DRAG]&&1!==p,C(S=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(S,T.drag,n,f):s.drawCachedElements(S,T.drag,n,f),s.debug&&s.drawDebugPoints(S,T.drag),l||d||(i[s.DRAG]=!1)),this.drawSelectionRectangle(t,C),d&&1!==p&&(r=u.contexts[s.NODE],_=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],n=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],f=me(function(t,e,r){t.setTransform(1,0,0,1,0,0),r||!y?t.clearRect(0,0,s.canvasWidth,s.canvasHeight):E(t,0,0,s.canvasWidth,s.canvasHeight),r=p,t.drawImage(e,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur"),(i[s.NODE]||m[s.NODE])&&(f(r,_,m[s.NODE]),i[s.NODE]=!1),i[s.DRAG]||m[s.DRAG])&&(f(g,n,m[s.DRAG]),i[s.DRAG]=!1),s.prevViewport=k,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),d&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!a,s.mbFrames=0,i[s.NODE]=!0,i[s.DRAG]=!0,s.redraw()},100)),o||e.emit("render")},drawSelectionRectangle:function(t,e){var r,n=this,i=n.cy,a=n.data,i=i.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=a.canvasNeedsRedraw;(n.showFps||!s&&l[n.SELECT_BOX]&&!o)&&(e(s=t.forcedContext||a.contexts[n.SELECT_BOX]),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)&&(r=n.cy.zoom(),e=i.core("selection-box-border-width").value/r,s.lineWidth=e,s.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",s.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),0<e)&&(s.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",s.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1])),a.bgActivePosistion&&!n.hoverData.selecting&&(r=n.cy.zoom(),t=a.bgActivePosistion,s.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",s.beginPath(),s.arc(t.x,t.y,i.core("active-bg-size").pfValue/r,0,2*Math.PI),s.fill()),e=n.lastRedrawTime,n.showFps&&e&&(t="1 frame = "+(e=Math.round(e))+" ms = "+(a=Math.round(1e3/e))+" fps",s.setTransform(1,0,0,1,0,0),s.fillStyle="rgba(255, 0, 0, 0.75)",s.strokeStyle="rgba(255, 0, 0, 0.75)",s.font="30px Arial",Zot||(i=s.measureText(t),Zot=i.actualBoundingBoxAscent),s.fillText(t,0,Zot),s.strokeRect(0,Zot+10,250,20),s.fillRect(0,Zot+10,250*Math.min(a/60,1),20)),o||(l[n.SELECT_BOX]=!1))}},me(XQ,"compileShader"),me(KQ,"createProgram"),me(ZQ,"createTextureCanvas"),me(QQ,"getEffectivePanZoom"),me(JQ,"modelToRenderedPosition"),me(tJ,"toWebGLColor"),me(eJ,"indexToVec4"),me(rJ,"vec4ToIndex"),me(nJ,"createTexture"),me(iJ,"getTypeInfo"),me(aJ,"createTypedArray"),me(sJ,"createTypedArrayView"),me(oJ,"createBufferStaticDraw"),me(lJ,"createBufferDynamicDraw"),me(cJ,"createPickingFrameBuffer"),Qot=typeof Float32Array<"u"?Float32Array:Array,Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),me(hJ,"create"),me(uJ,"identity"),me(dJ,"multiply"),me(pJ,"translate"),me(gJ,"rotate"),me(fJ,"scale"),me(mJ,"projection"),Jot={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},tlt=Det({getKey:null,drawElement:null,getBoundingBox:null,getRotation:null,getRotationPoint:null,getRotationOffset:null,isVisible:null,getPadding:null}),me(R,"Atlas"),GK(R,[{key:"getKeys",value:me(function(){return new Set(this.keyToLocation.keys())},"getKeys")},{key:"getScale",value:me(function(t){var e=t.w,t=t.h,r=this.texHeight,n=this.maxTexWidth,i=e*(r/=t),a=t*r;return n<i&&(i=e*(r=n/e),a=t*r),{scale:r,texW:i,texH:a}},"getScale")},{key:"draw",value:me(function(t,n,i){var l=this,c=this.atlasSize,e=this.rows,h=this.texHeight,a=(r=this.getScale(n)).scale,u=r.texW,d=r.texH,p=[null,null],g=me(function(t,e){var r;i&&e&&(e=e.context,r=t.x,t=h*t.row,e.save(),e.translate(r,t),e.scale(a,a),i(e,n),e.restore())},"drawAt"),r=me(function(){g(l.freePointer,l.canvas),p[0]={x:l.freePointer.x,y:l.freePointer.row*h,w:u,h:d},p[1]={x:l.freePointer.x+u,y:l.freePointer.row*h,w:0,h:d},l.freePointer.x+=u,l.freePointer.x==c&&(l.freePointer.x=0,l.freePointer.row++)},"drawNormal"),s=me(function(){var t=l.scratch,e=l.canvas,r=(t.clear(),g({x:0,row:0},t),c-l.freePointer.x),n=u-r,i=h,a=l.freePointer.x,s=l.freePointer.row*h,o=r;e.context.drawImage(t,0,0,o,i,a,s,o,i),p[0]={x:a,y:s,w:o,h:d},a=(l.freePointer.row+1)*h,s=n,e&&e.context.drawImage(t,r,0,s,i,0,a,s,i),p[1]={x:0,y:a,w:s,h:d},l.freePointer.x=n,l.freePointer.row++},"drawWrapped"),o=me(function(){l.freePointer.x=0,l.freePointer.row++},"moveToStartOfNextRow");if(this.freePointer.x+u<=c)r();else{if(this.freePointer.row>=e-1)return!1;(this.freePointer.x!==c&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(t,p),this.needsBuffer=!0,p},"draw")},{key:"getOffsets",value:me(function(t){return this.keyToLocation.get(t)},"getOffsets")},{key:"isEmpty",value:me(function(){return 0===this.freePointer.x&&0===this.freePointer.row},"isEmpty")},{key:"canFit",value:me(function(t){var e=this.atlasSize,r=this.rows,t=this.getScale(t).texW;return!(this.freePointer.x+t>e)||this.freePointer.row<r-1},"canFit")},{key:"bufferIfNeeded",value:me(function(t){this.texture||(this.texture=nJ(t,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1)},"bufferIfNeeded")},{key:"dispose",value:me(function(){this.texture&&(this.texture.deleteTexture(),this.texture=null,this.needsBuffer=!0)},"dispose")}]),elt=R,me(I,"AtlasCollection"),GK(I,[{key:"getKeys",value:me(function(){return new Set(this.styleKeyToAtlas.keys())},"getKeys")},{key:"getIdsFor",value:me(function(t){var e=this.keyToIds.get(t);return e||(e=new Set,this.keyToIds.set(t,e)),e},"getIdsFor")},{key:"_createAtlas",value:me(function(){var t=this.r,e=this.opts;return new elt(t,e)},"_createAtlas")},{key:"_getScratchCanvas",value:me(function(){var t,e,r,n;return this.scratch||(t=this.r,r=(e=this.opts).webglTexSize,n=Math.floor(r/e.webglTexRows),this.scratch=e.createTextureCanvas(t,r,n,"scratch")),this.scratch},"_getScratchCanvas")},{key:"draw",value:me(function(t,e,r,n){this.styleKeyNeedsRedraw.has(e)&&(this.styleKeyNeedsRedraw.delete(e),this.deleteKey(t,e),(i=this.styleKeyToAtlas.get(e))&&(i.forceGC=!0),this.styleKeyToAtlas.delete(e));var i=this.styleKeyToAtlas.get(e);return i||((i=this.atlases[this.atlases.length-1])&&i.canFit(r)||(i=this._createAtlas(),this.atlases.push(i)),i.draw(e,r,n),this.styleKeyToAtlas.set(e,i),this.getIdsFor(e).add(t),this.idToKey.set(t,e)),i},"draw")},{key:"getAtlas",value:me(function(t){return this.styleKeyToAtlas.get(t)},"getAtlas")},{key:"hasAtlas",value:me(function(t){return this.styleKeyToAtlas.has(t)},"hasAtlas")},{key:"deleteKey",value:me(function(t,e){this.idToKey.delete(t),this.getIdsFor(e).delete(t)},"deleteKey")},{key:"checkKeyIsInvalid",value:me(function(t,e){var r;return!!this.idToKey.has(t)&&(r=this.idToKey.get(t))!=e&&(this.deleteKey(t,r),!0)},"checkKeyIsInvalid")},{key:"_getKeysToCollect",value:me(function(){var t,e=new Set,r=JK(this.styleKeyToAtlas.keys());try{for(r.s();!(t=r.n()).done;){var n=t.value;0==this.getIdsFor(n).size&&e.add(n)}}catch(t){r.e(t)}finally{r.f()}return e},"_getKeysToCollect")},{key:"gc",value:me(function(){var c=this,t=this.atlases.some(function(t){return t.forceGC}),h=this._getKeysToCollect();if(0!==h.size||t){var u,d=[],p=new Map,g=null,e=JK(this.atlases);try{var r=me(function(){var e=u.value,t=e.getKeys(),r=yJ(h,t);if(0===r.size&&!e.forceGC)return d.push(e),t.forEach(function(t){return p.set(t,e)}),"continue";g||(g=c._createAtlas(),d.push(g));var n,i=JK(t);try{for(i.s();!(n=i.n()).done;){var a,s,o,l=n.value;r.has(l)||(s=(a=qK(e.getOffsets(l),2))[0],o=a[1],g.canFit({w:s.w+o.w,h:s.h})||(g=c._createAtlas(),d.push(g)),c._copyTextureToNewAtlas(l,e,g),p.set(l,g))}}catch(t){i.e(t)}finally{i.f()}},"_loop");for(e.s();!(u=e.n()).done;)r()}catch(t){e.e(t)}finally{e.f()}this.atlases=d,this.styleKeyToAtlas=p}else console.log("nothing to garbage collect")},"gc")},{key:"_copyTextureToNewAtlas",value:me(function(t,e,r){var n,i,a,s=qK(e.getOffsets(t),2),o=s[0];0===(s=s[1]).w?r.draw(t,o,function(t){t.drawImage(e.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h)}):((n=this._getScratchCanvas()).clear(),n.context.drawImage(e.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h),n.context.drawImage(e.canvas,s.x,s.y,s.w,s.h,o.w,0,s.w,s.h),i=o.w+s.w,a=o.h,r.draw(t,{w:i,h:a},function(t){t.drawImage(n,0,0,i,a,0,0,i,a)}))},"_copyTextureToNewAtlas")},{key:"getCounts",value:me(function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}},"getCounts")}]),rlt=I,me(yJ,"intersection"),me(D,"AtlasManager"),GK(D,[{key:"_cacheScratchCanvas",value:me(function(t){var i=-1,a=-1,s=null,o=t.createTextureCanvas;t.createTextureCanvas=function(t,e,r,n){return n?s=s&&e==i&&r==a?s:o(t,i=e,a=r):o(t,e,r)}},"_cacheScratchCanvas")},{key:"addRenderType",value:me(function(t,e){var r=new rlt(this.r,this.globalOptions);this.renderTypes.set(t,vtt({type:t,atlasCollection:r},e))},"addRenderType")},{key:"getRenderTypes",value:me(function(){return jK(this.renderTypes.values())},"getRenderTypes")},{key:"getRenderTypeOpts",value:me(function(t){return this.renderTypes.get(t)},"getRenderTypeOpts")},{key:"invalidate",value:me(function(t){var e,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=r.forceRedraw,i=void 0!==n&&n,a=void 0===(n=r.filterEle)?function(){return!0}:n,s=void 0===(n=r.filterType)?function(){return!0}:n,o=!1,l=JK(t);try{for(l.s();!(e=l.n()).done;){var c=e.value;if(a(c)){var h,u=c.id(),d=JK(this.getRenderTypes());try{for(d.s();!(h=d.n()).done;){var p,g=h.value;s(g.type)&&(p=g.getKey(c),i?(g.atlasCollection.deleteKey(u,p),g.atlasCollection.styleKeyNeedsRedraw.add(p),o=!0):o|=g.atlasCollection.checkKeyIsInvalid(u,p))}}catch(t){d.e(t)}finally{d.f()}}}}catch(t){l.e(t)}finally{l.f()}return o},"invalidate")},{key:"gc",value:me(function(){var t,e=JK(this.getRenderTypes());try{for(e.s();!(t=e.n()).done;)t.value.atlasCollection.gc()}catch(t){e.e(t)}finally{e.f()}},"gc")},{key:"isRenderable",value:me(function(t,e){return(e=this.getRenderTypeOpts(e))&&e.isVisible(t)},"isRenderable")},{key:"startBatch",value:me(function(){this.batchAtlases=[]},"startBatch")},{key:"getAtlasCount",value:me(function(){return this.batchAtlases.length},"getAtlasCount")},{key:"getAtlases",value:me(function(){return this.batchAtlases},"getAtlases")},{key:"getOrCreateAtlas",value:me(function(e,r,t){var n=this.renderTypes.get(t),t=n.getKey(e),i=e.id();return n.atlasCollection.draw(i,t,r,function(t){n.drawElement(t,e,r,!0,!0)})},"getOrCreateAtlas")},{key:"getAtlasIndexForBatch",value:me(function(t){var e=this.batchAtlases.indexOf(t);if(e<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)return;this.batchAtlases.push(t),e=this.batchAtlases.length-1}return e},"getAtlasIndexForBatch")},{key:"getIndexArray",value:me(function(){return Array.from({length:this.maxAtlases},function(t,e){return e})},"getIndexArray")},{key:"getAtlasInfo",value:me(function(t,e){var r=this.renderTypes.get(e),n=r.getBoundingBox(t),i=this.getOrCreateAtlas(t,n,e),a=this.getAtlasIndexForBatch(i);if(void 0!==a)return r=r.getKey(t),{atlasID:a,tex:a=(t=qK(i.getOffsets(r),2))[0],tex1:a,tex2:t[1],bb:n,type:e,styleKey:r}},"getAtlasInfo")},{key:"canAddToCurrentBatch",value:me(function(t,e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||(t=(e=this.renderTypes.get(e)).getKey(t),(e=e.atlasCollection.getAtlas(t))&&this.batchAtlases.includes(e))},"canAddToCurrentBatch")},{key:"setTransformMatrix",value:me(function(t,e,r){var n,i=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],a=e.bb,s=e.tex1,o=e.tex2,e=this.getRenderTypeOpts(e.type),l=e.getPadding?e.getPadding(r):0,s=s.w/(s.w+o.w),o=this.getAdjustedBB(a,l,i,i?s:1-s);uJ(t),s=0!==(a=e.getRotation?e.getRotation(r):0)?(pJ(t,t,[(l=e.getRotationPoint(r)).x,l.y]),gJ(t,t,a),n=(i=e.getRotationOffset(r)).x+o.xOffset,i.y):(n=o.x1,o.y1),pJ(t,t,[n,s]),fJ(t,t,[o.w,o.h])},"setTransformMatrix")},{key:"getTransformMatrix",value:me(function(t,e){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],n=hJ();return this.setTransformMatrix(n,t,e,r),n},"getTransformMatrix")},{key:"getAdjustedBB",value:me(function(t,e,r,n){var i=t.x1,a=t.y1,s=t.w,t=t.h,e=(e&&(i-=e,a-=e,s+=2*e,t+=2*e),0),o=s*n;return r&&n<1?s=o:!r&&n<1&&(i+=e=s-o,s=o),{x1:i,y1:a,w:s,h:t,xOffset:e}},"getAdjustedBB")},{key:"getDebugInfo",value:me(function(){var t,e=[],r=JK(this.renderTypes);try{for(r.s();!(t=r.n()).done;){var n=qK(t.value,2),i=n[0],a=n[1].atlasCollection.getCounts(),s=a.keyCount;e.push({type:i,keyCount:s,atlasCount:a.atlasCount})}}catch(t){r.e(t)}finally{r.f()}return e},"getDebugInfo")}]),nlt=D,me(M,"ElementDrawingWebGL"),GK(M,[{key:"addTextureRenderType",value:me(function(t,e){this.atlasManager.addRenderType(t,e)},"addTextureRenderType")},{key:"invalidate",value:me(function(t){var e=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).type,r=this.atlasManager;return e?r.invalidate(t,{filterType:me(function(t){return t===e},"filterType"),forceRedraw:!0}):r.invalidate(t)},"invalidate")},{key:"gc",value:me(function(){this.atlasManager.gc()},"gc")},{key:"createShaderProgram",value:me(function(t){var e=this.gl,r=`#version 300 es + precision highp float; + + uniform mat3 uPanZoomMatrix; + uniform int uAtlasSize; + + // instanced + in vec2 aPosition; + + // what are we rendering? + in int aVertType; + + // for picking + in vec4 aIndex; + + // For textures + in int aAtlasId; // which shader unit/atlas to use + in vec4 aTex1; // x/y/w/h of texture in atlas + in vec4 aTex2; + + // for any transforms that are needed + in vec4 aScaleRotate1; // vectors use fewer attributes than matrices + in vec2 aTranslate1; + in vec4 aScaleRotate2; + in vec2 aTranslate2; + + // for edges + in vec4 aPointAPointB; + in vec4 aPointCPointD; + in float aLineWidth; + in vec4 aEdgeColor; + + out vec2 vTexCoord; + out vec4 vEdgeColor; + flat out int vAtlasId; + flat out vec4 vIndex; + flat out int vVertType; + + void main(void) { + int vid = gl_VertexID; + vec2 position = aPosition; + + if(aVertType == `.concat(0,`) { + float texX; + float texY; + float texW; + float texH; + mat3 texMatrix; + + int vid = gl_VertexID; + if(vid <= 5) { + texX = aTex1.x; + texY = aTex1.y; + texW = aTex1.z; + texH = aTex1.w; + texMatrix = mat3( + vec3(aScaleRotate1.xy, 0.0), + vec3(aScaleRotate2.zw, 0.0), + vec3(aTranslate1, 1.0) + ); + } else { + texX = aTex2.x; + texY = aTex2.y; + texW = aTex2.z; + texH = aTex2.w; + texMatrix = mat3( + vec3(aScaleRotate2.xy, 0.0), + vec3(aScaleRotate2.zw, 0.0), + vec3(aTranslate2, 1.0) + ); + } + + if(vid == 1 || vid == 2 || vid == 4 || vid == 7 || vid == 8 || vid == 10) { + texX += texW; + } + if(vid == 2 || vid == 4 || vid == 5 || vid == 8 || vid == 10 || vid == 11) { + texY += texH; + } + + float d = float(uAtlasSize); + vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 + + gl_Position = vec4(uPanZoomMatrix * texMatrix * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat(1,` && vid < 6) { + vec2 source = aPointAPointB.xy; + vec2 target = aPointAPointB.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + vec2 xBasis = target - source; + vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); + vec2 point = source + xBasis * position.x + yBasis * aLineWidth * position.y; + + gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); + vEdgeColor = aEdgeColor; + } + else if(aVertType == `).concat(2,` && vid < 6) { + vec2 pointA = aPointAPointB.xy; + vec2 pointB = aPointAPointB.zw; + vec2 pointC = aPointCPointD.xy; + vec2 pointD = aPointCPointD.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + vec2 p0 = pointA; + vec2 p1 = pointB; + vec2 p2 = pointC; + vec2 pos = position; + if(position.x == 1.0) { + p0 = pointD; + p1 = pointC; + p2 = pointB; + pos = vec2(0.0, -position.y); + } + + vec2 p01 = p1 - p0; + vec2 p12 = p2 - p1; + vec2 p21 = p1 - p2; + + // Find the normal vector. + vec2 tangent = normalize(normalize(p12) + normalize(p01)); + vec2 normal = vec2(-tangent.y, tangent.x); + + // Find the vector perpendicular to p0 -> p1. + vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); + + // Determine the bend direction. + float sigma = sign(dot(p01 + p21, normal)); + float width = aLineWidth; + + if(sign(pos.y) == -sigma) { + // This is an intersecting vertex. Adjust the position so that there's no overlap. + vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } else { + // This is a non-intersecting vertex. Treat it like a mitre join. + vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } + + vEdgeColor = aEdgeColor; + } + else if(aVertType == `).concat(3,` && vid < 3) { + // massage the first triangle into an edge arrow + if(vid == 0) + position = vec2(-0.15, -0.3); + if(vid == 1) + position = vec2( 0.0, 0.0); + if(vid == 2) + position = vec2( 0.15, -0.3); + + mat3 transform = mat3( + vec3(aScaleRotate1.xy, 0.0), + vec3(aScaleRotate1.zw, 0.0), + vec3(aTranslate1, 1.0) + ); + gl_Position = vec4(uPanZoomMatrix * transform * vec3(position, 1.0), 1.0); + vEdgeColor = aEdgeColor; + } else { + gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space + } + + vAtlasId = aAtlasId; + vIndex = aIndex; + vVertType = aVertType; + } + `),n=this.atlasManager.getIndexArray(),i=KQ(e,r,`#version 300 es + precision highp float; + + // define texture unit for each node in the batch + `.concat(n.map(function(t){return"uniform sampler2D uTexture".concat(t,";")}).join(` + `),` + + uniform vec4 uBGColor; + + in vec2 vTexCoord; + in vec4 vEdgeColor; + flat in int vAtlasId; + flat in vec4 vIndex; + flat in int vVertType; + + out vec4 outColor; + + void main(void) { + if(vVertType == `).concat(0,`) { + `).concat(n.map(function(t){return"if(vAtlasId == ".concat(t,") outColor = texture(uTexture").concat(t,", vTexCoord);")}).join(` + else `),` + } else if(vVertType == `).concat(3,`) { + // blend arrow color with background (using premultiplied alpha) + outColor.rgb = vEdgeColor.rgb + (uBGColor.rgb * (1.0 - vEdgeColor.a)); + outColor.a = 1.0; // make opaque, masks out line under arrow + } else { + outColor = vEdgeColor; + } + + `).concat(t.picking?`if(outColor.a == 0.0) discard; + else outColor = vIndex;`:"",` + } + `));i.aPosition=e.getAttribLocation(i,"aPosition"),i.aIndex=e.getAttribLocation(i,"aIndex"),i.aVertType=e.getAttribLocation(i,"aVertType"),i.aAtlasId=e.getAttribLocation(i,"aAtlasId"),i.aTex1=e.getAttribLocation(i,"aTex1"),i.aTex2=e.getAttribLocation(i,"aTex2"),i.aScaleRotate1=e.getAttribLocation(i,"aScaleRotate1"),i.aTranslate1=e.getAttribLocation(i,"aTranslate1"),i.aScaleRotate2=e.getAttribLocation(i,"aScaleRotate2"),i.aTranslate2=e.getAttribLocation(i,"aTranslate2"),i.aPointAPointB=e.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=e.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=e.getAttribLocation(i,"aLineWidth"),i.aEdgeColor=e.getAttribLocation(i,"aEdgeColor"),i.uPanZoomMatrix=e.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=e.getUniformLocation(i,"uAtlasSize"),i.uBGColor=e.getUniformLocation(i,"uBGColor"),i.uTextures=[];for(var a=0;a<this.atlasManager.maxAtlases;a++)i.uTextures.push(e.getUniformLocation(i,"uTexture".concat(a)));return i},"createShaderProgram")},{key:"createVAO",value:me(function(){var t=[].concat(t=[0,0,1,0,1,1,0,0,1,1,0,1],t),e=(this.vertexCount=t.length/2,this.maxInstances),r=this.gl,n=this.program,i=r.createVertexArray();return r.bindVertexArray(i),oJ(r,"vec2",n.aPosition,t),this.indexBuffer=lJ(r,e,"vec4",n.aIndex),this.vertTypeBuffer=lJ(r,e,"int",n.aVertType),this.atlasIdBuffer=lJ(r,e,"int",n.aAtlasId),this.tex1Buffer=lJ(r,e,"vec4",n.aTex1),this.tex2Buffer=lJ(r,e,"vec4",n.aTex2),this.scaleRotate1Buffer=lJ(r,e,"vec4",n.aScaleRotate1),this.translate1Buffer=lJ(r,e,"vec2",n.aTranslate1),this.scaleRotate2Buffer=lJ(r,e,"vec4",n.aScaleRotate2),this.translate2Buffer=lJ(r,e,"vec2",n.aTranslate2),this.pointAPointBBuffer=lJ(r,e,"vec4",n.aPointAPointB),this.pointCPointDBuffer=lJ(r,e,"vec4",n.aPointCPointD),this.lineWidthBuffer=lJ(r,e,"float",n.aLineWidth),this.edgeColorBuffer=lJ(r,e,"vec4",n.aEdgeColor),r.bindVertexArray(null),i},"createVAO")},{key:"buffers",get:me(function(){var e=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(t){return t.endsWith("Buffer")}).map(function(t){return e[t]})),this._buffers},"get")},{key:"startFrame",value:me(function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Jot.SCREEN;this.panZoomMatrix=t,this.debugInfo=e,this.renderTarget=r,this.startBatch()},"startFrame")},{key:"startBatch",value:me(function(){this.instanceCount=0,this.atlasManager.startBatch()},"startBatch")},{key:"endFrame",value:me(function(){this.endBatch()},"endFrame")},{key:"getTempMatrix",value:me(function(){return this.tempMatrix=this.tempMatrix||hJ()},"getTempMatrix")},{key:"drawTexture",value:me(function(t,e,r){var n=this.atlasManager;if(n.isRenderable(t,r)){n.canAddToCurrentBatch(t,r)||this.endBatch();var i=this.instanceCount,a=(this.vertTypeBuffer.getView(i)[0]=0,eJ(e,this.indexBuffer.getView(i)),n.getAtlasInfo(t,r,a)),e=a.atlasID,r=a.tex1,s=a.tex2;this.atlasIdBuffer.getView(i)[0]=e,(e=this.tex1Buffer.getView(i))[0]=r.x,e[1]=r.y,e[2]=r.w,e[3]=r.h,(e=this.tex2Buffer.getView(i))[0]=s.x,e[1]=s.y,e[2]=s.w,e[3]=s.h;for(var o=this.getTempMatrix(),l=0,c=[1,2];l<c.length;l++){var h=c[l],u=(n.setTransformMatrix(o,a,t,1===h),this["scaleRotate".concat(h,"Buffer")].getView(i));u[0]=o[0],u[1]=o[1],u[2]=o[3],u[3]=o[4],(u=this["translate".concat(h,"Buffer")].getView(i))[0]=o[6],u[1]=o[7]}this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},"drawTexture")},{key:"drawEdgeArrow",value:me(function(t,e,r){var n,i,a,s,o=t._private.rscratch,o="source"===r?(i=o.arrowStartX,a=o.arrowStartY,o.srcArrowAngle):(i=o.arrowEndX,a=o.arrowEndY,o.tgtArrowAngle);isNaN(i)||null==i||isNaN(a)||null==a||isNaN(o)||null==o||"none"!==t.pstyle(r+"-arrow-shape").value&&(r=t.pstyle(r+"-arrow-color").value,n=t.pstyle("opacity").value*t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,t=t.pstyle("arrow-scale").value,s=this.r.getArrowWidth(s,t),uJ(t=this.getTempMatrix()),pJ(t,t,[i,a]),fJ(t,t,[s,s]),gJ(t,t,o),i=this.instanceCount,this.vertTypeBuffer.getView(i)[0]=3,eJ(e,this.indexBuffer.getView(i)),tJ(r,n,this.edgeColorBuffer.getView(i)),(a=this.scaleRotate1Buffer.getView(i))[0]=t[0],a[1]=t[1],a[2]=t[3],a[3]=t[4],(s=this.translate1Buffer.getView(i))[0]=t[6],s[1]=t[7],this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch()},"drawEdgeArrow")},{key:"drawEdgeLine",value:me(function(t,e){var r=t.pstyle("opacity").value,n=t.pstyle("line-opacity").value,i=t.pstyle("width").pfValue,a=t.pstyle("line-color").value,s=r*n,o=this.getEdgePoints(t);if(o.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==o.length)r=this.instanceCount,this.vertTypeBuffer.getView(r)[0]=1,eJ(e,this.indexBuffer.getView(r)),tJ(a,s,this.edgeColorBuffer.getView(r)),this.lineWidthBuffer.getView(r)[0]=i,(n=this.pointAPointBBuffer.getView(r))[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l<o.length-2;l+=2){var c=this.instanceCount,h=(this.vertTypeBuffer.getView(c)[0]=2,eJ(e,this.indexBuffer.getView(c)),tJ(a,s,this.edgeColorBuffer.getView(c)),this.lineWidthBuffer.getView(c)[0]=i,o[l-2]),u=o[l-1],d=o[l],p=o[l+1],g=o[l+2],f=o[l+3],m=o[l+4],y=o[l+5],v=(0==l&&(h=2*d-g+.001,u=2*p-f+.001),l==o.length-4&&(m=2*g-d+.001,y=2*f-p+.001),this.pointAPointBBuffer.getView(c));v[0]=h,v[1]=u,v[2]=d,v[3]=p,(h=this.pointCPointDBuffer.getView(c))[0]=g,h[1]=f,h[2]=m,h[3]=y,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},"drawEdgeLine")},{key:"getEdgePoints",value:me(function(t){var e=t._private.rscratch.allpts;return 4==e.length?e:(t=this.getNumSegments(t),this.getCurveSegmentPoints(e,t))},"getEdgePoints")},{key:"getNumSegments",value:me(function(t){return Math.min(Math.max(15,5),this.maxInstances)},"getNumSegments")},{key:"getCurveSegmentPoints",value:me(function(t,e){if(4==t.length)return t;for(var r=Array(2*(e+1)),n=0;n<=e;n++)0==n?(r[0]=t[0],r[1]=t[1]):n==e?(r[2*n]=t[t.length-2],r[2*n+1]=t[t.length-1]):this.setCurvePoint(t,n/e,r,2*n);return r},"getCurveSegmentPoints")},{key:"setCurvePoint",value:me(function(t,e,r,n){if(!(t.length<=2)){for(var i=Array(t.length-2),a=0;a<i.length;a+=2){var s=(1-e)*t[a]+e*t[a+2],o=(1-e)*t[a+1]+e*t[a+3];i[a]=s,i[a+1]=o}return this.setCurvePoint(i,e,r,n)}r[n]=t[0],r[n+1]=t[1]},"setCurvePoint")},{key:"endBatch",value:me(function(){var t=this.gl,e=this.vao,r=this.vertexCount,n=this.instanceCount;if(0!==n){var i,a=this.renderTarget.picking?this.pickingProgram:this.program,s=(t.useProgram(a),t.bindVertexArray(e),JK(this.buffers));try{for(s.s();!(i=s.n()).done;)i.value.bufferSubData(n)}catch(t){s.e(t)}finally{s.f()}for(var o=this.atlasManager.getAtlases(),l=0;l<o.length;l++)o[l].bufferIfNeeded(t);for(var c=0;c<o.length;c++)t.activeTexture(t.TEXTURE0+c),t.bindTexture(t.TEXTURE_2D,o[c].texture),t.uniform1i(a.uTextures[c],c);t.uniformMatrix3fv(a.uPanZoomMatrix,!1,this.panZoomMatrix),t.uniform1i(a.uAtlasSize,this.atlasManager.atlasSize),e=tJ(this.bgColor,1),t.uniform4fv(a.uBGColor,e),t.drawArraysInstanced(t.TRIANGLES,0,r,n),t.bindVertexArray(null),t.bindTexture(t.TEXTURE_2D,null),this.debugInfo&&this.debugInfo.push({count:n,atlasCount:o.length}),this.startBatch()}},"endBatch")},{key:"getDebugInfo",value:me(function(){return this.debugInfo},"getDebugInfo")},{key:"getAtlasDebugInfo",value:me(function(){return this.atlasManager.getDebugInfo()},"getAtlasDebugInfo")}]),ilt=M,me(vJ,"fillStyle"),me(O,"OverlayUnderlayRenderer"),GK(O,[{key:"getStyleKey",value:me(function(t,e){var r,n=(t=this.getStyle(t,e)).shape,i=t.opacity,t=t.color;return n?(r=e.width(),e=e.height(),t=vJ(t,i),pet("".concat(n,"-").concat(r,"-").concat(e,"-").concat(t))):null},"getStyleKey")},{key:"isVisible",value:me(function(t,e){return 0<e.pstyle("".concat(t,"-opacity")).value},"isVisible")},{key:"getStyle",value:me(function(t,e){return{opacity:e.pstyle("".concat(t,"-opacity")).value,color:e.pstyle("".concat(t,"-color")).value,shape:e.pstyle("".concat(t,"-shape")).value}},"getStyle")},{key:"getPadding",value:me(function(t,e){return e.pstyle("".concat(t,"-padding")).pfValue},"getPadding")},{key:"draw",value:me(function(t,e,r,n){var i,a,s,o,l;this.isVisible(t,r)&&(i=this.r,s=(a=n.w)/2,o=(n=n.h)/2,r=(t=this.getStyle(t,r)).shape,l=t.color,t=t.opacity,e.save(),e.fillStyle=vJ(l,t),"round-rectangle"===r||"roundrectangle"===r?i.drawRoundRectanglePath(e,s,o,a,n,"auto"):"ellipse"===r&&i.drawEllipsePath(e,s,o,a,n),e.fill(),e.restore())},"draw")}]),alt=O,me(xJ,"getBGColor"),slt={initWebgl:function(t,e){var n=this,r=n.data.contexts[n.WEBGL],i=t.cy.container(),i=(t.bgColor=xJ(i),t.webglTexSize=Math.min(t.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),n.webglDebug=t.webglDebug,n.webglDebugShowAtlases=t.webglDebugShowAtlases,console.log("max texture units",r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),console.log("max texture size",r.getParameter(r.MAX_TEXTURE_SIZE)),console.log("webgl options",t),n.pickingFrameBuffer=cJ(r),n.pickingFrameBuffer.needsDraw=!0,me(function(t){return n.getTextAngle(t,null)},"getLabelRotation")),a=me(function(t){return(t=t.pstyle("label"))&&t.value},"isLabelVisible"),s=(n.eleDrawing=new ilt(n,r,t),new alt(n)),o=(n.eleDrawing.addTextureRenderType("node-body",tlt({getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement,isVisible:me(function(t){return t.visible()},"isVisible")})),n.eleDrawing.addTextureRenderType("node-label",tlt({getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:i,getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a})),n.eleDrawing.addTextureRenderType("node-overlay",tlt({getBoundingBox:e.getElementBox,getKey:me(function(t){return s.getStyleKey("overlay",t)},"getKey"),drawElement:me(function(t,e,r){return s.draw("overlay",t,e,r)},"drawElement"),isVisible:me(function(t){return s.isVisible("overlay",t)},"isVisible"),getPadding:me(function(t){return s.getPadding("overlay",t)},"getPadding")})),n.eleDrawing.addTextureRenderType("node-underlay",tlt({getBoundingBox:e.getElementBox,getKey:me(function(t){return s.getStyleKey("underlay",t)},"getKey"),drawElement:me(function(t,e,r){return s.draw("underlay",t,e,r)},"drawElement"),isVisible:me(function(t){return s.isVisible("underlay",t)},"isVisible"),getPadding:me(function(t){return s.getPadding("underlay",t)},"getPadding")})),n.eleDrawing.addTextureRenderType("edge-label",tlt({getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:i,getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a})),Jtt(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4));n.onUpdateEleCalcs(function(t,e){var r=!1;e&&0<e.length&&(r|=n.eleDrawing.invalidate(e)),r&&o()}),bJ(n)}},me(bJ,"overrideCanvasRendererFunctions"),me(wJ,"clearWebgl"),me(kJ,"clearCanvas"),me(TJ,"createPanZoomMatrix"),me(EJ,"setContextTransform"),me(CJ,"drawSelectionRectangle"),me(SJ,"drawAxes"),me(_J,"drawAtlases"),me(AJ,"getPickingIndexes"),me(LJ,"findNearestElementsWebgl"),me(NJ,"renderWebgl"),olt={drawPolygonPath:function(t,e,r,n,i,a){var s=n/2,o=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*a[0],r+o*a[1]);for(var l=1;l<a.length/2;l++)t.lineTo(e+s*a[2*l],r+o*a[2*l+1]);t.closePath()},drawRoundPolygonPath:function(e,t,r,n,i,a,s){s.forEach(function(t){return FQ(e,t)}),e.closePath()},drawRoundRectanglePath:function(t,e,r,n,i,a){var s=n/2,o=i/2,n="auto"===a?Qrt(n,i):Math.min(a,o,s);t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.arcTo(e+s,r-o,e+s,r,n),t.arcTo(e+s,r+o,e,r+o,n),t.arcTo(e-s,r+o,e-s,r,n),t.arcTo(e-s,r-o,e,r-o,n),t.lineTo(e,r-o),t.closePath()},drawBottomRoundRectanglePath:function(t,e,r,n,i,a){var s=n/2,o=i/2,n="auto"===a?Qrt(n,i):a;t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.lineTo(e+s,r-o),t.lineTo(e+s,r),t.arcTo(e+s,r+o,e,r+o,n),t.arcTo(e-s,r+o,e-s,r,n),t.lineTo(e-s,r-o),t.lineTo(e,r-o),t.closePath()},drawCutRectanglePath:function(t,e,r,n,i,a,s){n/=2,i/=2,s="auto"===s?tnt():s,t.beginPath&&t.beginPath(),t.moveTo(e-n+s,r-i),t.lineTo(e+n-s,r-i),t.lineTo(e+n,r-i+s),t.lineTo(e+n,r+i-s),t.lineTo(e+n-s,r+i),t.lineTo(e-n+s,r+i),t.lineTo(e-n,r+i-s),t.lineTo(e-n,r-i+s),t.closePath()},drawBarrelPath:function(t,e,r,n,i){var a=e-(s=n/2),e=e+s,s=r-(o=i/2),r=r+o,n=(o=rnt(n,i)).widthOffset,i=o.heightOffset,o=o.ctrlPtOffsetPct*n;t.beginPath&&t.beginPath(),t.moveTo(a,s+i),t.lineTo(a,r-i),t.quadraticCurveTo(a+o,r,a+n,r),t.lineTo(e-n,r),t.quadraticCurveTo(e-o,r,e,r-i),t.lineTo(e,s+i),t.quadraticCurveTo(e-o,s,e-n,s),t.lineTo(a+n,s),t.quadraticCurveTo(a+o,s,a,s+i),t.closePath()}},llt=Math.sin(0),clt=Math.cos(0),hlt={},ult={},dlt=Math.PI/40,plt=0*Math.PI;plt<2*Math.PI;plt+=dlt)hlt[plt]=Math.sin(plt),ult[plt]=Math.cos(plt);olt.drawEllipsePath=function(t,e,r,n,i){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,i/2,0,0,2*Math.PI);else for(var a,s,o=n/2,l=i/2,c=0*Math.PI;c<2*Math.PI;c+=dlt)a=e-o*hlt[c]*llt+o*ult[c]*clt,s=r+l*ult[c]*llt+l*hlt[c]*clt,0===c?t.moveTo(a,s):t.lineTo(a,s);t.closePath()},glt={createBuffer:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]},bufferCanvasImage:function(t){var e=this.cy,r=e.mutableElements().boundingBox(),n=this.findContainerClientCoords(),i=t.full?Math.ceil(r.w):n[2],n=t.full?Math.ceil(r.h):n[3],a=at(t.maxWidth)||at(t.maxHeight),s=this.getPixelRatio(),o=1,l=(void 0!==t.scale?(i*=t.scale,n*=t.scale,o=t.scale):a&&(c=l=1/0,at(t.maxWidth)&&(l=o*t.maxWidth/i),at(t.maxHeight)&&(c=o*t.maxHeight/n),i*=o=Math.min(l,c),n*=o),a||(i*=s,n*=s,o*=s),document.createElement("canvas")),c=(l.width=i,l.height=n,l.style.width=i+"px",l.style.height=n+"px",l.getContext("2d"));return 0<i&&0<n&&(c.clearRect(0,0,i,n),c.globalCompositeOperation="source-over",a=this.getCachedZSortedEles(),t.full?(c.translate(-r.x1*o,-r.y1*o),c.scale(o,o),this.drawElements(c,a),c.scale(1/o,1/o),c.translate(r.x1*o,r.y1*o)):(r={x:(s=e.pan()).x*o,y:s.y*o},o*=e.zoom(),c.translate(r.x,r.y),c.scale(o,o),this.drawElements(c,a),c.scale(1/o,1/o),c.translate(-r.x,-r.y)),t.bg)&&(c.globalCompositeOperation="destination-over",c.fillStyle=t.bg,c.rect(0,0,i,n),c.fill()),l}},me(IJ,"b64ToBlob"),me(RJ,"b64UriToB64"),me(MJ,"output"),glt.png=function(t){return MJ(t,this.bufferCanvasImage(t),"image/png")},glt.jpg=function(t){return MJ(t,this.bufferCanvasImage(t),"image/jpeg")},flt={nodeShapeImpl:function(t,e,r,n,i,a,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,o);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}}},(ylt=(mlt=DJ).prototype).CANVAS_LAYERS=3,ylt.SELECT_BOX=0,ylt.DRAG=1,ylt.NODE=2,ylt.WEBGL=3,ylt.CANVAS_TYPES=["2d","2d","2d","webgl2"],ylt.BUFFER_COUNT=3,ylt.TEXTURE_BUFFER=0,ylt.MOTIONBLUR_BUFFER_NODE=1,ylt.MOTIONBLUR_BUFFER_DRAG=2,me(DJ,"CanvasRenderer"),ylt.redrawHint=function(t,e){switch(t){case"eles":this.data.canvasNeedsRedraw[ylt.NODE]=e;break;case"drag":this.data.canvasNeedsRedraw[ylt.DRAG]=e;break;case"select":this.data.canvasNeedsRedraw[ylt.SELECT_BOX]=e;break;case"gc":this.data.gc=!0}},vlt=typeof Path2D<"u",ylt.path2dEnabled=function(t){if(void 0===t)return this.pathsEnabled;this.pathsEnabled=!!t},ylt.usePaths=function(){return vlt&&this.pathsEnabled},ylt.setImgSmoothing=function(t,e){null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)},ylt.getImgSmoothing=function(t){return null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},ylt.makeOffscreenCanvas=function(t,e){var r;return"undefined"!==("u"<typeof OffscreenCanvas?"undefined":$K(OffscreenCanvas))?r=new OffscreenCanvas(t,e):((r=this.cy.window().document.createElement("canvas")).width=t,r.height=e),r},[Oot,Bot,jot,Yot,Hot,Vot,Kot,slt,olt,glt,flt].forEach(function(t){vtt(ylt,t)}),xlt=[{type:"layout",extensions:tot},{type:"renderer",extensions:[{name:"null",impl:$Q},{name:"base",impl:Sot},{name:"canvas",impl:mlt}]}],blt={},wlt={},me(OJ,"setExtension"),me(PJ,"getExtension"),me(BJ,"setModule"),me($J,"getModule"),klt=me(function(){return 2===arguments.length?PJ.apply(null,arguments):3===arguments.length?OJ.apply(null,arguments):4===arguments.length?$J.apply(null,arguments):5===arguments.length?BJ.apply(null,arguments):void Eet("Invalid extension access syntax")},"extension"),wst.prototype.extension=klt,xlt.forEach(function(e){e.extensions.forEach(function(t){OJ(e.type,t.name,t.impl)})}),Tlt=me(function t(){if(!(this instanceof t))return new t;this.length=0},"Stylesheet"),(Elt=Tlt.prototype).instanceString=function(){return"stylesheet"},Elt.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this},Elt.css=function(t,e){var r=this.length-1;if(YJ(t))this[r].properties.push({name:t,value:e});else if(XJ(t))for(var n=t,i=Object.keys(n),a=0;a<i.length;a++){var s=i[a],o=n[s];null!=o&&null!=(s=xst.properties[s]||xst.properties[dtt(s)])&&(s=s.name,this[r].properties.push({name:s,value:o}))}return this},Elt.style=Elt.css,Elt.generateStyle=function(t){return t=new xst(t),this.appendToStyle(t)},Elt.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,i=r.properties;t.selector(n);for(var a=0;a<i.length;a++){var s=i[a];t.css(s.name,s.value)}}return t},(Clt=me(function(t){return XJ(t=void 0===t?{}:t)?new wst(t):YJ(t)?klt.apply(klt,arguments):void 0},"cytoscape")).use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Clt),t.apply(null,e),this},Clt.warnings=function(t){return Cet(t)},Clt.version="3.31.0",Clt.stylesheet=Clt.Stylesheet=Tlt}),_lt=WBt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}me(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),s=r(9);function o(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in me(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=o},function(t,e,r){function n(t){this.vGraphObject=t}me(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(n in me(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;r<t.length;r++)t[r].withChildren().forEach(function(t){e.add(t)});return e},h.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),r=0;r<e.length;r++)t+=e[r].getNoOfChildren();return 0==t?1:t},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var t=-o.INITIAL_WORLD_BOUNDARY,e=o.INITIAL_WORLD_BOUNDARY,e=o.WORLD_CENTER_X+l.nextDouble()*(e-t)+t,t=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-t)+t;this.rect.x=e,this.rect.y=r},h.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var t,e;0!=this.getChild().getNodes().length&&((e=this.getChild()).updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(t=e.getRight()-e.getLeft(),e=e.getBottom()-e.getTop(),this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>e)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-e)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-e),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=h},function(t,e,r){function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){var n,i=r(2),d=r(10),a=r(0),s=r(6),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(t,e,r){i.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in me(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(n))throw"Node already in graph!";return(n.owner=this).getNodes().push(n),n}if(n=t,!(-1<this.getNodes().indexOf(e)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(e.owner!=r.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=r.owner?null:(n.source=e,n.target=r,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),r!=e&&r.edges.push(n),n)},u.prototype.remove=function(t){var e=t;if(t instanceof o){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,n=e.edges.slice(),i=n.length,a=0;a<i;a++)((r=n[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(s=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(t instanceof l){if(null==(r=t))throw"Edge is null!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(null==r.source.owner||null==r.target.owner||r.source.owner!=this||r.target.owner!=this)throw"Source and/or target owner is invalid!";var s,e=r.source.edges.indexOf(r),t=r.target.edges.indexOf(r);if(!(-1<e&&-1<t))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(e,1),r.target!=r.source&&r.target.edges.splice(t,1),-1==(s=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var t,e=d.MAX_VALUE,r=d.MAX_VALUE,n=this.getNodes(),i=n.length,a=0;a<i;a++){var s,o=n[a];(s=o.getTop())<e&&(e=s),(s=o.getLeft())<r&&(r=s)}return e==d.MAX_VALUE?null:(t=null!=n[0].getParent().paddingLeft?n[0].getParent().paddingLeft:this.margin,this.left=r-t,this.top=e-t,new c(this.left,this.top))},u.prototype.updateBounds=function(t){for(var e,r,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=d.MAX_VALUE,s=-d.MAX_VALUE,o=this.nodes,l=o.length,c=0;c<l;c++){var h=o[c];t&&null!=h.child&&h.updateBounds(),(e=h.getLeft())<n&&(n=e),i<(e=h.getRight())&&(i=e),(e=h.getTop())<a&&(a=e),s<(e=h.getBottom())&&(s=e)}var u=new p(n,a,i-n,s-a);n==d.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=u.x-r,this.right=u.x+u.width+r,this.top=u.y-r,this.bottom=u.y+u.height+r},u.calculateBounds=function(t){for(var e=d.MAX_VALUE,r=-d.MAX_VALUE,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=t.length,s=0;s<a;s++){var o,l=t[s];(o=l.getLeft())<e&&(e=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<n&&(n=o),i<(o=l.getBottom())&&(i=o)}return new p(e,n,r-e,i-n)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,r=e.length,n=0;n<r;n++)t+=e[n].calcEstimatedSize();return this.estimatedSize=0==t?a.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var e=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,n=new h,i=new Set,t=this.nodes[0];for(t.withChildren().forEach(function(t){n.push(t),i.add(t)});0!==n.length;)for(var a,s,o=(a=(t=n.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(t,this))||i.has(s)||s.withChildren().forEach(function(t){n.push(t),i.add(t)});this.isConnected=!1,i.size>=this.nodes.length&&(r=0,i.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function n(t){c=r(5),this.layout=t,this.graphs=[],this.edges=[]}me(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1<this.graphs.indexOf(t))throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return(t.parent=e).child=t}if(i=r,r=t,t=(n=e).getOwner(),e=i.getOwner(),null==t||t.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==e||e.getGraphManager()!=this)throw"Target not in this graph mgr!";if(t==e)return r.isInterGraph=!1,t.add(r,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,-1<this.edges.indexOf(r))throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},n.prototype.remove=function(t){if(t instanceof c){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var r,n=[],i=(n=n.concat(e.getEdges())).length,a=0;a<i;a++)r=n[a],e.remove(r);for(var s,o=[],i=(o=o.concat(e.getNodes())).length,a=0;a<i;a++)s=o[a],e.remove(s);e==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(e);this.graphs.splice(l,1),e.parent=null}else if(t instanceof h){if(null==(r=t))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(l=r.source.edges.indexOf(r),r.source.edges.splice(l,1),l=r.target.edges.indexOf(r),r.target.edges.splice(l,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";l=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(l,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),r=e.length,n=0;n<r;n++)t=t.concat(e[n].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],e=this.getGraphs(),r=(e.length,0);r<e.length;r++)t=t.concat(e[r].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=t).parent&&(t.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var r,n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}for(n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,e,r,n,i,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(e=(t=a[o]).source,r=t.target,t.lca=null,(t.sourceInLca=e)==(t.targetInLca=r))t.lca=e.getOwner();else{for(n=e.getOwner();null==t.lca;){for(i=(t.targetInLca=r).getOwner();null==t.lca;){if(i==n){t.lca=i;break}if(i==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=i.getParent(),i=t.targetInLca.getOwner()}if(n==this.rootGraph)break;null==t.lca&&(t.sourceInLca=n.getParent(),n=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var r=t.getOwner();null!=r;){for(var n=e.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},n.prototype.calcInclusionTreeDepths=function(t,e){null==t&&null==e&&(t=this.rootGraph,e=1);for(var r,n=t.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=e,null!=r.child&&this.calcInclusionTreeDepths(r.child,e+1)},n.prototype.includesInvalidEdge=function(){for(var t,e=this.edges.length,r=0;r<e;r++)if(t=this.edges[r],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},t.exports=n},function(t,e,r){var n,i=r(0);function a(){}for(n in me(a,"FDLayoutConstants"),i)a[n]=i[n];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=a},function(t,e,r){var h=r(12);function n(){}me(n,"IGeometry"),n.calcSeparationAmount=function(t,e,r,n){if(!t.intersects(e))throw"assert failed";var i=new Array(2),a=(this.decideDirectionsForOverlappingNodes(t,e,i),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]<t?t=r[0]:e=r[1],r[0]=-1*i[0]*(t/2+n),r[1]=-1*i[1]*(e/2+n)},n.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},n.getIntersection2=function(t,e,r){var n=t.getCenterX(),i=t.getCenterY(),a=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return r[0]=n,r[1]=i,r[2]=a,r[3]=s,!0;var o=t.getX(),l=t.getY(),c=t.getRight(),h=t.getX(),u=t.getBottom(),d=t.getRight(),p=t.getWidthHalf(),g=t.getHeightHalf(),f=e.getX(),m=e.getY(),y=e.getRight(),v=e.getX(),x=e.getBottom(),b=e.getRight(),w=e.getWidthHalf(),k=e.getHeightHalf(),T=!1,E=!1;if(n===a){if(s<i)return r[0]=n,r[1]=l,r[2]=a,r[3]=x,!1;i<s&&(r[0]=n,r[1]=u,r[2]=a,r[3]=m)}else if(i===s){if(a<n)return r[0]=o,r[1]=i,r[2]=y,r[3]=s,!1;n<a&&(r[0]=c,r[1]=i,r[2]=f,r[3]=s)}else{var t=t.height/t.width,e=e.height/e.width,C=(s-i)/(a-n),S=void 0,_=void 0,A=void 0;if(-t==C?(a<n?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):t==C&&(a<n?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),T=!0),-e==C?(n<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):e==C&&(n<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<n?s<i?(S=this.getCardinalDirection(t,C,4),this.getCardinalDirection(e,C,2)):(S=this.getCardinalDirection(-t,C,3),this.getCardinalDirection(-e,C,1)):s<i?(S=this.getCardinalDirection(-t,C,1),this.getCardinalDirection(-e,C,3)):(S=this.getCardinalDirection(t,C,2),this.getCardinalDirection(e,C,4)),!T)switch(S){case 1:_=l,r[0]=n+-g/C,r[1]=_;break;case 2:_=i+p*C,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=n+g/C,r[1]=_;break;case 4:_=i+-p*C,r[0]=h,r[1]=_}if(!E)switch(c){case 1:A=m,r[2]=a+-k/C,r[3]=A;break;case 2:A=s+w*C,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/C,r[3]=A;break;case 4:A=s+-w*C,r[2]=v,r[3]=A}}return!1},n.getCardinalDirection=function(t,e,r){return e<t?r:1+r%4},n.getIntersection=function(t,e,r,n){var i,a,s,o,l,c;return null==n?this.getIntersection2(t,e,r):(i=t.x,a=e.x,l=r.x,o=a*(t=t.y)-i*(e=e.y),c=(s=n.x)*(r=r.y)-l*(n=n.y),0==(n=(e-=t)*(t=l-s)-(l=n-r)*(s=i-a))?null:new h((s*c-t*o)/n,(l*o-e*c)/n))},n.angleOfVector=function(t,e,r,n){var i=void 0;return t!==r?(i=Math.atan((n-e)/(r-t)),r<t?i+=Math.PI:n<e&&(i+=this.TWO_PI)):i=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},n.doIntersect=function(t,e,r,n){var i=t.x,t=t.y,a=e.x,e=e.y,s=r.x,r=r.y,o=n.x,l=(a-i)*((n=n.y)-r)-(o-s)*(e-t);return 0!=l&&(e=((t-e)*(o-i)+(a-i)*(n-t))/l,0<(a=((n-r)*(o-i)+(s-o)*(n-t))/l))&&a<1&&0<e&&e<1},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,r){function n(){}me(n,"IMath"),n.sign=function(t){return 0<t?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,r){function n(){}me(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(n,"defineProperties"),me(i,"_classCallCheck");var a,s,o=me(function(t){return{value:t,next:null,prev:null}},"nodeFrom"),l=me(function(t,e,r,n){return null!==t?t.next=e:n.head=e,null!==r?r.prev=e:n.tail=e,e.prev=t,e.next=r,n.length++,e},"add"),c=me(function(t,e){var r=t.prev,n=t.next;return null!==r?r.next=n:e.head=n,null!==n?n.prev=r:e.tail=r,t.prev=t.next=null,e.length--,t},"_remove");function h(t){var e=this;i(this,h),this.length=0,this.head=null,this.tail=null,t?.forEach(function(t){return e.push(t)})}me(h,"LinkedList"),a=h,s=[{key:"size",value:me(function(){return this.length},"size")},{key:"insertBefore",value:me(function(t,e){return l(e.prev,o(t),e,this)},"insertBefore")},{key:"insertAfter",value:me(function(t,e){return l(e,o(t),e.next,this)},"insertAfter")},{key:"insertNodeBefore",value:me(function(t,e){return l(e.prev,t,e,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:me(function(t,e){return l(e,t,e.next,this)},"insertNodeAfter")},{key:"push",value:me(function(t){return l(this.tail,o(t),null,this)},"push")},{key:"unshift",value:me(function(t){return l(null,o(t),this.head,this)},"unshift")},{key:"remove",value:me(function(t){return c(t,this)},"remove")},{key:"pop",value:me(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:me(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:me(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:me(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:me(function(t){if(t<=this.length()){for(var e=1,r=this.head;e<t;)r=r.next,e++;return r.value}},"get_object_at")},{key:"set_object_at",value:me(function(t,e){if(t<=this.length()){for(var r=1,n=this.head;r<t;)n=n.next,r++;n.value=e}},"set_object_at")}],n(a.prototype,s),t.exports=h},function(t,e,r){function n(t,e,r){this.x=null,(this.y=null)==t&&null==e&&null==r?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==r?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==r&&(this.x=(r=t).x,this.y=r.y)}me(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(t,e,r){"Point"==t.constructor.name&&null==e&&null==r?this.setLocation((r=t).x,r.y):"number"==typeof t&&"number"==typeof e&&null==r&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},n.prototype.move=function(t,e){this.x=t,this.y=e},n.prototype.translate=function(t,e){this.x+=t,this.y+=e},n.prototype.equals=function(t){return"Point"==t.constructor.name?this.x==t.x&&this.y==t.y:this==t},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){function n(t,e,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=r&&null!=n&&(this.x=t,this.y=e,this.width=r,this.height=n)}me(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(t){this.x=t},n.prototype.getY=function(){return this.y},n.prototype.setY=function(t){this.y=t},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}me(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(null==t.uniqueID&&(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return"Object#"+(null==t?i.lastID:t)},i.isPrimitive=function(t){var e="u"<typeof t?"undefined":n(t);return null==t||"object"!=e&&"function"!=e},t.exports=i},function(t,e,r){function g(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(g,"_toConsumableArray");var n=r(0),i=r(6),a=r(3),s=r(1),o=r(5),l=r(4),c=r(17),h=r(27);function u(t){h.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}me(u,"Layout"),u.RANDOM_SEED=1,(u.prototype=Object.create(h.prototype)).getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t},u.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},u.prototype.newNode=function(t){return new a(this.graphManager,t)},u.prototype.newEdge=function(t){return new s(null,null,t)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==n.ANIMATE&&(t&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},u.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];for(var r=this.graphManager.getRoot().getNodes(),e=0;e<r.length;e++)r[e];this.update(this.graphManager.getRoot())}},u.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof a){var e=t;if(null!=e.getChild())for(var r=e.getChild().getNodes(),n=0;n<r.length;n++)update(r[n]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else t instanceof s?null!=t.vGraphObject&&t.vGraphObject.update(t):t instanceof o&&null!=t.vGraphObject&&t.vGraphObject.update(t)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},u.prototype.transform=function(t){if(null==t)this.transform(new l(0,0));else{var e=new c,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(r.x),e.setDeviceOrgY(r.y);for(var n=this.getAllNodes(),i=0;i<n.length;i++)n[i].transform(e)}}},u.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,r,n=t.getNodes(),i=0;i<n.length;i++)null==(r=(e=n[i]).getChild())||0==r.getNodes().length?e.scatter():(this.positionNodesRandomly(r),e.updateBounds())},u.prototype.getFlatForest=function(){for(var t=[],e=!0,r=this.graphManager.getRoot().getNodes(),n=!0,i=0;i<r.length;i++)null!=r[i].getChild()&&(n=!1);if(n)for(var a=new Set,s=[],o=new Map,l=(l=[]).concat(r);0<l.length&&e;){for(s.push(l[0]);0<s.length&&e;){var c=s[0];s.splice(0,1),a.add(c);for(var h=c.getEdges(),i=0;i<h.length;i++){var u=h[i].getOtherEnd(c);if(o.get(c)!=u){if(a.has(u)){e=!1;break}s.push(u),o.set(u,c)}}}if(e){var d=[].concat(g(a));for(t.push(d),i=0;i<d.length;i++){var p=d[i];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,o=new Map}else t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i<t.bendpoints.length;i++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),n.add(a),this.newEdge(null));this.graphManager.add(s,r,a),e.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,t.target),this.edgeToDummyNodes.set(t,e),(t.isInterGraph()?this.graphManager:n).remove(t),e},u.prototype.createBendpointsFromDummyNodes=function(){for(var t=(t=[]).concat(this.graphManager.getAllEdges()),t=[].concat(g(this.edgeToDummyNodes.keys())).concat(t),e=0;e<t.length;e++){var r=t[e];if(0<r.bendpoints.length){for(var n=this.edgeToDummyNodes.get(r),i=0;i<n.length;i++){var a=n[i],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(i);o.x=s.x,o.y=s.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(t,e,r,n){var i,a;return null!=r&&null!=n?(i=e,t<=50?i-=(e-e/r)/50*(50-t):i+=(e*n-e)/50*(t-50),i):(r=t<=50?(a=9*e/500,e/10):(a=9*e/50,-8*e),a*t+r)},u.findCenterOfTree=function(t){var e=(e=[]).concat(t),r=[],n=new Map,i=!1,a=null;1!=e.length&&2!=e.length||(i=!0,a=e[0]);for(var s=0;s<e.length;s++){var o=(c=e[s]).getNeighborsList().size;n.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!i;){[].concat(l);for(var l=[],s=0;s<e.length;s++){var c=e[s],h=e.indexOf(c);0<=h&&e.splice(h,1),c.getNeighborsList().forEach(function(t){var e;r.indexOf(t)<0&&(1==(e=n.get(t)-1)&&l.push(t),n.set(t,e))})}r=r.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,r){function n(){}me(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return(n.x=1e4*Math.sin(n.seed++))-Math.floor(n.x)},t.exports=n},function(t,e,r){var n=r(4);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}me(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=this.lworldExtX;return 0!=e?this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/e:0},i.prototype.transformY=function(t){var e=this.lworldExtY;return 0!=e?this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/e:0},i.prototype.inverseTransformX=function(t){var e=this.ldeviceExtX;return 0!=e?this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/e:0},i.prototype.inverseTransformY=function(t){var e=this.ldeviceExtY;return 0!=e?this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/e:0},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,r){function d(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(d,"_toConsumableArray");var n,i=r(15),p=r(7),o=r(0),c=r(8),h=r(9);function a(){i.call(this),this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.springConstant=p.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=p.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=p.MAX_ITERATIONS}for(n in me(a,"FDLayout"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=p.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var t,e,r,n,i,a=this.getGraphManager().getAllEdges(),s=0;s<a.length;s++)(t=a[s]).idealLength=this.idealEdgeLength,t.isInterGraph&&(e=t.getSource(),r=t.getTarget(),n=t.getSourceInLca().getEstimatedSize(),i=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=n+i-2*o.SIMPLE_NODE_SIZE),n=t.getLca().getInclusionTreeDepth(),t.idealLength+=p.DEFAULT_EDGE_LENGTH*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(e.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*n))},a.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),r=0;r<e.length;r++)t=e[r],this.calcSpringForce(t,t.idealLength)},a.prototype.calcRepulsionForces=function(){var t,e,r,n,i,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),i=new Set,t=0;t<o.length;t++)r=o[t],this.calculateRepulsionForceOfANode(r,i,a,s),i.add(r);else for(t=0;t<o.length;t++)for(r=o[t],e=t+1;e<o.length;e++)n=o[e],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},a.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),r=0;r<e.length;r++)t=e[r],this.calcGravitationalForce(t)},a.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},a.prototype.calcSpringForce=function(t,e){var r,n,i=t.getSource(),a=t.getTarget();if(this.uniformLeafNodeSizes&&null==i.getChild()&&null==a.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(r=t.getLength())&&(n=(e=this.springConstant*(r-e))*(t.lengthX/r),t=t.lengthY/r*e,i.springForceX+=n,i.springForceY+=t,a.springForceX-=n,a.springForceY-=t)},a.prototype.calcRepulsionForce=function(t,e){var r,n,i,a=t.getRect(),s=e.getRect(),o=new Array(2),l=new Array(4);a.intersects(s)?(c.calcSeparationAmount(a,s,o,p.DEFAULT_EDGE_LENGTH/2),n=2*o[0],i=2*o[1],o=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren),t.repulsionForceX-=o*n,t.repulsionForceY-=o*i,e.repulsionForceX+=o*n,e.repulsionForceY+=o*i):(o=this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(r=s.getCenterX()-a.getCenterX(),s.getCenterY()-a.getCenterY()):(c.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?h.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?h.sign(o)*p.MIN_REPULSION_DIST:o)*o,s=Math.sqrt(a),i=(l=this.repulsionConstant*t.noOfChildren*e.noOfChildren/a)*o/s,t.repulsionForceX-=n=l*r/s,t.repulsionForceY-=i,e.repulsionForceX+=n,e.repulsionForceY+=i)},a.prototype.calcGravitationalForce=function(t){var e,r=t.getOwner(),n=(r.getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,n=t.getCenterX()-n,i=t.getCenterY()-i,a=Math.abs(n)+t.getWidth()/2,s=Math.abs(i)+t.getHeight()/2;t.getOwner()==this.graphManager.getRoot()?((e=r.getEstimatedSize()*this.gravityRangeFactor)<a||e<s)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*i):((e=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||e<s)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*i*this.compoundGravityConstant)},a.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),r=0;r<e.length;r++)(t=e[r]).noOfChildren=t.getNoOfChildren()},a.prototype.calcGrid=function(t){for(var e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange)),n=new Array(e),i=0;i<e;i++)n[i]=new Array(r);for(i=0;i<e;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},a.prototype.addNodeToGrid=function(t,e,r){for(var n=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),i=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-r)/this.repulsionRange)),o=n;o<=i;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(t),t.setGridCoordinates(n,i,a,s)},a.prototype.updateGrid=function(){var t,e,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<r.length;t++)e=r[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(t,e,r,n){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var i=new Set;t.surrounding=new Array;for(var a=this.grid,s=t.startX-1;s<t.finishX+2;s++)for(var o=t.startY-1;o<t.finishY+2;o++)if(!(s<0||o<0||s>=a.length||o>=a[0].length))for(var l=0;l<a[s][o].length;l++){var c,h,u=a[s][o][l];t.getOwner()!=u.getOwner()||t==u||e.has(u)||i.has(u)||(c=Math.abs(t.getCenterX()-u.getCenterX())-(t.getWidth()/2+u.getWidth()/2),h=Math.abs(t.getCenterY()-u.getCenterY())-(t.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=this.repulsionRange&&i.add(u))}t.surrounding=[].concat(d(i))}for(s=0;s<t.surrounding.length;s++)this.calcRepulsionForce(t,t.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},t.exports=a},function(t,e,r){var n,i=r(1),a=r(7);function s(t,e,r){i.call(this,t,e,r),this.idealLength=a.DEFAULT_EDGE_LENGTH}for(n in me(s,"FDLayoutEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];t.exports=s},function(t,e,r){var n,i=r(3);function a(t,e,r,n){i.call(this,t,e,r,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(n in me(a,"FDLayoutNode"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.setGridCoordinates=function(t,e,r,n){this.startX=t,this.finishX=e,this.startY=r,this.finishY=n},t.exports=a},function(t,e,r){function n(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}me(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},t.exports=n},function(t,e,r){var n=r(14);function i(){this.map={},this.keys=[]}me(i,"HashMap"),i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),null!=this.map[t]},i.prototype.get=function(t){return t=n.createID(t),this.map[t]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){var n=r(14);function i(){this.set={}}me(i,"HashSet"),i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,n=0;n<r;n++)t.push(this.set[e[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var n=t[r];this.add(n)}},t.exports=i},function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(n,"defineProperties"),me(i,"_classCallCheck");var a,s,o=r(11),r=(me(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:me(function(t,e,r){var n;e<r&&(n=this._partition(t,e,r),this._quicksort(t,e,n),this._quicksort(t,n+1,r))},"_quicksort")},{key:"_partition",value:me(function(t,e,r){for(var n=this._get(t,e),i=e,a=r;;){for(;this.compareFunction(n,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,i),n);)i++;if(!(i<a))return a;this._swap(t,i,a),i++,a--}},"_partition")},{key:"_get",value:me(function(t,e){return t instanceof o?t.get_object_at(e):t[e]},"_get")},{key:"_set",value:me(function(t,e,r){t instanceof o?t.set_object_at(e,r):t[e]=r},"_set")},{key:"_swap",value:me(function(t,e,r){var n=this._get(t,e);this._set(t,e,this._get(t,r)),this._set(t,r,n)},"_swap")},{key:"_defaultCompareFunction",value:me(function(t,e){return t<e},"_defaultCompareFunction")}],n(a.prototype,s),l);function l(t,e){i(this,l),null===e&&void 0===e||(this.compareFunction=this._defaultCompareFunction),e=void 0,e=t instanceof o?t.size():t.length,this._quicksort(t,0,e-1)}t.exports=r},function(t,e,r){var n,i;function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;c(this,h),this.sequence1=t,this.sequence2=e,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=i,this.iMax=t.length+1,this.jMax=e.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[a][s]=0}this.tracebackGrid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.tracebackGrid[o]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[o][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}me(a,"defineProperties"),me(c,"_classCallCheck"),me(h,"NeedlemanWunsch"),n=h,i=[{key:"getScore",value:me(function(){return this.score},"getScore")},{key:"getAlignments",value:me(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:me(function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:me(function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],r=this.tracebackGrid[e.pos[0]][e.pos[1]];r[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),r[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),r[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:me(function(t,e){for(var r=[],n=-1;-1!==(n=t.indexOf(e,n+1));)r.push(n);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:me(function(t){return this.getAllIndexes(t,Math.max.apply(null,t))},"arrayAllMaxIndexes")}],a(n.prototype,i),t.exports=h},function(t,e,r){var n=me(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(7),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(4),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(24),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(5),n.LEdge=r(1),n.LGraphManager=r(6),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(25),t.exports=n},function(t,e,r){function n(){this.listeners=[]}me(n,"Emitter");var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;0<=r;r--){var n=this.listeners[r];n.event===t&&n.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];t===n.event&&n.callback(e)}},t.exports=n}],i={},me(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?me(function(){return t.default},"getDefault"):me(function(){return t},"getModuleExports");return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=26);function n(t){var e;return(i[t]||(e=i[t]={i:t,l:!1,exports:{}},r[t].call(e.exports,e,e.exports,n),e.l=!0,e)).exports}var r,i})}),Alt=WBt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(_lt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(_lt()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,r){var n,i=r(0).FDLayoutConstants;function a(){}for(n in me(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=a},function(t,e,r){var n,i=r(0).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraphManager;function a(t){i.call(this,t)}for(n in me(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).FDLayoutNode,a=r(0).IMath;function s(t,e,r,n){i.call(this,t,e,r,n)}for(n in me(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).getChild()?(r.moveBy(t,e),r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},s.prototype.setPred1=function(t){this.pred1=t},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(t){this.next=t},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(t){this.processed=t},s.prototype.isProcessed=function(){return processed},t.exports=s},function(t,e,r){var n,i=r(0).FDLayout,a=r(4),s=r(3),h=r(5),o=r(2),u=r(1),g=r(0).FDLayoutConstants,d=r(0).LayoutConstants,p=r(0).Point,f=r(0).PointD,m=r(0).Layout,y=r(0).Integer,v=r(0).IGeometry,l=r(0).LGraph,c=r(0).Transform;function x(){i.call(this),this.toBeTiled={}}for(n in me(x,"CoSELayout"),x.prototype=Object.create(i.prototype),i)x[n]=i[n];x.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},x.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},x.prototype.newNode=function(t){return new h(this.graphManager,t)},x.prototype.newEdge=function(t){return new o(null,null,t)},x.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(u.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=u.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=u.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=g.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=g.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=g.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=g.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/g.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=g.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){var t,e,r;return this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental?u.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(t=this.getFlatForest()).length?this.positionNodesRadially(t):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),this.initSpringEmbedder(),this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%g.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}var e;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var t=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(t,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r<t.length;r++){var n=t[r].rect,i=t[r].id;e[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return e},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===g.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},x.prototype.calculateNodesToApplyGravitationTo=function(){for(var t,e=[],r=this.graphManager.getGraphs(),n=r.length,i=0;i<n;i++)(t=r[i]).updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},x.prototype.createBendpoints=function(){for(var t=(t=[]).concat(this.graphManager.getAllEdges()),e=new Set,r=0;r<t.length;r++){var n=t[r];if(!e.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new f),n.getBendpoints().push(new f),this.createDummyNodesForBendpoints(n),e.add(n);else{var s=(s=(s=[]).concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i));if(!e.has(s[0])){if(1<s.length)for(var o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new f),this.createDummyNodesForBendpoints(l)}s.forEach(function(t){e.add(t)})}}}if(e.size==t.length)break}},x.prototype.positionNodesRadially=function(t){for(var e=new p(0,0),r=Math.ceil(Math.sqrt(t.length)),n=0,i=0,a=0,s=new f(0,0),o=0;o<t.length;o++){o%r==0&&(i=n,(a=0)!=o&&(i+=u.DEFAULT_COMPONENT_SEPERATION),n=0);var l=t[o],c=m.findCenterOfTree(l);e.x=a,e.y=i,(s=x.radialLayout(l,c,e)).y>n&&(n=Math.floor(s.y)),a=Math.floor(s.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},x.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),u.DEFAULT_RADIAL_SEPARATION),e=(x.branchRadialLayout(e,null,0,359,0,n),l.calculateBounds(t)),i=new c;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;a<t.length;a++)t[a].transform(i);return n=new f(e.getMaxX(),e.getMaxY()),i.inverseTransformPoint(n)},x.branchRadialLayout=function(t,e,r,n,i,a){(s=(n-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),i*Math.cos(s)),s=i*Math.sin(s),l=(t.setCenter(o,s),[]),c=(l=l.concat(t.getEdges())).length;null!=e&&c--;for(var h=0,u=l.length,d=t.getEdgesBetween(e);1<d.length;){var p=d[0];d.splice(0,1),0<=(p=l.indexOf(p))&&l.splice(p,1),u--,c--}for(var o=null!=e?(l.indexOf(d[0])+1)%u:0,g=Math.abs(n-r)/c,f=o;h!=c;f=++f%u){var m=l[f].getOtherEnd(t);m!=e&&(x.branchRadialLayout(m,t,m=(r+h*g)%360,(m+g)%360,i+a,a),h++)}},x.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,r=0;r<t.length;r++){var n=t[r].getDiagonal();e<n&&(e=n)}return e},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var l=this,c={};this.memberGroups={},this.idToDummyNode={};for(var t=[],e=this.graphManager.getAllNodes(),r=0;r<e.length;r++){var n=(i=e[r]).getParent();0!==this.getNodeDegreeWithChildren(i)||null!=n.id&&this.getToBeTiled(n)||t.push(i)}for(r=0;r<t.length;r++){var i,a=(i=t[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(i)}Object.keys(c).forEach(function(t){if(1<c[t].length){var e="DummyCompound_"+t,r=(l.memberGroups[e]=c[t],c[t][0].getParent()),n=new h(l.graphManager),i=(n.id=e,n.paddingLeft=r.paddingLeft||0,n.paddingRight=r.paddingRight||0,n.paddingBottom=r.paddingBottom||0,n.paddingTop=r.paddingTop||0,l.idToDummyNode[e]=n,l.getGraphManager().add(l.newGraph(),n)),a=r.getChild();a.add(n);for(var s=0;s<c[t].length;s++){var o=c[t][s];a.remove(o),i.add(o)}}})},x.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)e[this.compoundOrder[r].id]=this.compoundOrder[r],t[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},x.prototype.clearZeroDegreeMembers=function(){var r=this,n=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(t){var e=r.idToDummyNode[t];n[t]=r.tileNodes(r.memberGroups[t],e.paddingLeft+e.paddingRight),e.rect.width=n[t].width,e.rect.height=n[t].height})},x.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop)}},x.prototype.repopulateZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(t){var e=n.idToDummyNode[t],r=e.paddingLeft;n.adjustLocations(i[t],e.rect.x,e.rect.y,r,e.paddingTop)})},x.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),n=0;n<r.length;n++){var i=r[n];if(0<this.getNodeDegree(i))return this.toBeTiled[e]=!1;if(null==i.getChild())this.toBeTiled[i.id]=!1;else if(!this.getToBeTiled(i))return this.toBeTiled[e]=!1}return this.toBeTiled[e]=!0},x.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,n=0;n<e.length;n++){var i=e[n];i.getSource().id!==i.getTarget().id&&(r+=1)}return r},x.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null!=t.getChild())for(var r=t.getChild().getNodes(),n=0;n<r.length;n++){var i=r[n];e+=this.getNodeDegreeWithChildren(i)}return e},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var r=t[e];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},x.prototype.adjustLocations=function(t,e,r,n,i){r+=i;for(var a=e+=n,s=0;s<t.rows.length;s++){var o=t.rows[s];e=a;for(var l=0,c=0;c<o.length;c++){var h=o[c];h.rect.x=e,h.rect.y=r,e+=h.rect.width+t.horizontalPadding,h.rect.height>l&&(l=h.rect.height)}r+=l+t.verticalPadding}},x.prototype.tileCompoundMembers=function(r,n){var i=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(t){var e=n[t];i.tiledMemberPack[t]=i.tileNodes(r[t],e.paddingLeft+e.paddingRight),e.rect.width=i.tiledMemberPack[t].width,e.rect.height=i.tiledMemberPack[t].height})},x.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height<e.rect.width*e.rect.height?1:0});for(var n=0;n<t.length;n++){var i=t[n];0==r.rows.length?this.insertNodeToRow(r,i,0,e):this.canAddHorizontal(r,i.rect.width,i.rect.height)?this.insertNodeToRow(r,i,this.getShortestRowIndex(r),e):this.insertNodeToRow(r,i,r.rows.length,e),this.shiftToLastRow(r)}return r},x.prototype.insertNodeToRow=function(t,e,r,n){r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(n),t.rowHeight.push(0));var n=t.rowWidth[r]+e.rect.width,n=(0<t.rows[r].length&&(n+=t.horizontalPadding),t.rowWidth[r]=n,t.width<n&&(t.width=n),e.rect.height),i=(0<r&&(n+=t.verticalPadding),0);n>t.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]<r&&(e=n,r=t.rowWidth[n]);return e},x.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]>r&&(e=n,r=t.rowWidth[n]);return e},x.prototype.canAddHorizontal=function(t,e,r){var n,i,a=this.getShortestRowIndex(t);return a<0||(i=t.rowWidth[a])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[a]<r&&0<a&&(n=r+t.verticalPadding-t.rowHeight[a]),a=e+t.horizontalPadding<=t.width-i?(t.height+n)/(i+e+t.horizontalPadding):(t.height+n)/t.width,n=r+t.verticalPadding,(a<1?1/a:a)<((i=t.width<e?(t.height+n)/e:(t.height+n)/t.width)<1?1/i:i))},x.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,n=t.rows[e],i=n[n.length-1],a=i.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;o<n.length;o++)n[o].height>s&&(s=n[o].height);0<e&&(s+=t.verticalPadding),a=t.rowHeight[e]+t.rowHeight[r],t.rowHeight[e]=s,t.rowHeight[r]<i.height+t.verticalPadding&&(t.rowHeight[r]=i.height+t.verticalPadding),i=t.rowHeight[e]+t.rowHeight[r],t.height+=i-a,this.shiftToLastRow(t)}},x.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var t,e=[],r=!0;r;){for(var n=this.graphManager.getAllNodes(),i=[],r=!1,a=0;a<n.length;a++)1!=(t=n[a]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(i.push([t,t.getEdges()[0],t.getOwner()]),r=!0);if(1==r){for(var s=[],o=0;o<i.length;o++)1==i[o][0].getEdges().length&&(s.push(i[o]),i[o][0].getOwner().remove(i[o][0]));e.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},x.prototype.growTree=function(t){for(var e,r=t[t.length-1],n=0;n<r.length;n++)e=r[n],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(t){var e=t[0],r=(t=e==t[1].source?t[1].target:t[1].source).startX,n=t.finishX,i=t.startY,a=t.finishY,s=[0,0,0,0];if(0<i)for(var o=r;o<=n;o++)s[0]+=this.grid[o][i-1].length+this.grid[o][i].length-1;if(n<this.grid.length-1)for(o=i;o<=a;o++)s[1]+=this.grid[n+1][o].length+this.grid[n][o].length-1;if(a<this.grid[0].length-1)for(o=r;o<=n;o++)s[2]+=this.grid[o][a+1].length+this.grid[o][a].length-1;if(0<r)for(o=i;o<=a;o++)s[3]+=this.grid[r-1][o].length+this.grid[r][o].length-1;for(var l,c,h,u,d=y.MAX_VALUE,p=0;p<s.length;p++)s[p]<d?(d=s[p],l=1,c=p):s[p]==d&&l++;3==l&&0==d?0==s[0]&&0==s[1]&&0==s[2]?h=1:0==s[0]&&0==s[1]&&0==s[3]?h=0:0==s[0]&&0==s[2]&&0==s[3]?h=3:0==s[1]&&0==s[2]&&0==s[3]&&(h=2):h=2==l&&0==d?(u=Math.floor(2*Math.random()),0==s[0]&&0==s[1]?0==u?0:1:0==s[0]&&0==s[2]?0==u?0:2:0==s[0]&&0==s[3]?0==u?0:3:0==s[1]&&0==s[2]?0==u?1:2:0==s[1]&&0==s[3]?0==u?1:3:0==u?2:3):4==l&&0==d?u=Math.floor(4*Math.random()):c,0==h?e.setCenter(t.getCenterX(),t.getCenterY()-t.getHeight()/2-g.DEFAULT_EDGE_LENGTH-e.getHeight()/2):1==h?e.setCenter(t.getCenterX()+t.getWidth()/2+g.DEFAULT_EDGE_LENGTH+e.getWidth()/2,t.getCenterY()):2==h?e.setCenter(t.getCenterX(),t.getCenterY()+t.getHeight()/2+g.DEFAULT_EDGE_LENGTH+e.getHeight()/2):e.setCenter(t.getCenterX()-t.getWidth()/2-g.DEFAULT_EDGE_LENGTH-e.getWidth()/2,t.getCenterY())},t.exports=x},function(t,e,r){var n={};n.layoutBase=r(0),n.CoSEConstants=r(1),n.CoSEEdge=r(2),n.CoSEGraph=r(3),n.CoSEGraphManager=r(4),n.CoSELayout=r(6),n.CoSENode=r(5),t.exports=n}],a={},me(n,"__webpack_require__"),n.m=i,n.c=a,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?me(function(){return t.default},"getDefault"):me(function(){return t},"getModuleExports");return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7);function n(t){var e;return(a[t]||(e=a[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,n),e.l=!0,e)).exports}var i,a})}),Llt=WBt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(Alt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeCoseBilkent=e(Alt()):t.cytoscapeCoseBilkent=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,r){var n=r(0).layoutBase.LayoutConstants,i=r(0).layoutBase.FDLayoutConstants,a=r(0).CoSEConstants,g=r(0).CoSELayout,u=r(0).CoSENode,d=r(0).layoutBase.PointD,p=r(0).layoutBase.DimensionD,s={ready:me(function(){},"ready"),stop:me(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function o(t,e){var r,n={};for(r in t)n[r]=t[r];for(r in e)n[r]=e[r];return n}function l(t){this.options=o(s,t),c(this.options)}me(o,"extend"),me(l,"_CoSELayout");var c=me(function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?n.QUALITY=0:"proof"==t.quality?n.QUALITY=2:n.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=i.ANIMATE=n.ANIMATE=t.animate,a.TILE=t.tile,a.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,t=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),e=(this.gm=t,this.options.eles.nodes()),r=this.options.eles.edges();this.root=t.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(e),c);for(var n=0;n<r.length;n++){var i=r[n],a=this.idToLNode[i.data("source")],u=this.idToLNode[i.data("target")];a!==u&&0==a.getEdgesBetween(u).length&&(t.add(c.newEdge(),a,u).id=i.id())}var d=me(function(t,e){return e=(t="number"==typeof t?e:t).data("id"),{x:(t=h.idToLNode[e]).getRect().getCenterX(),y:t.getRect().getCenterY()}},"getPositions"),p=me(function t(){for(var e,a,r=me(function(){l.fit&&l.cy.fit(l.eles,l.padding),s||(s=!0,h.cy.one("layoutready",l.ready),h.cy.trigger({type:"layoutready",layout:h}))},"afterReposition"),n=h.options.refresh,i=0;i<n&&!e;i++)e=h.stopped||h.layout.tick();e?(c.checkLayoutSuccess()&&!c.isSubLayout&&c.doPostLayout(),c.tilingPostLayout&&c.tilingPostLayout(),c.isLayoutFinished=!0,h.options.eles.nodes().positions(d),r(),h.cy.one("layoutstop",h.options.stop),h.cy.trigger({type:"layoutstop",layout:h}),o&&cancelAnimationFrame(o),s=!1):(a=h.layout.getPositionsData(),l.eles.nodes().positions(function(t,e){if(!(t="number"==typeof t?e:t).isParent()){for(var r=t.id(),n=a[r],i=t;null==n&&(n=a[i.data("parent")]||a["DummyCompound_"+i.data("parent")],a[r]=n,null!=(i=i.parent()[0])););return null!=n?{x:n.x,y:n.y}:{x:t.position("x"),y:t.position("y")}}}),r(),o=requestAnimationFrame(t))},"iterateAnimated");return c.addListener("layoutstarted",function(){"during"===h.options.animate&&(o=requestAnimationFrame(p))}),c.runLayout(),"during"!==this.options.animate&&(h.options.eles.nodes().not(":parent").layoutPositions(h,h.options,d),s=!1),this},l.prototype.getTopMostNodes=function(t){for(var n={},e=0;e<t.length;e++)n[t[e].id()]=!0;return t.filter(function(t,e){for(var r=(t="number"==typeof t?e:t).parent()[0];null!=r;){if(n[r.id()])return!1;r=r.parent()[0]}return!0})},l.prototype.processChildrenList=function(t,e,r){for(var n=e.length,i=0;i<n;i++){var a,s,o,l=e[i],c=l.children(),h=l.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?t.add(new u(r.graphManager,new d(l.position("x")-h.w/2,l.position("y")-h.h/2),new p(parseFloat(h.w),parseFloat(h.h)))):t.add(new u(this.graphManager))).id=l.data("id"),h.paddingLeft=parseInt(l.css("padding")),h.paddingTop=parseInt(l.css("padding")),h.paddingRight=parseInt(l.css("padding")),h.paddingBottom=parseInt(l.css("padding")),this.options.nodeDimensionsIncludeLabels&&l.isParent()&&(o=l.boundingBox({includeLabels:!0,includeNodes:!1}).w,a=l.boundingBox({includeLabels:!0,includeNodes:!1}).h,s=l.css("text-halign"),h.labelWidth=o,h.labelHeight=a,h.labelPos=s),this.idToLNode[l.data("id")]=h,isNaN(h.rect.x)&&(h.rect.x=0),isNaN(h.rect.y)&&(h.rect.y=0),null!=c&&0<c.length&&(o=r.getGraphManager().add(r.newGraph(),h),this.processChildrenList(o,c,r))}},l.prototype.stop=function(){return this.stopped=!0,this},me(function(t){t("layout","cose-bilkent",l)},"register"));typeof cytoscape<"u"&&r(cytoscape),t.exports=r}],a={},me(n,"__webpack_require__"),n.m=i,n.c=a,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?me(function(){return t.default},"getDefault"):me(function(){return t},"getModuleExports");return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1);function n(t){var e;return(a[t]||(e=a[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,n),e.l=!0,e)).exports}var i,a})});function Nlt(t,n){t.forEach(e=>{let r={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{["id","label","height","width","padding","x","y"].includes(t)||(r[t]=e[t])}),n.add({group:"nodes",data:r,position:{x:e.x??0,y:e.y??0}})})}function Ilt(t,n){t.forEach(e=>{let r={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{["id","start","end"].includes(t)||(r[t]=e[t])}),n.add({group:"edges",data:r})})}function Rlt(n){return new Promise(e=>{let t=H("body").append("div").attr("id","cy").attr("style","display:none"),r=Clt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),Nlt(n.nodes,r),Ilt(n.edges,r),r.nodes().forEach(function(e){e.layoutDimensions=()=>{var t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(t=>{D.info("Cytoscape ready",t),e(r)})})}function Mlt(t){return t.nodes().map(t=>{let e=t.data(),r=t.position(),n={id:e.id,x:r.x,y:r.y};return Object.keys(e).forEach(t=>{"id"!==t&&(n[t]=e[t])}),n})}function Dlt(t){return t.edges().map(t=>{let e=t.data(),r=t._private.rscratch,n={id:e.id,source:e.source,target:e.target,startX:r.startX,startY:r.startY,midX:r.midX,midY:r.midY,endX:r.endX,endY:r.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(n[t]=e[t])}),n})}var Olt,Plt=b(()=>{Slt(),Olt=q(Llt(),1),i6(),t(),Clt.use(Olt.default),me(Nlt,"addNodes"),me(Ilt,"addEdges"),me(Rlt,"createCytoscapeInstance"),me(Mlt,"extractPositionedNodes"),me(Dlt,"extractPositionedEdges")});async function Blt(t,e){D.debug("Starting cose-bilkent layout algorithm");try{$lt(t);var r=await Rlt(t),n=Mlt(r),i=Dlt(r);return D.debug(`Layout completed: ${n.length} nodes, ${i.length} edges`),{nodes:n,edges:i}}catch(t){throw D.error("Error in cose-bilkent layout algorithm:",t),t}}function $lt(t){if(!t)throw new Error("Layout data is required");if(!t.config)throw new Error("Configuration is required in layout data");if(!t.rootNode)throw new Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw new Error("No nodes found in layout data");if(Array.isArray(t.edges))return!0;throw new Error("Edges array is required in layout data")}var Flt,zlt=b(()=>{t(),Plt(),me(Blt,"executeCoseBilkentLayout"),me($lt,"validateLayoutData")}),Glt=b(()=>{zlt(),Flt=me(async(i,t,{insertCluster:a,insertEdge:s,insertEdgeLabel:o,insertMarkers:e,insertNode:l,log:c,positionEdgeLabel:h},{})=>{let u={},d={},r=t.select("g"),p=(e(r,i.markers,i.type,i.diagramId),r.insert("g").attr("class","subgraphs")),g=r.insert("g").attr("class","edgePaths"),f=r.insert("g").attr("class","edgeLabels"),m=r.insert("g").attr("class","nodes"),n=(c.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(i.nodes.map(async t=>{var e,r,n;t.isGroup?(e={...t},d[t.id]=e,u[t.id]=e,await a(p,t)):(e={...t},u[t.id]=e,n=(r=await l(m,t,{config:i.config,dir:i.direction||"TB"})).node().getBBox(),e.width=n.width,e.height=n.height,e.domId=r,c.debug(`Node ${t.id} dimensions: ${n.width}x`+n.height))})),c.debug("Running cose-bilkent layout algorithm"),{...i,nodes:i.nodes.map(t=>{var e=u[t.id];return{...t,width:e.width,height:e.height}})}),y=await Blt(n,i.config);c.debug("Positioning nodes based on layout results"),y.nodes.forEach(t=>{var e=u[t.id];e?.domId&&(e.domId.attr("transform",`translate(${t.x}, ${t.y})`),e.x=t.x,e.y=t.y,c.debug(`Positioned node ${e.id} at center (${t.x}, ${t.y})`))}),y.edges.forEach(e=>{var t=i.edges.find(t=>t.id===e.id);t&&(t.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),c.debug("Inserting and positioning edges"),await Promise.all(i.edges.map(async e=>{await o(f,e);var t,r=u[e.start??""],n=u[e.end??""];r&&n&&(t=(t=y.edges.find(t=>t.id===e.id))?(c.debug("APA01 positionedEdge",t),{...e}):{...e,points:[{x:r.x||0,y:r.y||0},{x:n.x||0,y:n.y||0}]},r=s(g,t,d,i.type,r,n,i.diagramId),h(t,r))})),c.debug("Cose-bilkent rendering completed")},"render")}),Ult={};KBt(Ult,{render:()=>qlt});var qlt,jlt,Wlt,Ylt,Hlt,Vlt,Xlt,Klt,Zlt,Qlt,Jlt,tct,ect,rct,nct,ict,act,sct,oct,lct=b(()=>{Glt(),qlt=Flt}),cct=b(()=>{nP(),t(),jlt={},Wlt=me(t=>{for(var e of t)jlt[e.name]=e},"registerLayoutLoaders"),me(()=>{Wlt([{name:"dagre",loader:me(async()=>Promise.resolve().then(()=>(BK(),DK)),"loader")},{name:"cose-bilkent",loader:me(async()=>Promise.resolve().then(()=>(lct(),Ult)),"loader")}])},"registerDefaultLayoutLoaders")(),Ylt=me(async(t,e)=>{var r;if(t.layoutAlgorithm in jlt)return(await(r=jlt[t.layoutAlgorithm]).loader()).render(t,e,eP,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm)},"render"),Hlt=me((t="",{fallback:e="dagre"}={})=>{if(t in jlt)return t;if(e in jlt)return D.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")}),hct=b(()=>{lh(),t(),Vlt=me((t,e,r,n)=>{t.attr("class",r);var{width:r,height:i,x:a,y:s}=Xlt(t,e),n=(Zc(t,i,r,n),Klt(a,s,r,i,e));t.attr("viewBox",n),D.debug(`viewBox configured: ${n} with padding: `+e)},"setupViewPortForSVG"),Xlt=me((t,e)=>({width:(t=t.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*e,height:t.height+2*e,x:t.x,y:t.y}),"calculateDimensionsWithPadding"),Klt=me((t,e,r,n,i)=>t-i+` ${e-i} ${r} `+n,"createViewBox")}),uct=b(()=>{i6(),Tu(),t(),iO(),cct(),hct(),iS(),Zlt=me(function(t,e){return e.db.getClasses()},"getClasses"),Qlt=me(async function(t,e,r,n){D.info("REF0:"),D.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=O(),o;"sandbox"===i&&(o=H("#i"+e));var l,c="sandbox"===i?o.nodes()[0].contentDocument:document,h=(D.debug("Before getData: "),n.db.getData()),u=(D.debug("Data: ",h),WD(e,i)),d=n.db.getDirection(),d=(h.type=n.type,h.layoutAlgorithm=Hlt(s),"dagre"===h.layoutAlgorithm&&"elk"===s&&D.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=e,D.debug("REF1:",h),await Ylt(h,u),h.config.flowchart?.diagramPadding??8);tS.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),Vlt(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=H(`#${e} [id="${l.id}"]`);if(p&&l.link){let t=c.createElementNS("http://www.w3.org/2000/svg","a"),e=(t.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return t},":first-child")),r=p.select(".label-container"),n=(r&&e.append(function(){return r.node()}),p.select(".label"));n&&e.append(function(){return n.node()})}}},"draw"),Jlt={getClasses:Zlt,draw:Qlt}}),dct=b(()=>{function P(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),B=[1,4],$=[1,3],F=[1,5],z=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],G=[2,2],U=[1,13],q=[1,14],j=[1,15],W=[1,16],Y=[1,23],H=[1,25],V=[1,26],X=[1,27],e=[1,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],tt=[1,33],n=[1,44],i=[1,46],a=[1,42],s=[1,47],o=[1,43],l=[1,50],c=[1,45],h=[1,51],u=[1,52],et=[1,34],rt=[1,35],nt=[1,36],it=[1,37],at=[1,57],d=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],p=[1,61],g=[1,60],f=[1,62],st=[8,9,11,75,77,78],ot=[1,78],lt=[1,91],ct=[1,96],ht=[1,95],ut=[1,92],dt=[1,88],pt=[1,94],gt=[1,90],ft=[1,97],mt=[1,93],yt=[1,98],vt=[1,89],xt=[8,9,10,11,40,75,77,78],m=[8,9,10,11,40,46,75,77,78],y=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],bt=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],wt=[44,60,89,102,105,106,109,111,114,115,116],kt=[1,121],Tt=[1,122],Et=[1,124],Ct=[1,123],St=[44,60,62,74,89,102,105,106,109,111,114,115,116],_t=[1,133],At=[1,147],Lt=[1,148],Nt=[1,149],It=[1,150],Rt=[1,135],Mt=[1,137],Dt=[1,141],Ot=[1,142],Pt=[1,143],Bt=[1,144],$t=[1,145],Ft=[1,146],zt=[1,151],Gt=[1,152],Ut=[1,131],qt=[1,132],jt=[1,139],Wt=[1,134],Yt=[1,138],Ht=[1,136],Vt=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],Xt=[1,154],Kt=[1,156],v=[8,9,11],x=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],b=[1,176],w=[1,172],k=[1,173],T=[1,177],E=[1,174],C=[1,175],Zt=[77,116,119],S=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Qt=[10,106],Jt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],_=[1,247],A=[1,245],L=[1,249],N=[1,243],I=[1,244],R=[1,246],M=[1,248],D=[1,250],te=[1,268],ee=[8,9,11,106],O=[8,9,10,11,60,84,105,106,109,110,111,112],B={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0<a[o].length)&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 183:this.$=a[o];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(a[o-1]),this.$=a[o-1];break;case 27:this.$=a[o-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=n.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 34:this.$=n.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 35:this.$=n.addSubGraph(void 0,a[o-1],void 0);break;case 37:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 43:this.$=a[o-1]+a[o];break;case 44:this.$=a[o];break;case 45:n.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),n.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 46:n.addLink(a[o-2].stmt,a[o],a[o-1]),this.$={stmt:a[o],nodes:a[o].concat(a[o-2].nodes)};break;case 47:n.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 48:this.$={stmt:a[o-1],nodes:a[o-1]};break;case 49:n.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),this.$={stmt:a[o-1],nodes:a[o-1],shapeData:a[o]};break;case 50:this.$={stmt:a[o],nodes:a[o]};break;case 51:this.$=[a[o]];break;case 52:n.addVertex(a[o-5][a[o-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o-4]),this.$=a[o-5].concat(a[o]);break;case 53:this.$=a[o-4].concat(a[o]);break;case 54:this.$=a[o];break;case 55:this.$=a[o-2],n.setClass(a[o-2],a[o]);break;case 56:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"square");break;case 57:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"doublecircle");break;case 58:this.$=a[o-5],n.addVertex(a[o-5],a[o-2],"circle");break;case 59:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"ellipse");break;case 60:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"stadium");break;case 61:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"subroutine");break;case 62:this.$=a[o-7],n.addVertex(a[o-7],a[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[o-5],a[o-3]]]));break;case 63:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"cylinder");break;case 64:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"round");break;case 65:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"diamond");break;case 66:this.$=a[o-5],n.addVertex(a[o-5],a[o-2],"hexagon");break;case 67:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"odd");break;case 68:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"trapezoid");break;case 69:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 70:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"lean_right");break;case 71:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"lean_left");break;case 72:this.$=a[o],n.addVertex(a[o]);break;case 73:a[o-1].text=a[o],this.$=a[o-1];break;case 74:case 75:a[o-2].text=a[o-1],this.$=a[o-2];break;case 76:this.$=a[o];break;case 77:var l=n.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1]};break;case 78:l=n.destructLink(a[o],a[o-2]),this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1],id:a[o-3]};break;case 79:this.$={text:a[o],type:"text"};break;case 80:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 81:this.$={text:a[o],type:"string"};break;case 82:this.$={text:a[o],type:"markdown"};break;case 83:l=n.destructLink(a[o]),this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:l=n.destructLink(a[o]),this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[o-1]};break;case 85:this.$=a[o-1];break;case 86:this.$={text:a[o],type:"text"};break;case 87:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 88:this.$={text:a[o],type:"string"};break;case 89:case 104:this.$={text:a[o],type:"markdown"};break;case 101:this.$={text:a[o],type:"text"};break;case 102:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 103:this.$={text:a[o],type:"text"};break;case 105:this.$=a[o-4],n.addClass(a[o-2],a[o]);break;case 106:this.$=a[o-4],n.setClass(a[o-2],a[o]);break;case 107:case 115:this.$=a[o-1],n.setClickEvent(a[o-1],a[o]);break;case 108:case 116:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2]),n.setTooltip(a[o-3],a[o]);break;case 109:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 110:this.$=a[o-4],n.setClickEvent(a[o-4],a[o-3],a[o-2]),n.setTooltip(a[o-4],a[o]);break;case 111:this.$=a[o-2],n.setLink(a[o-2],a[o]);break;case 112:this.$=a[o-4],n.setLink(a[o-4],a[o-2]),n.setTooltip(a[o-4],a[o]);break;case 113:this.$=a[o-4],n.setLink(a[o-4],a[o-2],a[o]);break;case 114:this.$=a[o-6],n.setLink(a[o-6],a[o-4],a[o]),n.setTooltip(a[o-6],a[o-2]);break;case 117:this.$=a[o-1],n.setLink(a[o-1],a[o]);break;case 118:this.$=a[o-3],n.setLink(a[o-3],a[o-2]),n.setTooltip(a[o-3],a[o]);break;case 119:this.$=a[o-3],n.setLink(a[o-3],a[o-2],a[o]);break;case 120:this.$=a[o-5],n.setLink(a[o-5],a[o-4],a[o]),n.setTooltip(a[o-5],a[o-2]);break;case 121:this.$=a[o-4],n.addVertex(a[o-2],void 0,void 0,a[o]);break;case 122:this.$=a[o-4],n.updateLink([a[o-2]],a[o]);break;case 123:this.$=a[o-4],n.updateLink(a[o-2],a[o]);break;case 124:this.$=a[o-8],n.updateLinkInterpolate([a[o-6]],a[o-2]),n.updateLink([a[o-6]],a[o]);break;case 125:this.$=a[o-8],n.updateLinkInterpolate(a[o-6],a[o-2]),n.updateLink(a[o-6],a[o]);break;case 126:this.$=a[o-6],n.updateLinkInterpolate([a[o-4]],a[o]);break;case 127:this.$=a[o-6],n.updateLinkInterpolate(a[o-4],a[o]);break;case 128:case 130:this.$=[a[o]];break;case 129:case 131:a[o-2].push(a[o]),this.$=a[o-2];break;case 133:this.$=a[o-1]+a[o];break;case 181:this.$=a[o];break;case 182:case 184:this.$=a[o-1]+""+a[o];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"}}},"anonymous"),table:[{3:1,4:2,9:B,10:$,12:F},{1:[3]},t(z,G,{5:6}),{4:7,9:B,10:$,12:F},{4:8,9:B,10:$,12:F},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,33:24,34:H,36:V,38:X,42:28,43:38,44:e,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:tt,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:et,122:rt,123:nt,124:it},t(z,[2,9]),t(z,[2,10]),t(z,[2,11]),{8:[1,54],9:[1,55],10:at,15:53,18:56},t(d,[2,3]),t(d,[2,4]),t(d,[2,5]),t(d,[2,6]),t(d,[2,7]),t(d,[2,8]),{8:p,9:g,11:f,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:p,9:g,11:f,21:67},{8:p,9:g,11:f,21:68},{8:p,9:g,11:f,21:69},{8:p,9:g,11:f,21:70},{8:p,9:g,11:f,21:71},{8:p,9:g,10:[1,72],11:f,21:73},t(d,[2,36]),{35:[1,74]},{37:[1,75]},t(d,[2,39]),t(st,[2,50],{18:76,39:77,10:at,40:ot}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:lt,44:ct,60:ht,80:[1,86],89:ut,95:[1,83],97:[1,84],101:85,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt,120:87},t(d,[2,185]),t(d,[2,186]),t(d,[2,187]),t(d,[2,188]),t(xt,[2,51]),t(xt,[2,54],{46:[1,99]}),t(m,[2,72],{113:112,29:[1,100],44:e,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:r,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:n,102:i,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),t(y,[2,181]),t(y,[2,142]),t(y,[2,143]),t(y,[2,144]),t(y,[2,145]),t(y,[2,146]),t(y,[2,147]),t(y,[2,148]),t(y,[2,149]),t(y,[2,150]),t(y,[2,151]),t(y,[2,152]),t(z,[2,12]),t(z,[2,18]),t(z,[2,19]),{9:[1,113]},t(bt,[2,26],{18:114,10:at}),t(d,[2,27]),{42:115,43:38,44:e,45:39,47:40,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},t(d,[2,40]),t(d,[2,41]),t(d,[2,42]),t(wt,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:kt,81:Tt,116:Et,119:Ct},{75:[1,125],77:[1,126]},t(St,[2,83]),t(d,[2,28]),t(d,[2,29]),t(d,[2,30]),t(d,[2,31]),t(d,[2,32]),{10:_t,12:At,14:Lt,27:Nt,28:127,32:It,44:Rt,60:Mt,75:Dt,80:[1,129],81:[1,130],83:140,84:Ot,85:Pt,86:Bt,87:$t,88:Ft,89:zt,90:Gt,91:128,105:Ut,109:qt,111:jt,114:Wt,115:Yt,116:Ht},t(Vt,G,{5:153}),t(d,[2,37]),t(d,[2,38]),t(st,[2,48],{44:Xt}),t(st,[2,49],{18:155,10:at,40:Kt}),t(xt,[2,44]),{44:e,47:157,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{102:[1,158],103:159,105:[1,160]},{44:e,47:161,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{44:e,47:162,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},t(v,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t(v,[2,115],{120:167,10:[1,166],14:lt,44:ct,60:ht,89:ut,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt}),t(v,[2,117],{10:[1,168]}),t(x,[2,183]),t(x,[2,170]),t(x,[2,171]),t(x,[2,172]),t(x,[2,173]),t(x,[2,174]),t(x,[2,175]),t(x,[2,176]),t(x,[2,177]),t(x,[2,178]),t(x,[2,179]),t(x,[2,180]),{44:e,47:169,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{30:170,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:178,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:180,50:[1,179],67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:181,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:182,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:183,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{109:[1,184]},{30:185,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:186,65:[1,187],67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:188,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:189,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:190,67:b,80:w,81:k,82:171,116:T,117:E,118:C},t(y,[2,182]),t(z,[2,20]),t(bt,[2,25]),t(st,[2,46],{39:191,18:192,10:at,40:ot}),t(wt,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{77:[1,196],79:197,116:Et,119:Ct},t(Zt,[2,79]),t(Zt,[2,81]),t(Zt,[2,82]),t(Zt,[2,168]),t(Zt,[2,169]),{76:198,79:120,80:kt,81:Tt,116:Et,119:Ct},t(St,[2,84]),{8:p,9:g,10:_t,11:f,12:At,14:Lt,21:200,27:Nt,29:[1,199],32:It,44:Rt,60:Mt,75:Dt,83:140,84:Ot,85:Pt,86:Bt,87:$t,88:Ft,89:zt,90:Gt,91:201,105:Ut,109:qt,111:jt,114:Wt,115:Yt,116:Ht},t(S,[2,101]),t(S,[2,103]),t(S,[2,104]),t(S,[2,157]),t(S,[2,158]),t(S,[2,159]),t(S,[2,160]),t(S,[2,161]),t(S,[2,162]),t(S,[2,163]),t(S,[2,164]),t(S,[2,165]),t(S,[2,166]),t(S,[2,167]),t(S,[2,90]),t(S,[2,91]),t(S,[2,92]),t(S,[2,93]),t(S,[2,94]),t(S,[2,95]),t(S,[2,96]),t(S,[2,97]),t(S,[2,98]),t(S,[2,99]),t(S,[2,100]),{6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,202],33:24,34:H,36:V,38:X,42:28,43:38,44:e,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:tt,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:et,122:rt,123:nt,124:it},{10:at,18:203},{44:[1,204]},t(xt,[2,43]),{10:[1,205],44:e,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{10:[1,206]},{10:[1,207],106:[1,208]},t(Qt,[2,128]),{10:[1,209],44:e,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{10:[1,210],44:e,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{80:[1,211]},t(v,[2,109],{10:[1,212]}),t(v,[2,111],{10:[1,213]}),{80:[1,214]},t(x,[2,184]),{80:[1,215],98:[1,216]},t(xt,[2,55],{113:112,44:e,60:r,89:n,102:i,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),{31:[1,217],67:b,82:218,116:T,117:E,118:C},t(Jt,[2,86]),t(Jt,[2,88]),t(Jt,[2,89]),t(Jt,[2,153]),t(Jt,[2,154]),t(Jt,[2,155]),t(Jt,[2,156]),{49:[1,219],67:b,82:218,116:T,117:E,118:C},{30:220,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{51:[1,221],67:b,82:218,116:T,117:E,118:C},{53:[1,222],67:b,82:218,116:T,117:E,118:C},{55:[1,223],67:b,82:218,116:T,117:E,118:C},{57:[1,224],67:b,82:218,116:T,117:E,118:C},{60:[1,225]},{64:[1,226],67:b,82:218,116:T,117:E,118:C},{66:[1,227],67:b,82:218,116:T,117:E,118:C},{30:228,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{31:[1,229],67:b,82:218,116:T,117:E,118:C},{67:b,69:[1,230],71:[1,231],82:218,116:T,117:E,118:C},{67:b,69:[1,233],71:[1,232],82:218,116:T,117:E,118:C},t(st,[2,45],{18:155,10:at,40:Kt}),t(st,[2,47],{44:Xt}),t(wt,[2,75]),t(wt,[2,74]),{62:[1,234],67:b,82:218,116:T,117:E,118:C},t(wt,[2,77]),t(Zt,[2,80]),{77:[1,235],79:197,116:Et,119:Ct},{30:236,67:b,80:w,81:k,82:171,116:T,117:E,118:C},t(Vt,G,{5:237}),t(S,[2,102]),t(d,[2,35]),{43:238,44:e,45:39,47:40,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{10:at,18:239},{10:_,60:A,84:L,92:240,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:_,60:A,84:L,92:251,104:[1,252],105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:_,60:A,84:L,92:253,104:[1,254],105:N,107:241,108:242,109:I,110:R,111:M,112:D},{105:[1,255]},{10:_,60:A,84:L,92:256,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{44:e,47:257,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},t(v,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t(v,[2,116]),t(v,[2,118],{10:[1,261]}),t(v,[2,119]),t(m,[2,56]),t(Jt,[2,87]),t(m,[2,57]),{51:[1,262],67:b,82:218,116:T,117:E,118:C},t(m,[2,64]),t(m,[2,59]),t(m,[2,60]),t(m,[2,61]),{109:[1,263]},t(m,[2,63]),t(m,[2,65]),{66:[1,264],67:b,82:218,116:T,117:E,118:C},t(m,[2,67]),t(m,[2,68]),t(m,[2,70]),t(m,[2,69]),t(m,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(wt,[2,78]),{31:[1,265],67:b,82:218,116:T,117:E,118:C},{6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,266],33:24,34:H,36:V,38:X,42:28,43:38,44:e,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:tt,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:et,122:rt,123:nt,124:it},t(xt,[2,53]),{43:267,44:e,45:39,47:40,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},t(v,[2,121],{106:te}),t(ee,[2,130],{108:269,10:_,60:A,84:L,105:N,109:I,110:R,111:M,112:D}),t(O,[2,132]),t(O,[2,134]),t(O,[2,135]),t(O,[2,136]),t(O,[2,137]),t(O,[2,138]),t(O,[2,139]),t(O,[2,140]),t(O,[2,141]),t(v,[2,122],{106:te}),{10:[1,270]},t(v,[2,123],{106:te}),{10:[1,271]},t(Qt,[2,129]),t(v,[2,105],{106:te}),t(v,[2,106],{113:112,44:e,60:r,89:n,102:i,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),t(v,[2,110]),t(v,[2,112],{10:[1,272]}),t(v,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:p,9:g,11:f,21:277},t(d,[2,34]),t(xt,[2,52]),{10:_,60:A,84:L,105:N,107:278,108:242,109:I,110:R,111:M,112:D},t(O,[2,133]),{14:lt,44:ct,60:ht,89:ut,101:279,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt,120:87},{14:lt,44:ct,60:ht,89:ut,101:280,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt,120:87},{98:[1,281]},t(v,[2,120]),t(m,[2,58]),{30:282,67:b,80:w,81:k,82:171,116:T,117:E,118:C},t(m,[2,66]),t(Vt,G,{5:283}),t(ee,[2,131],{108:269,10:_,60:A,84:L,105:N,109:I,110:R,111:M,112:D}),t(v,[2,126],{120:167,10:[1,284],14:lt,44:ct,60:ht,89:ut,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt}),t(v,[2,127],{120:167,10:[1,285],14:lt,44:ct,60:ht,89:ut,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt}),t(v,[2,114]),{31:[1,286],67:b,82:218,116:T,117:E,118:C},{6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,287],33:24,34:H,36:V,38:X,42:28,43:38,44:e,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:tt,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:et,122:rt,123:nt,124:it},{10:_,60:A,84:L,92:288,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:_,60:A,84:L,92:289,105:N,107:241,108:242,109:I,110:R,111:M,112:D},t(m,[2,62]),t(d,[2,33]),t(v,[2,124],{106:te}),t(v,[2,125],{106:te})],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},$={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:me(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:return e.yytext=e.yytext.replace(/\n\s*/g,"<br/>"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};B.lexer=$,me(P,"Parser"),(tct=new((P.prototype=B).Parser=P)).parser=tct,ect=tct}),pct=b(()=>{dct(),(rct=Object.assign({},ect)).parse=t=>(t=t.replace(/}\s*\n/g,`} +`),ect.parse(t)),nct=rct}),gct=b(()=>{ict=me(()=>` + /* Font Awesome icon styling - consolidated */ + .label-icon { + display: inline-block; + height: 1em; + overflow: visible; + vertical-align: -0.125em; + } + + .node .label-icon path { + fill: currentColor; + stroke: revert; + stroke-width: revert; + } +`,"getIconStyles")}),fct=b(()=>{jr(),gct(),act=me((t,e)=>{var r=(i=ce)(t,"r"),n=i(t,"g"),i=i(t,"b");return oe(r,n,i,e)},"fade"),sct=me(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.nodeTextColor||t.textColor}; + } + .cluster-label text { + fill: ${t.titleColor}; + } + .cluster-label span { + color: ${t.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${t.nodeTextColor||t.textColor}; + color: ${t.nodeTextColor||t.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${t.lineColor} !important; + stroke-width: 0; + stroke: ${t.lineColor}; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${act(t.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${t.clusterBkg}; + stroke: ${t.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${t.titleColor}; + } + + .cluster span { + color: ${t.titleColor}; + } + /* .cluster div { + color: ${t.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + padding: 2px; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; + } + ${ict()} +`,"getStyles"),oct=sct}),mct={};KBt(mct,{diagram:()=>yct});var yct,vct,xct,bct,wct=b(()=>{Tu(),nO(),uct(),pct(),fct(),yct={parser:nct,get db(){return new jD},renderer:Jlt,styles:oct,init:me(t=>{t.flowchart||(t.flowchart={}),t.layout&&Eh({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Eh({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}}),kct=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,20],l=[1,21],c=[1,22],h=[1,23],u=[1,24],d=[1,19],p=[1,25],P=[1,26],g=[1,18],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],b=[1,42],w=[1,43],k=[1,52],T=[40,50,68,69],E=[1,63],C=[1,61],S=[1,58],_=[1,62],A=[1,64],L=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],$=[63,64,65,66,67],F=[1,81],z=[1,80],G=[1,78],U=[1,79],q=[6,10,42,47],N=[6,10,13,41,42,47,48,49],I=[1,89],R=[1,88],M=[1,87],D=[19,56],j=[1,98],W=[1,97],O=[19,56,58,60],n={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.addEntity(a[o-4]),n.addEntity(a[o-2]),n.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:n.addEntity(a[o-8]),n.addEntity(a[o-4]),n.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),n.setClass([a[o-8]],a[o-6]),n.setClass([a[o-4]],a[o-2]);break;case 10:n.addEntity(a[o-6]),n.addEntity(a[o-2]),n.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),n.setClass([a[o-6]],a[o-4]);break;case 11:n.addEntity(a[o-6]),n.addEntity(a[o-4]),n.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),n.setClass([a[o-4]],a[o-2]);break;case 12:n.addEntity(a[o-3]),n.addAttributes(a[o-3],a[o-1]);break;case 13:n.addEntity(a[o-5]),n.addAttributes(a[o-5],a[o-1]),n.setClass([a[o-5]],a[o-3]);break;case 14:n.addEntity(a[o-2]);break;case 15:n.addEntity(a[o-4]),n.setClass([a[o-4]],a[o-2]);break;case 16:n.addEntity(a[o]);break;case 17:n.addEntity(a[o-2]),n.setClass([a[o-2]],a[o]);break;case 18:n.addEntity(a[o-6],a[o-4]),n.addAttributes(a[o-6],a[o-1]);break;case 19:n.addEntity(a[o-8],a[o-6]),n.addAttributes(a[o-8],a[o-1]),n.setClass([a[o-8]],a[o-3]);break;case 20:n.addEntity(a[o-5],a[o-3]);break;case 21:n.addEntity(a[o-7],a[o-5]),n.setClass([a[o-7]],a[o-2]);break;case 22:n.addEntity(a[o-3],a[o-1]);break;case 23:n.addEntity(a[o-5],a[o-3]),n.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:n.setDirection("TB");break;case 33:n.setDirection("BT");break;case 34:n.setDirection("RL");break;case 35:n.setDirection("LR");break;case 36:this.$=a[o-3],n.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 56:case 64:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],n.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],n.addCssStyles(a[o-2],a[o-1]);break;case 43:this.$=[a[o]];break;case 44:a[o-2].push(a[o]),this.$=a[o-2];break;case 46:this.$=a[o-1]+a[o];break;case 54:case 76:case 77:this.$=a[o].replace(/"/g,"");break;case 55:case 78:this.$=a[o];break;case 57:a[o].push(a[o-1]),this.$=a[o];break;case 58:this.$={type:a[o-1],name:a[o]};break;case 59:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 60:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 61:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 62:case 63:case 66:this.$=a[o];break;case 65:a[o-2].push(a[o]),this.$=a[o-2];break;case 67:this.$=a[o].replace(/"/g,"");break;case 68:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 69:this.$=n.Cardinality.ZERO_OR_ONE;break;case 70:this.$=n.Cardinality.ZERO_OR_MORE;break;case 71:this.$=n.Cardinality.ONE_OR_MORE;break;case 72:this.$=n.Cardinality.ONLY_ONE;break;case 73:this.$=n.Cardinality.MD_PARENT;break;case 74:this.$=n.Identification.NON_IDENTIFYING;break;case 75:this.$=n.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:27,11:9,22:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},e(r,[2,5]),e(r,[2,6]),e(r,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:f,64:m,65:y,66:v,67:x}),{23:[1,38]},{25:[1,39]},{27:[1,40]},e(r,[2,27]),e(r,[2,28]),e(r,[2,29]),e(r,[2,30]),e(r,[2,31]),e(B,[2,54]),e(B,[2,55]),e(r,[2,32]),e(r,[2,33]),e(r,[2,34]),e(r,[2,35]),{16:41,40:b,41:w},{16:44,40:b,41:w},{16:45,40:b,41:w},e(r,[2,4]),{11:46,40:d,50:g},{16:47,40:b,41:w},{18:48,19:[1,49],51:50,52:51,56:k},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),{13:E,38:57,41:C,42:S,45:59,46:60,48:_,49:A},e(L,[2,37]),e(L,[2,38]),{16:65,40:b,41:w,42:S},{13:E,38:66,41:C,42:S,45:59,46:60,48:_,49:A},{13:[1,67],15:[1,68]},e(r,[2,17],{61:32,12:69,17:[1,70],42:S,63:f,64:m,65:y,66:v,67:x}),{19:[1,71]},e(r,[2,14]),{18:72,19:[2,56],51:50,52:51,56:k},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:f,64:m,65:y,66:v,67:x},e($,[2,74]),e($,[2,75]),{6:F,10:z,39:77,42:G,47:U},{40:[1,82],41:[1,83]},e(q,[2,43],{46:84,13:E,41:C,48:_,49:A}),e(N,[2,45]),e(N,[2,50]),e(N,[2,51]),e(N,[2,52]),e(N,[2,53]),e(r,[2,41],{42:S}),{6:F,10:z,39:85,42:G,47:U},{14:86,40:I,50:R,70:M},{16:90,40:b,41:w},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:k},e(r,[2,12]),{19:[2,57]},e(D,[2,58],{54:94,55:95,57:96,59:j,60:W}),e([19,56,59,60],[2,63]),e(r,[2,22],{15:[1,100],17:[1,99]}),e([40,50],[2,68]),e(r,[2,36]),{13:E,41:C,45:101,46:60,48:_,49:A},e(r,[2,47]),e(r,[2,48]),e(r,[2,49]),e(L,[2,39]),e(L,[2,40]),e(N,[2,46]),e(r,[2,42]),e(r,[2,8]),e(r,[2,76]),e(r,[2,77]),e(r,[2,78]),{13:[1,102],42:S},{13:[1,104],15:[1,103]},{19:[1,105]},e(r,[2,15]),e(D,[2,59],{55:106,58:[1,107],60:W}),e(D,[2,60]),e(O,[2,64]),e(D,[2,67]),e(O,[2,66]),{18:108,19:[1,109],51:50,52:51,56:k},{16:110,40:b,41:w},e(q,[2,44],{46:84,13:E,41:C,48:_,49:A}),{14:111,40:I,50:R,70:M},{16:112,40:b,41:w},{14:113,40:I,50:R,70:M},e(r,[2,13]),e(D,[2,61]),{57:114,59:j},{19:[1,115]},e(r,[2,20]),e(r,[2,23],{17:[1,116],42:S}),e(r,[2,11]),{13:[1,117],42:S},e(r,[2,10]),e(O,[2,65]),e(r,[2,18]),{18:118,19:[1,119],51:50,52:51,56:k},{14:120,40:I,50:R,70:M},{19:[1,121]},e(r,[2,21]),e(r,[2,9]),e(r,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;case 30:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;case 40:return 43;case 41:return 63;case 42:case 43:case 44:return 65;case 45:case 46:return 63;case 47:case 48:case 49:case 50:case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:case 56:case 57:case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:case 65:return 69;case 66:case 67:case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return e.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};n.lexer=i,me(t,"Parser"),(vct=new((t.prototype=n).Parser=t)).parser=vct,xct=vct}),Tct=b(()=>{t(),Tu(),ku(),iS(),bct=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=mh,this.getAccTitle=yh,this.setAccDescription=vh,this.getAccDescription=xh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getConfig=me(()=>O().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{me(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,D.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-`+this.entities.size,label:t,attributes:[],alias:e,shape:"erBox",look:O().look??"default",cssClasses:"default",cssStyles:[]}),D.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let r=this.addEntity(t),n;for(n=e.length-1;0<=n;n--)e[n].keys||(e[n].keys=[]),e[n].comment||(e[n].comment=""),r.attributes.push(e[n]),D.debug("Added attribute ",e[n].name)}addRelationship(t,e,r,n){t=this.entities.get(t),r=this.entities.get(r),t&&r&&(t={entityA:t.id,roleA:e,entityB:r.id,relSpec:n},this.relationships.push(t),D.debug("Added new relationship :",t))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}addCssStyles(t,e){for(var r of t){var n,i=this.entities.get(r);if(!e||!i)return;for(n of e)i.cssStyles.push(n)}}addClass(t,e){t.forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),e&&e.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setClass(t,e){for(var r of t){var n=this.entities.get(r);if(n)for(var i of e)n.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],fh()}getData(){var t,e,r=[],n=[],i=O();for(t of this.entities.keys()){var a=this.entities.get(t);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),r.push(a))}let s=0;for(e of this.relationships){var o={id:nS(e.entityA,e.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:e.entityA,end:e.entityB,label:e.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==e.relSpec.relType?"solid":"dashed",look:i.look};n.push(o)}return{nodes:r,edges:n,other:{},config:i,direction:"TB"}}}}),Ect={};KBt(Ect,{draw:()=>Cct});var Cct,Sct,_ct,Act,Lct=b(()=>{Tu(),t(),iO(),cct(),hct(),iS(),i6(),Cct=me(async function(t,e,r,n){D.info("REF0:"),D.info("Drawing er diagram (unified)",e);let{securityLevel:i,er:a,layout:s}=O(),o=n.db.getData(),l=WD(e,i);o.type=n.type,o.layoutAlgorithm=Hlt(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=n.db.getDirection(),o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=e,await Ylt(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),e=l.selectAll('[id*="-background"]'),0<Array.from(e).length&&e.each(function(){var t=H(this),e=t.attr("id").replace("-background","");(e=l.select("#"+CSS.escape(e))).empty()||(e=e.attr("transform"),t.attr("transform",e))}),tS.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Vlt(l,8,"erDiagram",a?.useMaxWidth??!0)},"draw")}),Nct=b(()=>{jr(),Sct=me((t,e)=>{var r=(i=ce)(t,"r"),n=i(t,"g"),i=i(t,"b");return oe(r,n,i,e)},"fade"),_ct=me(t=>` + .entityBox { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${t.tertiaryColor}; + opacity: 0.7; + background-color: ${t.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .labelBkg { + background-color: ${Sct(t.tertiaryColor,.5)}; + } + + .edgeLabel .label { + fill: ${t.nodeBorder}; + font-size: 14px; + } + + .label { + font-family: ${t.fontFamily}; + color: ${t.nodeTextColor||t.textColor}; + } + + .edge-pattern-dashed { + stroke-dasharray: 8,8; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon + { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .relationshipLine { + stroke: ${t.lineColor}; + stroke-width: 1; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } +`,"getStyles"),Act=_ct}),Ict={};KBt(Ict,{diagram:()=>Rct});var Rct,Mct=b(()=>{kct(),Tct(),Lct(),Nct(),Rct={parser:xct,get db(){return new bct},renderer:Ect,styles:Act}});function Dct(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function Oct(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function Pct(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function Bct(t){return"object"==typeof t&&null!==t&&Dct(t.container)&&Oct(t.reference)&&"string"==typeof t.message}function $ct(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function Fct(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function zct(t){return $ct(t)&&"string"==typeof t.fullText}var Gct,Uct=b(()=>{me(Dct,"isAstNode"),me(Oct,"isReference"),me(Pct,"isAstNodeDescription"),me(Bct,"isLinkingError"),Gct=class{static{me(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return Dct(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){var r,n;return t===e||(void 0!==(n=(r=(r=this.subtypes[t])||(this.subtypes[t]={}))[e])?n:(n=this.computeIsSubtype(t,e),r[e]=n))}getAllSubTypes(t){var e=this.allSubtypes[t];if(e)return e;var r,n=[];for(r of this.getAllTypes())this.isSubtype(r,t)&&n.push(r);return this.allSubtypes[t]=n}},me($ct,"isCompositeCstNode"),me(Fct,"isLeafCstNode"),me(zct,"isRootCstNode")});function qct(t){return"string"==typeof t?t:"u"<typeof t?"undefined":"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}function jct(t){return!!t&&"function"==typeof t[Symbol.iterator]}function Wct(...r){if(1===r.length){let e=r[0];if(e instanceof Yct)return e;if(jct(e))return new Yct(()=>e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new Yct(()=>({index:0}),t=>t.index<e.length?{done:!1,value:e[t.index++]}:Vct)}return 1<r.length?new Yct(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){var e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}}while(t.collIndex<r.length&&(jct(e=r[t.collIndex++])?t.iterator=e[Symbol.iterator]():e&&"number"==typeof e.length&&(t.array=e)),t.iterator||t.array||t.collIndex<r.length);return Vct}):Hct}var Yct,Hct,Vct,Xct,Kct,Zct=b(()=>{function t(t){return t.reduce((t,e)=>t+e,0)}function e(t){return t.reduce((t,e)=>t*e,0)}function r(t){return t.reduce((t,e)=>Math.min(t,e))}function n(t){return t.reduce((t,e)=>Math.max(t,e))}var i;Yct=class a{static{me(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){let t={state:this.startFn(),next:me(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){for(var t,e=[],r=this.iterator();void 0!==(t=r.next()).value&&e.push(t.value),!t.done;);return e}toSet(){return new Set(this)}toMap(e,r){var t=this.map(t=>[e?e(t):t,r?r(t):t]);return new Map(t)}toString(){return this.join()}concat(t){return new a(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),t=>{let e;if(!t.firstDone){do{if(!(e=this.nextFn(t.first)).done)return e}while(!e.done);t.firstDone=!0}do{if(!(e=t.iterator.next()).done)return e}while(!e.done);return Vct})}join(t=","){let e=this.iterator(),r="",n,i=!1;for(;(n=e.next()).done||(i&&(r+=t),r+=qct(n.value)),i=!0,!n.done;);return r}indexOf(t,e=0){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(n>=e&&i.value===t)return n;i=r.next(),n++}return-1}every(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)t(n.value,r),n=e.next(),r++}map(r){return new a(this.startFn,t=>{var{done:t,value:e}=this.nextFn(t);return t?Vct:{done:!1,value:r(e)}})}filter(r){return new a(this.startFn,t=>{var e;do{if(!(e=this.nextFn(t)).done&&r(e.value))return e}while(!e.done);return Vct})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){let r=this.iterator(),n=e,i=r.next();for(;!i.done;)n=void 0===n?i.value:t(n,i.value),i=r.next();return n}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,r){var n=t.next();return n.done?r:void 0===(t=this.recursiveReduce(t,e,r))?n.value:e(t,n.value)}find(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return r.value;r=e.next()}}findIndex(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;){if(t(n.value))return r;n=e.next(),r++}return-1}includes(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(r.value===t)return!0;r=e.next()}return!1}flatMap(n){return new a(()=>({this:this.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=this.nextFn(t.this);if(!e){if(!jct(r=n(r)))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return Vct})}flat(t){if((t=void 0===t?1:t)<=0)return this;let n=1<t?this.flat(t-1):this;return new a(()=>({this:n.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=n.nextFn(t.this);if(!e){if(!jct(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return Vct})}head(){var t=this.iterator().next();if(!t.done)return t.value}tail(r=1){return new a(()=>{var e=this.startFn();for(let t=0;t<r;t++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(e){return new a(()=>({size:0,state:this.startFn()}),t=>(t.size++,e<t.size?Vct:this.nextFn(t.state)))}distinct(n){return new a(()=>({set:new Set,internalState:this.startFn()}),t=>{var e;do{if(!(e=this.nextFn(t.internalState)).done){var r=n?n(e.value):e.value;if(!t.set.has(r))return t.set.add(r),e}}while(!e.done);return Vct})}exclude(t,e){let r=new Set;for(var n of t)n=e?e(n):n,r.add(n);return this.filter(t=>(t=e?e(t):t,!r.has(t)))}},me(qct,"toString"),me(jct,"isIterable"),Hct=new Yct(()=>{},()=>Vct),Vct=Object.freeze({done:!0,value:void 0}),me(Wct,"stream"),Xct=class extends Yct{static{me(this,"TreeStreamImpl")}constructor(t,r,e){super(()=>({iterators:e?.includeRoot?[[t][Symbol.iterator]()]:[r(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);0<t.iterators.length;){var e=t.iterators[t.iterators.length-1].next();if(!e.done)return t.iterators.push(r(e.value)[Symbol.iterator]()),e;t.iterators.pop()}return Vct})}iterator(){let t={state:this.startFn(),next:me(()=>this.nextFn(t.state),"next"),prune:me(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}},i=Kct=Kct||{},me(t,"sum"),i.sum=t,me(e,"product"),i.product=e,me(r,"min"),i.min=r,me(n,"max"),i.max=n}),Qct={};function Jct(t){return new Xct(t,t=>$ct(t)?t.content:[],{includeRoot:!0})}function tht(t){return Jct(t).filter(Fct)}function eht(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function rht(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function nht(t){var e,r;if(t)return{offset:t,end:e,range:r}=t,{range:r,offset:t,end:e,length:e-t}}function iht(t,e){var r;return t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character?vht.Before:t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character?vht.After:(r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,t=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character,r&&t?vht.Inside:r?vht.OverlapBack:t?vht.OverlapFront:vht.Outside)}function aht(t,e){return iht(t,e)>vht.After}function sht(t,e,r=xht){var n;if(t)return 0<e&&(n=e-t.offset,n=t.text.charAt(n),r.test(n)||e--),cht(t,e)}function oht(e,r){if(e){var t=dht(e,!0);if(t&&lht(t,r))return t;if(zct(e))for(let t=e.content.findIndex(t=>!t.hidden)-1;0<=t;t--){var n=e.content[t];if(lht(n,r))return n}}}function lht(t,e){return Fct(t)&&e.includes(t.tokenType.name)}function cht(t,e){return Fct(t)?t:$ct(t)&&(t=uht(t,e,!1))?cht(t,e):void 0}function hht(t,e){return Fct(t)?t:$ct(t)&&(t=uht(t,e,!0))?hht(t,e):void 0}function uht(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){var s=Math.floor((n+i)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,n=s+1):i=s-1}return a}function dht(r,n=!0){for(;r.container;){let t=r.container,e=t.content.indexOf(r);for(;0<e;){e--;var i=t.content[e];if(n||!i.hidden)return i}r=t}}function pht(n,i=!0){for(;n.container;){let t=n.container,e=t.content.indexOf(n),r=t.content.length-1;for(;e<r;){e++;var a=t.content[e];if(i||!a.hidden)return a}n=t}}function ght(t){if(0===t.range.start.character)return t;let e=t.range.start.line,r=t,n;for(;t.container;){var i=t.container,a=n??i.content.indexOf(t);if(0===a?(t=i,n=void 0):(n=a-1,t=i.content[n]),t.range.start.line!==e)break;r=t}return r}function fht(t,e){return(t=mht(t,e))?t.parent.content.slice(t.a+1,t.b):[]}function mht(t,e){let r=yht(t),n=yht(e),i;for(let t=0;t<r.length&&t<n.length;t++){var a=r[t],s=n[t];if(a.parent!==s.parent)break;i={parent:a.parent,a:a.index,b:s.index}}return i}function yht(t){for(var e=[];t.container;){var r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}KBt(Qct,{DefaultNameRegexp:()=>xht,RangeComparison:()=>vht,compareRange:()=>iht,findCommentNode:()=>oht,findDeclarationNodeAtOffset:()=>sht,findLeafNodeAtOffset:()=>cht,findLeafNodeBeforeOffset:()=>hht,flattenCst:()=>tht,getInteriorNodes:()=>fht,getNextNode:()=>pht,getPreviousNode:()=>dht,getStartlineNode:()=>ght,inRange:()=>aht,isChildNode:()=>eht,isCommentNode:()=>lht,streamCst:()=>Jct,toDocumentSegment:()=>nht,tokenToRange:()=>rht});var vht,xht,bht=b(()=>{var t;Uct(),Zct(),me(Jct,"streamCst"),me(tht,"flattenCst"),me(eht,"isChildNode"),me(rht,"tokenToRange"),me(nht,"toDocumentSegment"),(t=vht=vht||{})[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside",me(iht,"compareRange"),me(aht,"inRange"),xht=/^[\w\p{L}]$/u,me(sht,"findDeclarationNodeAtOffset"),me(oht,"findCommentNode"),me(lht,"isCommentNode"),me(cht,"findLeafNodeAtOffset"),me(hht,"findLeafNodeBeforeOffset"),me(uht,"binarySearch"),me(dht,"getPreviousNode"),me(pht,"getNextNode"),me(ght,"getStartlineNode"),me(fht,"getInteriorNodes"),me(mht,"getCommonParent"),me(yht,"getParentChain")});function wht(t){throw new Error("Error! The input value was not handled.")}var kht,Tht=b(()=>{kht=class extends Error{static{me(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:`+t.range.start.character:e)}},me(wht,"assertUnreachable")}),Eht={};function Cht(t){return pdt.isInstance(t,but)}function Sht(t){return pdt.isInstance(t,wut)}function _ht(t){return pdt.isInstance(t,kut)}function Aht(t){return Lht(t)||"current"===t||"entry"===t||"extends"===t||"false"===t||"fragment"===t||"grammar"===t||"hidden"===t||"import"===t||"interface"===t||"returns"===t||"terminal"===t||"true"===t||"type"===t||"infer"===t||"infers"===t||"with"===t||"string"==typeof t&&/\^?[_a-zA-Z][\w_]*/.test(t)}function Lht(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}function Nht(t){return pdt.isInstance(t,Tut)}function Iht(t){return pdt.isInstance(t,Eut)}function Rht(t){return pdt.isInstance(t,Cut)}function Mht(t){return pdt.isInstance(t,Sut)}function Dht(t){return pdt.isInstance(t,_ut)}function Oht(t){return pdt.isInstance(t,Aut)}function Pht(t){return pdt.isInstance(t,Lut)}function Bht(t){return pdt.isInstance(t,Nut)}function $ht(t){return pdt.isInstance(t,Iut)}function Fht(t){return pdt.isInstance(t,Rut)}function zht(t){return pdt.isInstance(t,Mut)}function Ght(t){return pdt.isInstance(t,Dut)}function Uht(t){return pdt.isInstance(t,Out)}function qht(t){return pdt.isInstance(t,Put)}function jht(t){return pdt.isInstance(t,But)}function Wht(t){return pdt.isInstance(t,$ut)}function Yht(t){return pdt.isInstance(t,Fut)}function Hht(t){return pdt.isInstance(t,zut)}function Vht(t){return pdt.isInstance(t,Gut)}function Xht(t){return pdt.isInstance(t,Uut)}function Kht(t){return pdt.isInstance(t,qut)}function Zht(t){return pdt.isInstance(t,jut)}function Qht(t){return pdt.isInstance(t,Wut)}function Jht(t){return pdt.isInstance(t,Yut)}function tut(t){return pdt.isInstance(t,Hut)}function eut(t){return pdt.isInstance(t,Vut)}function rut(t){return pdt.isInstance(t,Xut)}function nut(t){return pdt.isInstance(t,Kut)}function iut(t){return pdt.isInstance(t,Zut)}function aut(t){return pdt.isInstance(t,Qut)}function sut(t){return pdt.isInstance(t,Jut)}function out(t){return pdt.isInstance(t,tdt)}function lut(t){return pdt.isInstance(t,edt)}function cut(t){return pdt.isInstance(t,rdt)}function hut(t){return pdt.isInstance(t,ndt)}function uut(t){return pdt.isInstance(t,idt)}function dut(t){return pdt.isInstance(t,adt)}function put(t){return pdt.isInstance(t,sdt)}function gut(t){return pdt.isInstance(t,odt)}function fut(t){return pdt.isInstance(t,ldt)}function mut(t){return pdt.isInstance(t,cdt)}function yut(t){return pdt.isInstance(t,hdt)}function vut(t){return pdt.isInstance(t,udt)}KBt(Eht,{AbstractElement:()=>Cut,AbstractRule:()=>but,AbstractType:()=>wut,Action:()=>Xut,Alternatives:()=>Kut,ArrayLiteral:()=>Sut,ArrayType:()=>_ut,Assignment:()=>Zut,BooleanLiteral:()=>Aut,CharacterRange:()=>Qut,Condition:()=>kut,Conjunction:()=>Lut,CrossReference:()=>Jut,Disjunction:()=>Nut,EndOfFile:()=>tdt,Grammar:()=>Iut,GrammarImport:()=>Rut,Group:()=>edt,InferredType:()=>Mut,Interface:()=>Dut,Keyword:()=>rdt,LangiumGrammarAstReflection:()=>ddt,LangiumGrammarTerminals:()=>xut,NamedArgument:()=>Out,NegatedToken:()=>ndt,Negation:()=>Put,NumberLiteral:()=>But,Parameter:()=>$ut,ParameterReference:()=>Fut,ParserRule:()=>zut,ReferenceType:()=>Gut,RegexToken:()=>idt,ReturnType:()=>Uut,RuleCall:()=>adt,SimpleType:()=>qut,StringLiteral:()=>jut,TerminalAlternatives:()=>sdt,TerminalGroup:()=>odt,TerminalRule:()=>Wut,TerminalRuleCall:()=>ldt,Type:()=>Yut,TypeAttribute:()=>Hut,TypeDefinition:()=>Tut,UnionType:()=>Vut,UnorderedGroup:()=>cdt,UntilToken:()=>hdt,ValueLiteral:()=>Eut,Wildcard:()=>udt,isAbstractElement:()=>Rht,isAbstractRule:()=>Cht,isAbstractType:()=>Sht,isAction:()=>rut,isAlternatives:()=>nut,isArrayLiteral:()=>Mht,isArrayType:()=>Dht,isAssignment:()=>iut,isBooleanLiteral:()=>Oht,isCharacterRange:()=>aut,isCondition:()=>_ht,isConjunction:()=>Pht,isCrossReference:()=>sut,isDisjunction:()=>Bht,isEndOfFile:()=>out,isFeatureName:()=>Aht,isGrammar:()=>$ht,isGrammarImport:()=>Fht,isGroup:()=>lut,isInferredType:()=>zht,isInterface:()=>Ght,isKeyword:()=>cut,isNamedArgument:()=>Uht,isNegatedToken:()=>hut,isNegation:()=>qht,isNumberLiteral:()=>jht,isParameter:()=>Wht,isParameterReference:()=>Yht,isParserRule:()=>Hht,isPrimitiveType:()=>Lht,isReferenceType:()=>Vht,isRegexToken:()=>uut,isReturnType:()=>Xht,isRuleCall:()=>dut,isSimpleType:()=>Kht,isStringLiteral:()=>Zht,isTerminalAlternatives:()=>put,isTerminalGroup:()=>gut,isTerminalRule:()=>Qht,isTerminalRuleCall:()=>fut,isType:()=>Jht,isTypeAttribute:()=>tut,isTypeDefinition:()=>Nht,isUnionType:()=>eut,isUnorderedGroup:()=>mut,isUntilToken:()=>yut,isValueLiteral:()=>Iht,isWildcard:()=>vut,reflection:()=>pdt});var xut,but,wut,kut,Tut,Eut,Cut,Sut,_ut,Aut,Lut,Nut,Iut,Rut,Mut,Dut,Out,Put,But,$ut,Fut,zut,Gut,Uut,qut,jut,Wut,Yut,Hut,Vut,Xut,Kut,Zut,Qut,Jut,tdt,edt,rdt,ndt,idt,adt,sdt,odt,ldt,cdt,hdt,udt,ddt,pdt,gdt=b(()=>{Uct(),xut={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},but="AbstractRule",me(Cht,"isAbstractRule"),wut="AbstractType",me(Sht,"isAbstractType"),kut="Condition",me(_ht,"isCondition"),me(Aht,"isFeatureName"),me(Lht,"isPrimitiveType"),Tut="TypeDefinition",me(Nht,"isTypeDefinition"),Eut="ValueLiteral",me(Iht,"isValueLiteral"),Cut="AbstractElement",me(Rht,"isAbstractElement"),Sut="ArrayLiteral",me(Mht,"isArrayLiteral"),_ut="ArrayType",me(Dht,"isArrayType"),Aut="BooleanLiteral",me(Oht,"isBooleanLiteral"),Lut="Conjunction",me(Pht,"isConjunction"),Nut="Disjunction",me(Bht,"isDisjunction"),Iut="Grammar",me($ht,"isGrammar"),Rut="GrammarImport",me(Fht,"isGrammarImport"),Mut="InferredType",me(zht,"isInferredType"),Dut="Interface",me(Ght,"isInterface"),Out="NamedArgument",me(Uht,"isNamedArgument"),Put="Negation",me(qht,"isNegation"),But="NumberLiteral",me(jht,"isNumberLiteral"),$ut="Parameter",me(Wht,"isParameter"),Fut="ParameterReference",me(Yht,"isParameterReference"),zut="ParserRule",me(Hht,"isParserRule"),Gut="ReferenceType",me(Vht,"isReferenceType"),Uut="ReturnType",me(Xht,"isReturnType"),qut="SimpleType",me(Kht,"isSimpleType"),jut="StringLiteral",me(Zht,"isStringLiteral"),Wut="TerminalRule",me(Qht,"isTerminalRule"),Yut="Type",me(Jht,"isType"),Hut="TypeAttribute",me(tut,"isTypeAttribute"),Vut="UnionType",me(eut,"isUnionType"),Xut="Action",me(rut,"isAction"),Kut="Alternatives",me(nut,"isAlternatives"),Zut="Assignment",me(iut,"isAssignment"),Qut="CharacterRange",me(aut,"isCharacterRange"),Jut="CrossReference",me(sut,"isCrossReference"),tdt="EndOfFile",me(out,"isEndOfFile"),edt="Group",me(lut,"isGroup"),rdt="Keyword",me(cut,"isKeyword"),ndt="NegatedToken",me(hut,"isNegatedToken"),idt="RegexToken",me(uut,"isRegexToken"),adt="RuleCall",me(dut,"isRuleCall"),sdt="TerminalAlternatives",me(put,"isTerminalAlternatives"),odt="TerminalGroup",me(gut,"isTerminalGroup"),ldt="TerminalRuleCall",me(fut,"isTerminalRuleCall"),cdt="UnorderedGroup",me(mut,"isUnorderedGroup"),hdt="UntilToken",me(yut,"isUntilToken"),udt="Wildcard",me(vut,"isWildcard"),ddt=class extends Gct{static{me(this,"LangiumGrammarAstReflection")}getAllTypes(){return[Cut,but,wut,Xut,Kut,Sut,_ut,Zut,Aut,Qut,kut,Lut,Jut,Nut,tdt,Iut,Rut,edt,Mut,Dut,rdt,Out,ndt,Put,But,$ut,Fut,zut,Gut,idt,Uut,adt,qut,jut,sdt,odt,Wut,ldt,Yut,Hut,Tut,Vut,cdt,hdt,Eut,udt]}computeIsSubtype(t,e){switch(t){case Xut:case Kut:case Zut:case Qut:case Jut:case tdt:case edt:case rdt:case ndt:case idt:case adt:case sdt:case odt:case ldt:case cdt:case hdt:case udt:return this.isSubtype(Cut,e);case Sut:case But:case jut:return this.isSubtype(Eut,e);case _ut:case Gut:case qut:case Vut:return this.isSubtype(Tut,e);case Aut:return this.isSubtype(kut,e)||this.isSubtype(Eut,e);case Lut:case Nut:case Put:case Fut:return this.isSubtype(kut,e);case Mut:case Dut:case Yut:return this.isSubtype(wut,e);case zut:return this.isSubtype(but,e)||this.isSubtype(wut,e);case Wut:return this.isSubtype(but,e);default:return!1}}getReferenceType(t){var e=t.container.$type+":"+t.property;switch(e){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return wut;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return but;case"Grammar:usedGrammars":return Iut;case"NamedArgument:parameter":case"ParameterReference:parameter":return $ut;case"TerminalRuleCall:rule":return Wut;default:throw new Error(e+" is not a valid reference id.")}}getTypeMetaData(t){switch(t){case Cut:return{name:Cut,properties:[{name:"cardinality"},{name:"lookahead"}]};case Sut:return{name:Sut,properties:[{name:"elements",defaultValue:[]}]};case _ut:return{name:_ut,properties:[{name:"elementType"}]};case Aut:return{name:Aut,properties:[{name:"true",defaultValue:!1}]};case Lut:return{name:Lut,properties:[{name:"left"},{name:"right"}]};case Nut:return{name:Nut,properties:[{name:"left"},{name:"right"}]};case Iut:return{name:Iut,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case Rut:return{name:Rut,properties:[{name:"path"}]};case Mut:return{name:Mut,properties:[{name:"name"}]};case Dut:return{name:Dut,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case Out:return{name:Out,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case Put:return{name:Put,properties:[{name:"value"}]};case But:return{name:But,properties:[{name:"value"}]};case $ut:return{name:$ut,properties:[{name:"name"}]};case Fut:return{name:Fut,properties:[{name:"parameter"}]};case zut:return{name:zut,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case Gut:return{name:Gut,properties:[{name:"referenceType"}]};case Uut:return{name:Uut,properties:[{name:"name"}]};case qut:return{name:qut,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case jut:return{name:jut,properties:[{name:"value"}]};case Wut:return{name:Wut,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case Yut:return{name:Yut,properties:[{name:"name"},{name:"type"}]};case Hut:return{name:Hut,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case Vut:return{name:Vut,properties:[{name:"types",defaultValue:[]}]};case Xut:return{name:Xut,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case Kut:return{name:Kut,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Zut:return{name:Zut,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case Qut:return{name:Qut,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case Jut:return{name:Jut,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case tdt:return{name:tdt,properties:[{name:"cardinality"},{name:"lookahead"}]};case edt:return{name:edt,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case rdt:return{name:rdt,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case ndt:return{name:ndt,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case idt:return{name:idt,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case adt:return{name:adt,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case sdt:return{name:sdt,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case odt:return{name:odt,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case ldt:return{name:ldt,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case cdt:return{name:cdt,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case hdt:return{name:hdt,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case udt:return{name:udt,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:t,properties:[]}}}},pdt=new ddt}),fdt={};function mdt(n){for(let[r,t]of Object.entries(n))r.startsWith("$")||(Array.isArray(t)?t.forEach((t,e)=>{Dct(t)&&(t.$container=n,t.$containerProperty=r,t.$containerIndex=e)}):Dct(t)&&(t.$container=n,t.$containerProperty=r))}function ydt(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function vdt(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function xdt(t){if(t=bdt(t).$document)return t;throw new Error("AST node has no document.")}function bdt(t){for(;t.$container;)t=t.$container;return t}function wdt(i,t){if(!i)throw new Error("Node must be an AstNode.");let a=t?.range;return new Yct(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){var e=t.keys[t.keyIndex];if(!e.startsWith("$")){var r=i[e];if(Dct(r)){if(t.keyIndex++,Edt(r,a))return{done:!1,value:r}}else if(Array.isArray(r)){for(;t.arrayIndex<r.length;){var n=r[t.arrayIndex++];if(Dct(n)&&Edt(n,a))return{done:!1,value:n}}t.arrayIndex=0}}t.keyIndex++}return Vct})}function kdt(t,e){if(t)return new Xct(t,t=>wdt(t,e));throw new Error("Root node must be an AstNode.")}function Tdt(t,e){if(t)return e?.range&&!Edt(t,e.range)?new Xct(t,()=>[]):new Xct(t,t=>wdt(t,e),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function Edt(t,e){return!e||!!(t=null==(t=t.$cstNode)?void 0:t.range)&&aht(t,e)}function Cdt(a){return new Yct(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){var e=t.keys[t.keyIndex];if(!e.startsWith("$")){var r=a[e];if(Oct(r))return t.keyIndex++,{done:!1,value:{reference:r,container:a,property:e}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){var n=t.arrayIndex++,i=r[n];if(Oct(i))return{done:!1,value:{reference:i,container:a,property:e,index:n}}}t.arrayIndex=0}}t.keyIndex++}return Vct})}function Sdt(e,t=xdt(e).parseResult.value){let r=[];return Tdt(t).forEach(t=>{Cdt(t).forEach(t=>{t.reference.ref===e&&r.push(t.reference)})}),Wct(r)}function _dt(t,e){var r,n=e;for(r of t.getTypeMetaData(e.$type).properties)void 0!==r.defaultValue&&void 0===n[r.name]&&(n[r.name]=Adt(r.defaultValue))}function Adt(t){return Array.isArray(t)?[...t.map(Adt)]:t}function Ldt(t,e){var r,n,i={$type:t.$type};for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Dct(n))i[r]=Ldt(n,e);else if(Oct(n))i[r]=e(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,s=[];for(a of n)Dct(a)?s.push(Ldt(a,e)):Oct(a)?s.push(e(i,r,a.$refNode,a.$refText)):s.push(a);i[r]=s}else i[r]=n;return mdt(i),i}KBt(fdt,{assignMandatoryProperties:()=>_dt,copyAstNode:()=>Ldt,findLocalReferences:()=>Sdt,findRootNode:()=>bdt,getContainerOfType:()=>ydt,getDocument:()=>xdt,hasContainerOfType:()=>vdt,linkContentToContainer:()=>mdt,streamAllContents:()=>kdt,streamAst:()=>Tdt,streamContents:()=>wdt,streamReferences:()=>Cdt});var Ndt=b(()=>{Uct(),Zct(),bht(),me(mdt,"linkContentToContainer"),me(ydt,"getContainerOfType"),me(vdt,"hasContainerOfType"),me(xdt,"getDocument"),me(bdt,"findRootNode"),me(wdt,"streamContents"),me(kdt,"streamAllContents"),me(Tdt,"streamAst"),me(Edt,"isAstNodeInRange"),me(Cdt,"streamReferences"),me(Sdt,"findLocalReferences"),me(_dt,"assignMandatoryProperties"),me(Adt,"copyDefaultValue"),me(Ldt,"copyAstNode")});function Idt(t){return t.charCodeAt(0)}function Rdt(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function Mdt(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function Ddt(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function Odt(){throw Error("Internal Error - Should never get here!")}function Pdt(t){return"Character"===t.type}var Bdt,$dt,Fdt,zdt,Gdt,Udt,qdt,jdt,Wdt=b(()=>{me(Idt,"cc"),me(Rdt,"insertToSet"),me(Mdt,"addFlag"),me(Ddt,"ASSERT_EXISTS"),me(Odt,"ASSERT_NEVER_REACH_HERE"),me(Pdt,"isCharacter")}),Ydt=b(()=>{Wdt(),Bdt=[];for(let t=Idt("0");t<=Idt("9");t++)Bdt.push(t);$dt=[Idt("_")].concat(Bdt);for(let t=Idt("a");t<=Idt("z");t++)$dt.push(t);for(let t=Idt("A");t<=Idt("Z");t++)$dt.push(t);Fdt=[Idt(" "),Idt("\f"),Idt(` +`),Idt("\r"),Idt("\t"),Idt("\v"),Idt("\t"),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt(" "),Idt("\u2028"),Idt("\u2029"),Idt(" "),Idt(" "),Idt(" "),Idt("\ufeff")]}),Hdt=b(()=>{Wdt(),Ydt(),zdt=/[0-9a-fA-F]/,Gdt=/[0-9]/,Udt=/[1-9]/,qdt=class{static{me(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");for(var e=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":Mdt(r,"global");break;case"i":Mdt(r,"ignoreCase");break;case"m":Mdt(r,"multiLine");break;case"u":Mdt(r,"unicode");break;case"y":Mdt(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){var t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){for(var t=[],e=this.idx;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}Ddt(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Odt()}quantifier(t=!1){let e,r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":e=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;Ddt(e)}if((!0!==t||void 0!==e)&&Ddt(e))return"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e}atom(){let t,e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return Ddt(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):Odt()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Idt(` +`),Idt("\r"),Idt("\u2028"),Idt("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=Bdt;break;case"D":t=Bdt,e=!0;break;case"s":t=Fdt;break;case"S":t=Fdt,e=!0;break;case"w":t=$dt;break;case"W":t=$dt,e=!0}return Ddt(t)?{type:"Set",value:t,complement:e}:Odt()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=Idt("\f");break;case"n":t=Idt(` +`);break;case"r":t=Idt("\r");break;case"t":t=Idt("\t");break;case"v":t=Idt("\v")}return Ddt(t)?{type:"Character",value:t}:Odt()}controlLetterEscapeAtom(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Idt("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:Idt(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:Idt(this.popChar())}}}characterClass(){let t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,Pdt(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,Pdt(n)){if(n.value<r.value)throw Error("Range out of order in character class");t.push({from:r.value,to:n.value})}else Rdt(r.value,t),t.push(Idt("-")),Rdt(n.value,t)}else Rdt(r.value,t)}return this.consumeChar("]"),{type:"Set",complement:e,value:t}}classAtom(){switch(this.peekChar()){case"]":case` +`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Idt("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let t=!0;"?"===(this.consumeChar("("),this.peekChar(0))?(this.consumeChar("?"),this.consumeChar(":"),t=!1):this.groupIdx++;var e=this.disjunction(),e=(this.consumeChar(")"),{type:"Group",capturing:t,value:e});return t&&(e.idx=this.groupIdx),e}positiveInteger(){let t=this.popChar();if(!1===Udt.test(t))throw Error("Expecting a positive integer");for(;Gdt.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(!1===Gdt.test(t))throw Error("Expecting an integer");for(;Gdt.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){var t=this.popChar();switch(t){case` +`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Idt(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return Gdt.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case` +`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}}isQuantifier(){var t=this.saveState();try{return void 0!==this.quantifier(!0)}catch{return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case` +`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let t=0;t<e;t++){var n=this.popChar();if(!1===zdt.test(n))throw Error("Expecting a HexDecimal digits");r+=n}return{type:"Character",value:parseInt(r,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){var t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(void 0!==t&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),Vdt=b(()=>{jdt=class{static{me(this,"BaseRegExpVisitor")}visitChildren(t){for(var e in t){var r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}}),Xdt=b(()=>{Hdt(),Vdt()}),Kdt={};function Zdt(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=apt.pattern(t),n=[];for(e of r.value.value)opt.reset(t),opt.visit(e),n.push({start:opt.startRegexp,end:opt.endRegex});return n}catch{return[]}}function Qdt(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),opt.reset(t),opt.visit(apt.pattern(t)),opt.multiline}catch{return!1}}function Jdt(t){let e="string"==typeof t?new RegExp(t):t;return lpt.some(t=>e.test(t))}function tpt(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ept(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:tpt(t)).join("")}function rpt(t,e){return t=npt(t),!!(e=e.match(t))&&0<e[0].length}function npt(t){let i=t="string"==typeof t?new RegExp(t):t,a=t.source,s=0;function o(){let e="",t;function r(t){e+=a.substr(s,t),s+=t}function n(t){e+="(?:"+a.substr(s,t)+"|$)",s+=t}for(me(r,"appendRaw"),me(n,"appendOptional");s<a.length;)switch(a[s]){case"\\":switch(a[s+1]){case"c":n(3);break;case"x":n(4);break;case"u":i.unicode?"{"===a[s+2]?n(a.indexOf("}",s)-s+1):n(6):n(2);break;case"p":case"P":i.unicode?n(a.indexOf("}",s)-s+1):n(2);break;case"k":n(a.indexOf(">",s)-s+1);break;default:n(2)}break;case"[":(t=/\[(?:\\.|.)*?\]/g).lastIndex=s,n((t=t.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(t=/\{\d+,?\d*\}/g).lastIndex=s,(t=t.exec(a))?r(t[0].length):n(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":e+="(?:",s+=3,e+=o()+"|$)";break;case"=":e+="(?=",s+=3,e+=o()+")";break;case"!":t=s,s+=3,o(),e+=a.substr(t,s-t);break;case"<":switch(a[s+3]){case"=":case"!":t=s,s+=4,o(),e+=a.substr(t,s-t);break;default:r(a.indexOf(">",s)-s+1),e+=o()+"|$)"}}else r(1),e+=o()+"|$)";break;case")":return++s,e;default:n(1)}return e}return me(o,"process"),new RegExp(o(),t.flags)}KBt(Kdt,{NEWLINE_REGEXP:()=>ipt,escapeRegExp:()=>tpt,getCaseInsensitivePattern:()=>ept,getTerminalParts:()=>Zdt,isMultilineComment:()=>Qdt,isWhitespace:()=>Jdt,partialMatches:()=>rpt,partialRegExp:()=>npt,whitespaceCharacters:()=>lpt});var ipt,apt,spt,opt,lpt,cpt=b(()=>{Xdt(),ipt=/\r?\n/gm,apt=new qdt,spt=class extends jdt{static{me(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){var e=String.fromCharCode(t.value);this.multiline||e!==` +`||(this.multiline=!0),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=tpt(e),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitSet(t){var e;this.multiline||(e=this.regex.substring(t.loc.begin,t.loc.end),e=new RegExp(e),this.multiline=!!` +`.match(e)),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=this.regex.substring(t.loc.begin,t.loc.end),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitChildren(t){"Group"===t.type&&t.quantifier||super.visitChildren(t)}},opt=new spt,me(Zdt,"getTerminalParts"),me(Qdt,"isMultilineComment"),lpt=` +\r
`.split(""),me(Jdt,"isWhitespace"),me(tpt,"escapeRegExp"),me(ept,"getCaseInsensitivePattern"),me(rpt,"partialMatches"),me(npt,"partialRegExp")}),hpt={};function upt(t){return t.rules.find(t=>Hht(t)&&t.entry)}function dpt(t){return t.rules.filter(t=>Qht(t)&&t.hidden)}function ppt(t,e){var r,n=new Set,i=upt(t);if(!i)return new Set(t.rules);for(r of[i].concat(dpt(t)))gpt(r,n,e);var a,s=new Set;for(a of t.rules)(n.has(a.name)||Qht(a)&&a.hidden)&&s.add(a);return s}function gpt(t,e,r){e.add(t.name),kdt(t).forEach(t=>{(dut(t)||r&&fut(t))&&(t=t.rule.ref)&&!e.has(t.name)&&gpt(t,e,r)})}function fpt(t){return t.terminal||(t.type.ref?Ept(t.type.ref)?.terminal:void 0)}function mpt(t){return t.hidden&&!Jdt(Fpt(t))}function ypt(t,e){return t&&e?xpt(t,e,t.astNode,!0):[]}function vpt(t,e,r){return t&&e&&0!==(e=xpt(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function xpt(t,e,r,n){return!n&&(n=ydt(t.grammarSource,iut))&&n.feature===e?[t]:$ct(t)&&t.astNode===r?t.content.flatMap(t=>xpt(t,e,r,!1)):[]}function bpt(t,e){return t?kpt(t,e,t?.astNode):[]}function wpt(t,e,r){return t&&0!==(e=kpt(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function kpt(t,e,r){if(t.astNode!==r)return[];if(cut(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var n,i,a=Jct(t).iterator(),s=[];(i=a.next()).done||((n=i.value).astNode===r?cut(n.grammarSource)&&n.grammarSource.value===e&&s.push(n):a.prune()),!i.done;);return s}function Tpt(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=ydt(t.grammarSource,iut);if(r)return r;t=t.container}}function Ept(t){let e=t;return zht(e)&&(rut(e.$container)?e=e.$container.$container:Hht(e.$container)?e=e.$container:wht(e.$container)),Cpt(t,e,new Map)}function Cpt(n,t,i){var e,r;function a(t,e){let r;return ydt(t,iut)||(r=Cpt(e,e,i)),i.set(n,r),r}if(me(a,"go"),i.has(n))return i.get(n);i.set(n,void 0);for(r of kdt(t)){if(iut(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(dut(r)&&Hht(r.rule.ref))return a(r,r.rule.ref);if(Kht(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function Spt(e){var t=e.$container;if(lut(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var n=r[t];if(rut(n))return n;if(n=kdt(r[t]).find(rut))return n}}if(Rht(t))return Spt(t)}function _pt(t,e){return"?"===t||"*"===t||lut(e)&&!!e.guardCondition}function Apt(t){return"*"===t||"+"===t}function Lpt(t){return"+="===t}function Npt(t){return Ipt(t,new Set)}function Ipt(t,e){if(e.has(t))return!0;e.add(t);for(var r of kdt(t))if(dut(r)){if(!r.rule.ref||Hht(r.rule.ref)&&!Ipt(r.rule.ref,e))return!1}else{if(iut(r))return!1;if(rut(r))return!1}return!!t.definition}function Rpt(t){return Mpt(t.type,new Set)}function Mpt(t,e){return!!e.has(t)||(e.add(t),!Dht(t)&&!Vht(t)&&(eut(t)?t.types.every(t=>Mpt(t,e)):!!Kht(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!Jht(t=t.typeRef.ref)&&Mpt(t.type,e))))}function Dpt(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(Hht(t)||Ght(t)||Jht(t))?t.name:void 0)}function Opt(t){if(Hht(t))return Npt(t)||null==(e=Dpt(t))?t.name:e;if(Ght(t)||Jht(t)||Xht(t))return t.name;if(rut(t)){var e=Ppt(t);if(e)return e}else if(zht(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function Ppt(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?Opt(t.type.ref):void 0}function Bpt(t){var e;return Qht(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":Npt(t)||null==(e=Dpt(t))?t.name:e}function $pt(t){var e;return Qht(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":null!=(e=Dpt(t))?e:t.name}function Fpt(t){var t=zpt(t.definition,e={s:!1,i:!1,u:!1}),e=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(t,e)}function zpt(t,e){if(put(t))return Gpt(t);if(gut(t))return Upt(t);if(aut(t))return Wpt(t);if(fut(t)){var r=t.rule.ref;if(r)return Hpt(zpt(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Missing rule reference.")}if(hut(t))return jpt(t);if(yut(t))return qpt(t);var n;if(uut(t))return r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),r=t.regex.substring(r+1),e&&(e.i=r.includes("i"),e.s=r.includes("s"),e.u=r.includes("u")),Hpt(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});if(vut(t))return Hpt(Vpt,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Invalid terminal element: "+t?.$type)}function Gpt(t){return Hpt(t.elements.map(t=>zpt(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function Upt(t){return Hpt(t.elements.map(t=>zpt(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function qpt(t){return Hpt(Vpt+"*?"+zpt(t.terminal),{cardinality:t.cardinality,lookahead:t.lookahead})}function jpt(t){return Hpt(`(?!${zpt(t.terminal)})${Vpt}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Wpt(t){return t.right?Hpt(`[${Ypt(t.left)}-${Ypt(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Hpt(Ypt(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function Ypt(t){return tpt(t.value)}function Hpt(t,e){var r;return!1===e.wrap&&!e.lookahead||(t=`(${null!=(r=e.lookahead)?r:""}${t})`),e.cardinality?""+t+e.cardinality:t}KBt(hpt,{findAssignment:()=>Tpt,findNameAssignment:()=>Ept,findNodeForKeyword:()=>wpt,findNodeForProperty:()=>vpt,findNodesForKeyword:()=>bpt,findNodesForKeywordInternal:()=>kpt,findNodesForProperty:()=>ypt,getActionAtElement:()=>Spt,getActionType:()=>Ppt,getAllReachableRules:()=>ppt,getCrossReferenceTerminal:()=>fpt,getEntryRule:()=>upt,getExplicitRuleType:()=>Dpt,getHiddenRules:()=>dpt,getRuleType:()=>$pt,getRuleTypeName:()=>Bpt,getTypeName:()=>Opt,isArrayCardinality:()=>Apt,isArrayOperator:()=>Lpt,isCommentTerminal:()=>mpt,isDataType:()=>Rpt,isDataTypeRule:()=>Npt,isOptionalCardinality:()=>_pt,terminalRegex:()=>Fpt});var Vpt,Xpt=b(()=>{Tht(),gdt(),Uct(),Ndt(),bht(),cpt(),me(upt,"getEntryRule"),me(dpt,"getHiddenRules"),me(ppt,"getAllReachableRules"),me(gpt,"ruleDfs"),me(fpt,"getCrossReferenceTerminal"),me(mpt,"isCommentTerminal"),me(ypt,"findNodesForProperty"),me(vpt,"findNodeForProperty"),me(xpt,"findNodesForPropertyInternal"),me(bpt,"findNodesForKeyword"),me(wpt,"findNodeForKeyword"),me(kpt,"findNodesForKeywordInternal"),me(Tpt,"findAssignment"),me(Ept,"findNameAssignment"),me(Cpt,"findNameAssignmentInternal"),me(Spt,"getActionAtElement"),me(_pt,"isOptionalCardinality"),me(Apt,"isArrayCardinality"),me(Lpt,"isArrayOperator"),me(Npt,"isDataTypeRule"),me(Ipt,"isDataTypeRuleInternal"),me(Rpt,"isDataType"),me(Mpt,"isDataTypeInternal"),me(Dpt,"getExplicitRuleType"),me(Opt,"getTypeName"),me(Ppt,"getActionType"),me(Bpt,"getRuleTypeName"),me($pt,"getRuleType"),me(Fpt,"terminalRegex"),Vpt=/[\s\S]/.source,me(zpt,"abstractElementToRegex"),me(Gpt,"terminalAlternativesToRegex"),me(Upt,"terminalGroupToRegex"),me(qpt,"untilTokenToRegex"),me(jpt,"negateTokenToRegex"),me(Wpt,"characterRangeToRegex"),me(Ypt,"keywordToRegex"),me(Hpt,"withCardinality")});function Kpt(t){var e,r=[];for(e of t.Grammar.rules)Qht(e)&&mpt(e)&&Qdt(Fpt(e))&&r.push(e.name);return{multilineCommentRules:r,nameRegexp:xht}}var Zpt=b(()=>{bht(),Xpt(),cpt(),gdt(),me(Kpt,"createGrammarConfig")}),Qpt=b(()=>{});function Jpt(t){console&&console.error&&console.error("Error: "+t)}function t0t(t){console&&console.warn&&console.warn("Warning: "+t)}var e0t=b(()=>{me(Jpt,"PRINT_ERROR"),me(t0t,"PRINT_WARNING")});function r0t(t){var e=(new Date).getTime(),t=t();return{time:(new Date).getTime()-e,value:t}}var n0t=b(()=>{me(r0t,"timer")});function i0t(t){function e(){}me(e,"FakeConstructor"),e.prototype=t;let r=new e;function n(){return typeof r.bar}return me(n,"fakeAccess"),n(),n(),t}var a0t=b(()=>{me(i0t,"toFastProperties")}),s0t=b(()=>{e0t(),n0t(),a0t()});function o0t(t){return l0t(t)?t.LABEL:t.name}function l0t(t){return ej(t.LABEL)&&""!==t.LABEL}function c0t(t){return x(t,h0t)}function h0t(t){function e(t){return x(t,h0t)}var r,n;if(me(e,"convertDefinition"),t instanceof d0t)return r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx},ej(t.label)&&(r.label=t.label),r;if(t instanceof g0t)return{type:"Alternative",definition:e(t.definition)};if(t instanceof f0t)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof m0t)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof y0t)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:h0t(new w0t({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof x0t)return{type:"RepetitionWithSeparator",idx:t.idx,separator:h0t(new w0t({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof v0t)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof b0t)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof w0t)return r={type:"Terminal",name:t.terminalType.name,label:o0t(t.terminalType),idx:t.idx},ej(t.label)&&(r.terminalLabel=t.label),n=t.terminalType.PATTERN,t.terminalType.PATTERN&&(r.pattern=Cj(n)?n.source:n),r;if(t instanceof p0t)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var u0t,d0t,p0t,g0t,f0t,m0t,y0t,v0t,x0t,b0t,w0t,k0t,T0t=b(()=>{WY(),me(o0t,"tokenLabel"),me(l0t,"hasTokenLabel"),u0t=class{static{me(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(e){e.visit(this),v(this.definition,t=>{t.accept(e)})}},d0t=class extends u0t{static{me(this,"NonTerminal")}constructor(t){super([]),this.idx=1,bB(this,aW(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},p0t=class extends u0t{static{me(this,"Rule")}constructor(t){super(t.definition),this.orgText="",bB(this,aW(t,t=>void 0!==t))}},g0t=class extends u0t{static{me(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,bB(this,aW(t,t=>void 0!==t))}},f0t=class extends u0t{static{me(this,"Option")}constructor(t){super(t.definition),this.idx=1,bB(this,aW(t,t=>void 0!==t))}},m0t=class extends u0t{static{me(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,bB(this,aW(t,t=>void 0!==t))}},y0t=class extends u0t{static{me(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,bB(this,aW(t,t=>void 0!==t))}},v0t=class extends u0t{static{me(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,bB(this,aW(t,t=>void 0!==t))}},x0t=class extends u0t{static{me(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,bB(this,aW(t,t=>void 0!==t))}},b0t=class extends u0t{static{me(this,"Alternation")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,bB(this,aW(t,t=>void 0!==t))}},w0t=class{static{me(this,"Terminal")}constructor(t){this.idx=1,bB(this,aW(t,t=>void 0!==t))}accept(t){t.visit(this)}},me(c0t,"serializeGrammar"),me(h0t,"serializeProduction")}),E0t=b(()=>{T0t(),k0t=class{static{me(this,"GAstVisitor")}visit(t){var e=t;switch(e.constructor){case d0t:return this.visitNonTerminal(e);case g0t:return this.visitAlternative(e);case f0t:return this.visitOption(e);case m0t:return this.visitRepetitionMandatory(e);case y0t:return this.visitRepetitionMandatoryWithSeparator(e);case x0t:return this.visitRepetitionWithSeparator(e);case v0t:return this.visitRepetition(e);case b0t:return this.visitAlternation(e);case w0t:return this.visitTerminal(e);case p0t:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}});function C0t(t){return t instanceof g0t||t instanceof f0t||t instanceof v0t||t instanceof m0t||t instanceof y0t||t instanceof x0t||t instanceof w0t||t instanceof p0t}function S0t(t,e=[]){return t instanceof f0t||t instanceof v0t||t instanceof x0t||(t instanceof b0t?fY(t.definition,t=>S0t(t,e)):!(t instanceof d0t&&uj(e,t))&&t instanceof u0t&&(t instanceof d0t&&e.push(t),nq(t.definition,t=>S0t(t,e))))}function _0t(t){return t instanceof b0t}function A0t(t){if(t instanceof d0t)return"SUBRULE";if(t instanceof f0t)return"OPTION";if(t instanceof b0t)return"OR";if(t instanceof m0t)return"AT_LEAST_ONE";if(t instanceof y0t)return"AT_LEAST_ONE_SEP";if(t instanceof x0t)return"MANY_SEP";if(t instanceof v0t)return"MANY";if(t instanceof w0t)return"CONSUME";throw Error("non exhaustive match")}var L0t=b(()=>{WY(),T0t(),me(C0t,"isSequenceProd"),me(S0t,"isOptionalProd"),me(_0t,"isBranchingProd"),me(A0t,"getProductionDslName")}),N0t=b(()=>{T0t(),E0t(),L0t()});function I0t(t,e,r){return[new f0t({definition:[new w0t({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var R0t,M0t=b(()=>{WY(),N0t(),R0t=class{static{me(this,"RestWalker")}walk(r,n=[]){v(r.definition,(t,e)=>{if(e=FU(r.definition,e+1),t instanceof d0t)this.walkProdRef(t,e,n);else if(t instanceof w0t)this.walkTerminal(t,e,n);else if(t instanceof g0t)this.walkFlat(t,e,n);else if(t instanceof f0t)this.walkOption(t,e,n);else if(t instanceof m0t)this.walkAtLeastOne(t,e,n);else if(t instanceof y0t)this.walkAtLeastOneSep(t,e,n);else if(t instanceof x0t)this.walkManySep(t,e,n);else if(t instanceof v0t)this.walkMany(t,e,n);else{if(!(t instanceof b0t))throw Error("non exhaustive match");this.walkOr(t,e,n)}})}walkTerminal(t,e,r){}walkProdRef(t,e,r){}walkFlat(t,e,r){e=e.concat(r),this.walk(t,e)}walkOption(t,e,r){e=e.concat(r),this.walk(t,e)}walkAtLeastOne(t,e,r){e=[new f0t({definition:t.definition})].concat(e,r),this.walk(t,e)}walkAtLeastOneSep(t,e,r){e=I0t(t,e,r),this.walk(t,e)}walkMany(t,e,r){e=[new f0t({definition:t.definition})].concat(e,r),this.walk(t,e)}walkManySep(t,e,r){e=I0t(t,e,r),this.walk(t,e)}walkOr(t,e,r){let n=e.concat(r);v(t.definition,t=>{t=new g0t({definition:[t]}),this.walk(t,n)})}},me(I0t,"restForRepetitionWithSeparator")});function D0t(t){if(t instanceof d0t)return D0t(t.referencedRule);if(t instanceof w0t)return B0t(t);if(C0t(t))return O0t(t);if(_0t(t))return P0t(t);throw Error("non exhaustive match")}function O0t(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=S0t(a),e=e.concat(D0t(a)),n+=1,i=r.length>n;return NY(e)}function P0t(t){return t=x(t.definition,t=>D0t(t)),NY(l$(t))}function B0t(t){return[t.terminalType]}var $0t,F0t=b(()=>{WY(),N0t(),me(D0t,"first"),me(O0t,"firstForSequence"),me(P0t,"firstForBranching"),me(B0t,"firstForTerminal")}),z0t=b(()=>{$0t="_~IN~_"});function G0t(t){let e={};return v(t,t=>{t=new q0t(t).startWalking(),bB(e,t)}),e}function U0t(t,e){return t.name+e+$0t}var q0t,j0t=b(()=>{M0t(),F0t(),WY(),z0t(),N0t(),q0t=class extends R0t{static{me(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,r){}walkProdRef(t,e,r){t=U0t(t.referencedRule,t.idx)+this.topProd.name,e=e.concat(r),r=D0t(new g0t({definition:e})),this.follows[t]=r}},me(G0t,"computeAllProdsFollows"),me(U0t,"buildBetweenProdsFollowPrefix")});function W0t(t){var e,t=t.toString();return H0t.hasOwnProperty(t)?H0t[t]:(e=V0t.pattern(t),H0t[t]=e)}function Y0t(){H0t={}}var H0t,V0t,X0t=b(()=>{Xdt(),H0t={},V0t=new qdt,me(W0t,"getRegExpAst"),me(Y0t,"clearRegExpParserCache")});function K0t(t,e=!1){try{var r=W0t(t);return Z0t(r.value,{},r.flags.ignoreCase)}catch(r){r.message===ngt?e&&t0t(`${igt} Unable to optimize: < ${t.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`):(e=e?` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",Jpt(`${igt} + Failed parsing: < ${t.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+e))}return[]}function Z0t(e,i,a){switch(e.type){case"Disjunction":for(let t=0;t<e.value.length;t++)Z0t(e.value[t],i,a);break;case"Alternative":var r=e.value;for(let t=0;t<r.length;t++){var n=r[t];switch(n.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var s=n;switch(s.type){case"Character":Q0t(s.value,i,a);break;case"Set":if(!0===s.complement)throw Error(ngt);v(s.value,e=>{if("number"==typeof e)Q0t(e,i,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)Q0t(t,i,a);else{for(let t=r.from;t<=r.to&&t<Ugt;t++)Q0t(t,i,a);if(r.to>=Ugt){var e=r.from>=Ugt?r.from:Ugt,t=r.to,e=Mgt(e),n=Mgt(t);for(let t=e;t<=n;t++)i[t]=t}}}});break;case"Group":Z0t(s.value,i,a);break;default:throw Error("Non Exhaustive Match")}if(n=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===egt(s)||"Group"!==s.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return oj(i)}function Q0t(t,e,r){var n=Mgt(t);e[n]=n,!0===r&&J0t(t,e)}function J0t(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=Mgt(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=Mgt(r.charCodeAt(0))]=t)}function tgt(t,r){return vq(t.value,t=>{if("number"==typeof t)return uj(r,t);{let e=t;return void 0!==vq(r,t=>e.from<=t&&t<=e.to)}})}function egt(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(n8(t.value)?nq(t.value,egt):egt(t.value))}function rgt(e,t){var r,n;return t instanceof RegExp?(r=W0t(t),(n=new agt(e)).visit(r),n.found):void 0!==vq(t,t=>uj(e,t.charCodeAt(0)))}var ngt,igt,agt,sgt=b(()=>{Xdt(),WY(),s0t(),X0t(),jgt(),ngt="Complement Sets are not supported for first char optimization",igt=`Unable to use "first char" lexer optimizations: +`,me(K0t,"getOptimizedStartCodesIndices"),me(Z0t,"firstCharOptimizedIndices"),me(Q0t,"addOptimizedIdxToResult"),me(J0t,"handleIgnoreCase"),me(tgt,"findCode"),me(egt,"isWholeOptional"),agt=class extends jdt{static{me(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){uj(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===tgt(t,this.targetCharCodes)&&(this.found=!0):void 0!==tgt(t,this.targetCharCodes)&&(this.found=!0)}},me(rgt,"canMatchCharCode")});function ogt(t,i){var e=(i=kU(i,{useSticky:$gt,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:me((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{Dgt()});let r,n=(e("Reject Lexer.NA",()=>{r=sY(t,t=>t[Ogt]===c1t.NA)}),!1),a;e("Transform Patterns",()=>{n=!1,a=x(r,t=>{var e,t=t[Ogt];if(Cj(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||uj(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(i.useSticky?Tgt:kgt)(t):e[1]:e;if(R6(t))return n=!0,{exec:t};if("object"==typeof t)return n=!0,t;if("string"==typeof t)return 1===t.length?t:(e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),t=new RegExp(e),(i.useSticky?Tgt:kgt)(t));throw Error("non exhaustive match")})});let s,o,l,c,h;e("misc mapping",()=>{s=x(r,t=>t.tokenTypeIdx),o=x(r,t=>{if((t=t.GROUP)!==c1t.SKIPPED){if(ej(t))return t;if(Lj(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return n8(t)?x(t,t=>fj(r,t)):[fj(r,t)]}),c=x(r,t=>t.PUSH_MODE),h=x(r,t=>Qq(t,"POP_MODE"))});let u;e("Line Terminator Handling",()=>{let e=Igt(i.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,t=>Qq(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===Lgt(t,e)&&rgt(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,_gt),p=x(a,Agt),g=nY(r,(t,e)=>(e=e.GROUP,ej(e)&&e!==c1t.SKIPPED&&(t[e]=[]),t),{}),f=x(a,(t,e)=>({pattern:a[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:o[e],push:c[e],pop:h[e],tokenTypeIdx:s[e],tokenType:r[e]}))}),!0),y=[];return i.safeMode||e("First Char Optimization",()=>{y=nY(r,(r,t,n)=>{if("string"==typeof t.PATTERN){var e=Mgt(t.PATTERN.charCodeAt(0));Rgt(r,e,f[n])}else if(n8(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=Mgt("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,Rgt(r,t,f[n]))})}else Cj(t.PATTERN)?t.PATTERN.unicode?(m=!1,i.ensureOptimizations&&Jpt(`${igt} Unable to analyze < ${t.PATTERN.toString()} > pattern. + The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(e=K0t(t.PATTERN,i.ensureOptimizations),bj(e)&&(m=!1),v(e,t=>{Rgt(r,t,f[n])})):(i.ensureOptimizations&&Jpt(`${igt} TokenType: <${t.name}> is using a custom token pattern without providing <start_chars_hint> parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:n,canBeOptimized:m}}function lgt(t,e){let r=[],n=hgt(t);r=r.concat(n.errors);var i=(t=ugt(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(cgt(i))).concat(ygt(i))).concat(vgt(i,e))).concat(xgt(i))}function cgt(t){let e=[],r=cq(t,t=>Cj(t[Ogt]));return e=(e=(e=(e=(e=e.concat(dgt(r))).concat(ggt(r))).concat(fgt(r))).concat(mgt(r))).concat(pgt(r))}function hgt(t){var e=cq(t,t=>!Qq(t,Ogt));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:o1t.MISSING_PATTERN,tokenTypes:[t]})),valid:RU(t,e)}}function ugt(t){var e=cq(t,t=>(t=t[Ogt],!(Cj(t)||R6(t)||Qq(t,"exec")||ej(t))));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:o1t.INVALID_PATTERN,tokenTypes:[t]})),valid:RU(t,e)}}function dgt(t){class n extends jdt{static{me(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=cq(t,t=>{t=t.PATTERN;try{var e=W0t(t),r=new n;return r.visit(e),r.found}catch{return Fgt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:o1t.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function pgt(t){return t=cq(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:o1t.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function ggt(t){class n extends jdt{static{me(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=cq(t,t=>{t=t.PATTERN;try{var e=W0t(t),r=new n;return r.visit(e),r.found}catch{return zgt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:o1t.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function fgt(t){return t=cq(t,t=>(t=t[Ogt])instanceof RegExp&&(t.multiline||t.global)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:o1t.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function mgt(t){let n=[],e=x(t,r=>nY(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||uj(n,e)||e.PATTERN===c1t.NA||(n.push(e),t.push(e)),t),[]));e=kz(e);var r=cq(e,t=>1<t.length);return x(r,t=>{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${kq(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:o1t.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function ygt(t){return t=cq(t,t=>!!Qq(t,"GROUP")&&(t=t.GROUP)!==c1t.SKIPPED&&t!==c1t.NA&&!ej(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:o1t.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function vgt(t,e){return t=cq(t,t=>void 0!==t.PUSH_MODE&&!uj(e,t.PUSH_MODE)),x(t,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:o1t.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function xgt(t){let a=[],e=nY(t,(t,e,r)=>{var n=e.PATTERN;return n!==c1t.NA&&(ej(n)?t.push({str:n,idx:r,tokenType:e}):Cj(n)&&wgt(n)&&t.push({str:n.source,idx:r,tokenType:e})),t},[]);return v(t,(n,i)=>{v(e,({str:t,idx:e,tokenType:r})=>{i<e&&bgt(t,n.PATTERN)&&(e=`Token: ->${r.name}<- can never be matched. +Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:e,type:o1t.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function bgt(t,e){var r;if(Cj(e))return null!==(r=e.exec(t))&&0===r.index;if(R6(e))return e(t,0,[],{});if(Qq(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function wgt(e){return void 0===vq([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function kgt(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Tgt(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function Egt(t,e,r){let i=[];return Qq(t,Pgt)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Pgt+`> property in its definition +`,type:o1t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Qq(t,Bgt)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Bgt+`> property in its definition +`,type:o1t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Qq(t,Bgt)&&Qq(t,Pgt)&&!Qq(t.modes,t.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${Pgt}: <${t.defaultMode}>which does not exist +`,type:o1t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Qq(t,Bgt)&&v(t.modes,(r,n)=>{v(r,(e,t)=>{Lj(e)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${t}> +`,type:o1t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Qq(e,"LONGER_ALT")&&(t=n8(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{Lj(t)||uj(r,t)||i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${t.name}> on token <${e.name}> outside of mode <${n}> +`,type:o1t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function Cgt(t,e,r){let n=[],i=!1,a=kz(l$(oj(t.modes))),s=sY(a,t=>t[Ogt]===c1t.NA),o=Igt(r);return e&&v(s,t=>{var e=Lgt(t,o);!1!==e?(e={message:Ngt(t,e),type:e.issue,tokenType:t},n.push(e)):Qq(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):rgt(o,t.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:o1t.NO_LINE_BREAKS_FLAGS}),n}function Sgt(r){let n={},t=yB(r);return v(t,t=>{var e=r[t];if(!n8(e))throw Error("non exhaustive match");n[t]=[]}),n}function _gt(t){if(t=t.PATTERN,Cj(t))return!1;if(R6(t))return!0;if(Qq(t,"exec"))return!0;if(ej(t))return!1;throw Error("non exhaustive match")}function Agt(t){return!(!ej(t)||1!==t.length)&&t.charCodeAt(0)}function Lgt(t,e){if(Qq(t,"LINE_BREAKS"))return!1;if(Cj(t.PATTERN)){try{rgt(e,t.PATTERN)}catch(t){return{issue:o1t.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(ej(t.PATTERN))return!1;if(_gt(t))return{issue:o1t.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Ngt(t,e){if(e.issue===o1t.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + The problem is in the <${t.name}> Token Type + Root cause: ${e.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===o1t.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option. + The problem is in the <${t.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function Igt(t){return x(t,t=>ej(t)?t.charCodeAt(0):t)}function Rgt(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function Mgt(t){return t<Ugt?t:qgt[t]}function Dgt(){if(bj(qgt)){qgt=new Array(65536);for(let t=0;t<65536;t++)qgt[t]=255<t?255+~~(t/255):t}}var Ogt,Pgt,Bgt,$gt,Fgt,zgt,Ggt,Ugt,qgt,jgt=b(()=>{Xdt(),d1t(),WY(),s0t(),sgt(),X0t(),Ogt="PATTERN",Pgt="defaultMode",Bgt="modes",$gt="boolean"==typeof new RegExp("(?:)").sticky,me(ogt,"analyzeTokenTypes"),me(lgt,"validatePatterns"),me(cgt,"validateRegExpPattern"),me(hgt,"findMissingPatterns"),me(ugt,"findInvalidPatterns"),Fgt=/[^\\][$]/,me(dgt,"findEndOfInputAnchor"),me(pgt,"findEmptyMatchRegExps"),zgt=/[^\\[][\^]|^\^/,me(ggt,"findStartOfInputAnchor"),me(fgt,"findUnsupportedFlags"),me(mgt,"findDuplicatePatterns"),me(ygt,"findInvalidGroupType"),me(vgt,"findModesThatDoNotExist"),me(xgt,"findUnreachablePatterns"),me(bgt,"testTokenType"),me(wgt,"noMetaChar"),me(kgt,"addStartOfInput"),me(Tgt,"addStickyFlag"),me(Egt,"performRuntimeChecks"),me(Cgt,"performWarningRuntimeChecks"),me(Sgt,"cloneEmptyGroups"),me(_gt,"isCustomPattern"),me(Agt,"isShortPattern"),Ggt={test:me(function(e){var r=e.length;for(let t=this.lastIndex;t<r;t++){var n=e.charCodeAt(t);if(10===n)return this.lastIndex=t+1,!0;if(13===n)return 10===e.charCodeAt(t+1)?this.lastIndex=t+2:this.lastIndex=t+1,!0}return!1},"test"),lastIndex:0},me(Lgt,"checkLineBreaksIssues"),me(Ngt,"buildLineBreakIssueMessage"),me(Igt,"getCharCodes"),me(Rgt,"addToMapOfArrays"),Ugt=256,qgt=[],me(Mgt,"charCodeToOptimizedIndex"),me(Dgt,"initCharCodeToOptimizedIndexMap")});function Wgt(t,e){return(t=t.tokenTypeIdx)===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[t]}function Ygt(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}function Hgt(t){Xgt(t=Vgt(t)),Zgt(t),Kgt(t),v(t,t=>{t.isParent=0<t.categoryMatches.length})}function Vgt(t){let e=mz(t),r=t,n=!0;for(;n;){r=kz(l$(x(r,t=>t.CATEGORIES)));var i=RU(r,e);e=e.concat(i),bj(i)?n=!1:r=i}return e}function Xgt(t){v(t,t=>{Jgt(t)||((a1t[i1t]=t).tokenTypeIdx=i1t++),t1t(t)&&!n8(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),t1t(t)||(t.CATEGORIES=[]),e1t(t)||(t.categoryMatches=[]),r1t(t)||(t.categoryMatchesMap={})})}function Kgt(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(a1t[e].tokenTypeIdx)})})}function Zgt(t){v(t,t=>{Qgt([],t)})}function Qgt(r,n){v(r,t=>{n.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(n.CATEGORIES,t=>{var e=r.concat(n);uj(e,t)||Qgt(e,t)})}function Jgt(t){return Qq(t,"tokenTypeIdx")}function t1t(t){return Qq(t,"CATEGORIES")}function e1t(t){return Qq(t,"categoryMatches")}function r1t(t){return Qq(t,"categoryMatchesMap")}function n1t(t){return Qq(t,"tokenTypeIdx")}var i1t,a1t,s1t,o1t,l1t,c1t,h1t=b(()=>{WY(),me(Wgt,"tokenStructuredMatcher"),me(Ygt,"tokenStructuredMatcherNoCategories"),i1t=1,a1t={},me(Hgt,"augmentTokenTypes"),me(Vgt,"expandCategories"),me(Xgt,"assignTokenDefaultProps"),me(Kgt,"assignCategoriesTokensProp"),me(Zgt,"assignCategoriesMapProp"),me(Qgt,"singleAssignCategoriesToksMap"),me(Jgt,"hasShortKeyProperty"),me(t1t,"hasCategoriesProperty"),me(e1t,"hasExtendingTokensTypesProperty"),me(r1t,"hasExtendingTokensTypesMapProperty"),me(n1t,"isTokenType")}),u1t=b(()=>{s1t={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}}),d1t=b(()=>{var t;jgt(),WY(),s0t(),h1t(),u1t(),X0t(),(t=o1t=o1t||{})[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE",l1t={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:s1t,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(l1t),(c1t=class{static{me(this,"Lexer")}constructor(i,a=l1t){if(this.lexerDefinition=i,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(t,e)=>{var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${t}>`),r0t(e)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${t}> time: ${n}ms`),this.traceInitIndent--,i):e()},"boolean"==typeof a)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=bB({},l1t,a);var t=this.config.traceInitPerf;!0===t?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof t&&(this.traceInitMaxIdent=t,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,t=!0,n=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===l1t.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Ggt;else if(this.config.lineTerminatorCharacters===l1t.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),r=n8(i)?{modes:{defaultMode:mz(i)},defaultMode:Pgt}:(t=!1,mz(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Egt(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Cgt(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=sY(t,t=>Lj(t))}),yB(r.modes)),e;if(v(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(lgt(e,n))}),bj(this.lexerDefinitionErrors)){Hgt(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=ogt(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=t.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=t.charCodeToPatternIdxToConfig,this.emptyGroups=bB({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!bj(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw e=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- +`),new Error(`Errors detected in definition of Lexer: +`+e);v(this.lexerDefinitionWarning,t=>{t0t(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if($gt?(this.chopInput=PE,this.match=this.matchWithTest):(this.updateLastIndex=UP,this.match=this.matchWithExec),t&&(this.handleModes=UP),!1===this.trackStartLines&&(this.computeNewColumn=PE),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=UP),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var t=nY(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!bj(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Y0t()}),this.TRACE_INIT("toFastProperties",()=>{i0t(this)})})}tokenize(t,e=this.defaultMode){if(bj(this.lexerDefinitionErrors))return this.tokenizeInternal(t,e);throw t=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- +`),new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+t)}tokenizeInternal(i,P){let t,a,e,r,n,s,o,l,c,h,B,u,d,$,p,g=i,F=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(i.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=Sgt(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],C=[],S=[],U=[];Object.freeze(U);let _;function A(){return E}function L(t){return t=Mgt(t),void 0===(t=C[t])?U:t}me(A,"getPossiblePatternsSlow"),me(L,"getPossiblePatternsOptimized");var q=me(t=>{var e;1===S.length&&void 0===t.tokenType.PUSH_MODE?(e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t),v.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})):(S.pop(),t=PU(S),E=this.patternIdxToConfig[t],C=this.charCodeToPatternIdxToConfig[t],T=E.length,e=this.canModeBeOptimized[t]&&!1===this.config.safeMode,_=C&&e?L:A)},"pop_mode");function N(t){S.push(t),C=this.charCodeToPatternIdxToConfig[t],E=this.patternIdxToConfig[t],T=E.length,T=E.length,t=this.canModeBeOptimized[t]&&!1===this.config.safeMode,_=C&&t?L:A}me(N,"push_mode"),N.call(this,P);let I,j=this.config.recoveryEnabled;for(;f<F;){s=null;var W=g.charCodeAt(f),Y=_(W),H=Y.length;for(t=0;t<H;t++){var R=(I=Y[t]).pattern,V=(o=null,I.short);if(!1!==V?W===V&&(s=R):!0===I.isCustom?null!==(p=R.exec(g,f,y,w))?(s=p[0],void 0!==p.payload&&(o=p.payload)):s=null:(this.updateLastIndex(R,f),s=this.match(R,i,f)),null!==s){if(void 0!==(n=I.longerAlt)){var X=n.length;for(e=0;e<X;e++){var M=E[n[e]],D=M.pattern;if(!(l=null)===M.isCustom?null!==(p=D.exec(g,f,y,w))?(r=p[0],void 0!==p.payload&&(l=p.payload)):r=null:(this.updateLastIndex(D,f),r=this.match(D,i,f)),r&&r.length>s.length){s=r,o=l,I=M;break}}}break}}if(null!==s){if(c=s.length,void 0!==(h=I.group)&&(B=I.tokenTypeIdx,u=this.createTokenInstance(s,f,B,I.tokenType,x,b,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):w[h].push(u)),i=this.chopInput(i,c),f+=c,b=this.computeNewColumn(b,c),!0===G&&!0===I.canLineTerminator){let t=0,e,r;for(k.lastIndex=0;!0===(e=k.test(s))&&(r=k.lastIndex-1,t++),!0===e;);0!==t&&(x+=t,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,t,x,b,c))}this.handleModes(I,q,N,u)}else{let t=f,e=x,r=b,n=!1===j;for(;!1===n&&f<F;)for(i=this.chopInput(i,1),f++,a=0;a<T;a++){var O=E[a],K=O.pattern,Z=O.short;if(!1!==Z?g.charCodeAt(f)===Z&&(n=!0):n=!0===O.isCustom?null!==K.exec(g,f,y,w):(this.updateLastIndex(K,f),null!==K.exec(i)),!0===n)break}if(d=f-t,b=this.computeNewColumn(b,d),$=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,t,d,e,r),v.push({offset:t,line:e,column:r,length:d,message:$}),!1===j)break}}return this.hasCustom||(y.length=m),{tokens:y,groups:w,errors:v}}handleModes(t,e,r,n){var i;!0===t.pop?(i=t.push,e(n),void 0!==i&&r.call(this,i)):void 0!==t.push&&r.call(this,t.push)}chopInput(t,e){return t.substring(e)}updateLastIndex(t,e){t.lastIndex=e}updateTokenEndLineColumnLocation(t,e,r,n,i,a,s){void 0!==e&&(r=(e=r===s-1)?-1:0,1===n&&1==e||(t.endLine=i+r,t.endColumn=a-1-r))}computeNewColumn(t,e){return t+e}createOffsetOnlyToken(t,e,r,n){return{image:t,startOffset:e,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(t,e,r,n,i,a){return{image:t,startOffset:e,startLine:i,startColumn:a,tokenTypeIdx:r,tokenType:n}}createFullToken(t,e,r,n,i,a,s){return{image:t,startOffset:e,endOffset:e+s-1,startLine:i,endLine:i,startColumn:a,endColumn:a+s-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(t,e,r){return t.push(r),e}addTokenUsingMemberAccess(t,e,r){return t[e]=r,++e}handlePayloadNoCustom(t,e){}handlePayloadWithCustom(t,e){null!==e&&(t.payload=e)}matchWithTest(t,e,r){return!0===t.test(e)?e.substring(r,t.lastIndex):null}matchWithExec(t,e){return null!==(t=t.exec(e))?t[0]:null}}).SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",c1t.NA=/NOT_APPLICABLE/});function p1t(t){return g1t(t)?t.LABEL:t.name}function g1t(t){return ej(t.LABEL)&&""!==t.LABEL}function f1t(t){return m1t(t)}function m1t(t){var e=t.pattern,r={};if(r.name=t.name,Lj(e)||(r.PATTERN=e),Qq(t,x1t))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Qq(t,b1t)&&(r.CATEGORIES=t[b1t]),Hgt([r]),Qq(t,w1t)&&(r.LABEL=t[w1t]),Qq(t,k1t)&&(r.GROUP=t[k1t]),Qq(t,E1t)&&(r.POP_MODE=t[E1t]),Qq(t,T1t)&&(r.PUSH_MODE=t[T1t]),Qq(t,C1t)&&(r.LONGER_ALT=t[C1t]),Qq(t,S1t)&&(r.LINE_BREAKS=t[S1t]),Qq(t,_1t)&&(r.START_CHARS_HINT=t[_1t]),r}function y1t(t,e,r,n,i,a,s,o){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function v1t(t,e){return Wgt(t,e)}var x1t,b1t,w1t,k1t,T1t,E1t,C1t,S1t,_1t,A1t,L1t,N1t,I1t,R1t=b(()=>{WY(),d1t(),h1t(),me(p1t,"tokenLabel"),me(g1t,"hasTokenLabel"),x1t="parent",b1t="categories",w1t="label",k1t="group",T1t="push_mode",E1t="pop_mode",C1t="longer_alt",S1t="line_breaks",_1t="start_chars_hint",me(f1t,"createToken"),me(m1t,"createTokenInternal"),Hgt([A1t=f1t({name:"EOF",pattern:c1t.NA})]),me(y1t,"createTokenInstance"),me(v1t,"tokenMatcher")}),M1t=b(()=>{R1t(),WY(),N0t(),L1t={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${g1t(t)?`--> ${p1t(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=` +but found: '`+kq(e).image+"'";return r?n+r+e:(r=nY(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>p1t(t)).join(", ")}]`),n+`one of these possible Token sequences: +`+x(t,(t,e)=>` ${e+1}. `+t).join(` +`)+e)},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=` +but found: '`+kq(e).image+"'";return r?n+r+e:n+`expecting at least one iteration which starts with one of these possible Token sequences:: + <${x(t,t=>`[${x(t,t=>p1t(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(L1t),N1t={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+t.name+"<-"}},I1t={buildDuplicateFoundError(t,e){function r(t){return t instanceof w0t?t.terminalType.name:t instanceof d0t?t.nonTerminalName:""}me(r,"getExtraProductionArgument");let n=t.name,i=kq(e),a=i.idx,s=A0t(i),o=r(i),l=0<a,c=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} + appears more than once (${e.length} times) in the top level rule: ->${n}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,` +`)},buildNamespaceConflictError(t){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){var e=x(t.prefixPath,t=>p1t(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in <OR${r}> inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(t){var e=x(t.prefixPath,t=>p1t(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`},buildEmptyRepetitionError(t){let e=A0t(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives: +<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule. + has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){var e=t.topLevelRule.name;return`Left Recursion found in grammar. +rule: <${e}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${e+" --\x3e "+x(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){return`Duplicate definition, rule: ->${t.topLevelRule instanceof p0t?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function D1t(t,e){return(t=new O1t(t,e)).resolveRefs(),t.errors}var O1t,P1t=b(()=>{Jmt(),WY(),N0t(),me(D1t,"resolveGrammar"),O1t=class extends k0t{static{me(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(oj(this.nameToTopRule),t=>{(this.currTopLevel=t).accept(this)})}visitNonTerminal(t){var e=this.nameToTopRule[t.nonTerminalName];e?t.referencedRule=e:(e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t),this.errors.push({message:e,type:Kmt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function B1t(e,r,n=[]){n=mz(n);let i=[],a=0;function s(t){return t.concat(FU(e,a+1))}function o(t){return t=B1t(s(t),r,n),i.concat(t)}for(me(s,"remainingPathWith"),me(o,"getAlternativesForProd");n.length<r&&a<e.length;){var t=e[a];if(t instanceof g0t)return o(t.definition);if(t instanceof d0t)return o(t.definition);if(t instanceof f0t)i=o(t.definition);else{if(t instanceof m0t)return o(t.definition.concat([new v0t({definition:t.definition})]));if(t instanceof y0t)return o([new g0t({definition:t.definition}),new v0t({definition:[new w0t({terminalType:t.separator})].concat(t.definition)})]);if(t instanceof x0t){var l=t.definition.concat([new v0t({definition:[new w0t({terminalType:t.separator})].concat(t.definition)})]);i=o(l)}else if(t instanceof v0t)l=t.definition.concat([new v0t({definition:t.definition})]),i=o(l);else{if(t instanceof b0t)return v(t.definition,t=>{!1===bj(t.definition)&&(i=o(t.definition))}),i;if(!(t instanceof w0t))throw Error("non exhaustive match");n.push(t.terminalType)}}a++}return i.push({partialPath:n,suffixDef:FU(e,a)}),i}function $1t(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=e.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!bj(u);)if((v=u.pop())===s)o&&PU(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!bj(d)){var m=d[0];if(m===i)v={idx:p,def:FU(d),ruleStack:UU(g),occurrenceStack:UU(f)},u.push(v);else if(m instanceof w0t)if(p<l-1)r(e[v=p+1],m.terminalType)&&(v={idx:v,def:FU(d),ruleStack:g,occurrenceStack:f},u.push(v));else{if(p!==l-1)throw Error("non exhaustive match");h.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:g,occurrenceStack:f}),o=!0}else if(m instanceof d0t){(v=mz(g)).push(m.nonTerminalName);var y=mz(f),v=(y.push(m.idx),{idx:p,def:m.definition.concat(a,FU(d)),ruleStack:v,occurrenceStack:y});u.push(v)}else if(m instanceof f0t)y={idx:p,def:FU(d),ruleStack:g,occurrenceStack:f},u.push(y),u.push(s),v={idx:p,def:m.definition.concat(FU(d)),ruleStack:g,occurrenceStack:f},u.push(v);else if(m instanceof m0t)v=new v0t({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],FU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof y0t)v=new w0t({terminalType:m.separator}),v=new v0t({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],FU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof x0t)v={idx:p,def:FU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new w0t({terminalType:m.separator}),v=new v0t({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],FU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof v0t)v={idx:p,def:FU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new v0t({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],FU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof b0t)for(let t=m.definition.length-1;0<=t;t--){var x={idx:p,def:m.definition[t].definition.concat(FU(d)),ruleStack:g,occurrenceStack:f};u.push(x),u.push(s)}else if(m instanceof g0t)u.push({idx:p,def:m.definition.concat(FU(d)),ruleStack:g,occurrenceStack:f});else{if(!(m instanceof p0t))throw Error("non exhaustive match");u.push(F1t(m,p,g,f))}}}return h}function F1t(t,e,r,n){return(r=mz(r)).push(t.name),(n=mz(n)).push(1),{idx:e,def:t.definition,ruleStack:r,occurrenceStack:n}}var z1t,G1t,U1t,q1t,j1t,W1t,Y1t=b(()=>{WY(),F0t(),M0t(),N0t(),G1t=class extends R0t{static{me(this,"AbstractNextPossibleTokensWalker")}constructor(t,e){super(),this.topProd=t,this.path=e,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=mz(this.path.ruleStack).reverse(),this.occurrenceStack=mz(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,r){t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence&&(e=e.concat(r),this.updateExpectedNext(),this.walk(t.referencedRule,e))}updateExpectedNext(){bj(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},z1t=class extends G1t{static{me(this,"NextAfterTokenWalker")}constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,r){this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found&&(t=e.concat(r),e=new g0t({definition:t}),this.possibleTokTypes=D0t(e),this.found=!0)}},G1t=class extends R0t{static{me(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},U1t=class extends G1t{static{me(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){var n;t.idx===this.occurrence?(n=kq(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof w0t&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(t,e,r)}},q1t=class extends G1t{static{me(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){var n;t.idx===this.occurrence?(n=kq(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof w0t&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(t,e,r)}},j1t=class extends G1t{static{me(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){var n;t.idx===this.occurrence?(n=kq(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof w0t&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(t,e,r)}},W1t=class extends G1t{static{me(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){var n;t.idx===this.occurrence?(n=kq(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof w0t&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(t,e,r)}},me(B1t,"possiblePathsFrom"),me($1t,"nextPossibleTokensAfter"),me(F1t,"expandTopLevelRule")});function H1t(t){if(t instanceof f0t||"Option"===t)return lft.OPTION;if(t instanceof v0t||"Repetition"===t)return lft.REPETITION;if(t instanceof m0t||"RepetitionMandatory"===t)return lft.REPETITION_MANDATORY;if(t instanceof y0t||"RepetitionMandatoryWithSeparator"===t)return lft.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof x0t||"RepetitionWithSeparator"===t)return lft.REPETITION_WITH_SEPARATOR;if(t instanceof b0t||"Alternation"===t)return lft.ALTERNATION;throw Error("non exhaustive match")}function V1t(t){var{occurrence:t,rule:e,prodType:r,maxLookahead:n}=t;return(r=H1t(r))===lft.ALTERNATION?nft(t,e,n):ift(t,e,r,n)}function X1t(t,e,r,n,i,a){return a(t=nft(t,e,r),n,oft(t)?Ygt:Wgt,i)}function K1t(t,e,r,n,i,a){return e=oft(t=ift(t,e,i,r))?Ygt:Wgt,a(t[0],e,n)}function Z1t(c,t,h,e){let u=c.length,r=nq(c,t=>nq(t,t=>1===t.length));if(t)return function(t){var r=x(t,t=>t.GATE);for(let e=0;e<u;e++){var n=c[e],i=n.length,a=r[e];if(void 0===a||!1!==a.call(this))t:for(let t=0;t<i;t++){var s=n[t],o=s.length;for(let t=0;t<o;t++){var l=this.LA(t+1);if(!1===h(l,s[t]))continue t}return e}}};if(!r||e)return function(){for(let e=0;e<u;e++){var r=c[e],n=r.length;t:for(let t=0;t<n;t++){var i=r[t],a=i.length;for(let t=0;t<a;t++){var s=this.LA(t+1);if(!1===h(s,i[t]))continue t}return e}}};{let t=x(c,t=>l$(t)),e=nY(t,(e,t,r)=>(v(t,t=>{Qq(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),v(t.categoryMatches,t=>{Qq(e,t)||(e[t]=r)})}),e),{});return function(){var t=this.LA(1);return e[t.tokenTypeIdx]}}}function Q1t(i,a,r){let t=nq(i,t=>1===t.length),s=i.length;if(!t||r)return function(){t:for(let t=0;t<s;t++){var e=i[t],r=e.length;for(let t=0;t<r;t++){var n=this.LA(t+1);if(!1===a(n,e[t]))continue t}return!0}return!1};if(1===(r=l$(i)).length&&bj(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=nY(r,(e,t,r)=>(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}function J1t(e){var r=new Array(e);for(let t=0;t<e;t++)r[t]=[];return r}function tft(e){let r=[""];for(let t=0;t<e.length;t++){var n=e[t],i=[];for(let t=0;t<r.length;t++){var a=r[t];i.push(a+"_"+n.tokenTypeIdx);for(let t=0;t<n.categoryMatches.length;t++){var s="_"+n.categoryMatches[t];i.push(a+s)}}r=i}return r}function eft(e,r,n){for(let t=0;t<e.length;t++)if(t!==n){var i=e[t];for(let t=0;t<r.length;t++)if(!0===i[r[t]])return!1}return!0}function rft(t,n){let e=x(t,t=>B1t([t],1)),i=J1t(e.length),a=x(e,t=>{let e={};return v(t,t=>{t=tft(t.partialPath),v(t,t=>{e[t]=!0})}),e}),s=e;for(let r=1;r<=n;r++){var o=s;s=J1t(o.length);for(let e=0;e<o.length;e++){var l=o[e];for(let t=0;t<l.length;t++){var c=l[t].partialPath,h=l[t].suffixDef,u=tft(c);if(eft(a,u,e)||bj(h)||c.length===n){var d=i[e];if(!1===aft(d,c)){d.push(c);for(let t=0;t<u.length;t++){var p=u[t];a[e][p]=!0}}}else d=B1t(h,r+1,c),s[e]=s[e].concat(d),v(d,t=>{t=tft(t.partialPath),v(t,t=>{a[e][t]=!0})})}}}return i}function nft(t,e,r,n){return t=new hft(t,lft.ALTERNATION,n),e.accept(t),rft(t.result,r)}function ift(t,e,r,n){var i=new hft(t,r),i=(e.accept(i),i.result),e=new cft(e,t,r).startWalking();return rft([new g0t({definition:i}),new g0t({definition:e})],n)}function aft(e,r){t:for(let t=0;t<e.length;t++){var n=e[t];if(n.length===r.length){for(let t=0;t<n.length;t++){var i=r[t],a=n[t];if(0==(i===a||void 0!==a.categoryMatchesMap[i.tokenTypeIdx]))continue t}return!0}}return!1}function sft(t,r){return t.length<r.length&&nq(t,(t,e)=>t===(e=r[e])||e.categoryMatchesMap[t.tokenTypeIdx])}function oft(t){return nq(t,t=>nq(t,t=>nq(t,t=>bj(t.categoryMatches))))}var lft,cft,hft,uft=b(()=>{var t;WY(),Y1t(),M0t(),h1t(),N0t(),(t=lft=lft||{})[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION",me(H1t,"getProdType"),me(V1t,"getLookaheadPaths"),me(X1t,"buildLookaheadFuncForOr"),me(K1t,"buildLookaheadFuncForOptionalProd"),me(Z1t,"buildAlternativesLookAheadFunc"),me(Q1t,"buildSingleAlternativeLookaheadFunction"),cft=class extends R0t{static{me(this,"RestDefinitionFinderWalker")}constructor(t,e,r){super(),this.topProd=t,this.targetOccurrence=e,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,e,r,n){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=r.concat(n),!0)}walkOption(t,e,r){this.checkIsTarget(t,lft.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,lft.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,lft.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,lft.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,lft.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},hft=class extends k0t{static{me(this,"InsideDefinitionFinderVisitor")}constructor(t,e,r){super(),this.targetOccurrence=t,this.targetProdType=e,this.targetRef=r,this.result=[]}checkIsTarget(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,lft.OPTION)}visitRepetition(t){this.checkIsTarget(t,lft.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,lft.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,lft.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,lft.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,lft.ALTERNATION)}},me(J1t,"initializeArrayOfArrays"),me(tft,"pathToHashKeys"),me(eft,"isUniquePrefixHash"),me(rft,"lookAheadSequenceFromAlternatives"),me(nft,"getLookaheadPathsForOr"),me(ift,"getLookaheadPathsForOptionalProd"),me(aft,"containsPath"),me(sft,"isStrictPrefixOfPath"),me(oft,"areTokenCategoriesNotUsed")});function dft(t){return t=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}),x(t,t=>Object.assign({type:Kmt.CUSTOM_LOOKAHEAD_VALIDATION},t))}function pft(e,t,r,n){var i=Iq(e,t=>gft(t,r)),t=_ft(e,t,r),a=Iq(e,t=>Tft(t,r)),s=Iq(e,t=>yft(t,e,n,r));return i.concat(t,a,s)}function gft(n,i){var t=new Aft,t=(n.accept(t),t.allProductions),t=zq(t,fft),t=aW(t,t=>1<t.length);return x(oj(t),t=>{var e=kq(t),t=i.buildDuplicateFoundError(n,t),r=A0t(e),t={message:t,type:Kmt.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:e.idx};return(r=mft(e))&&(t.parameter=r),t})}function fft(t){return`${A0t(t)}_#_${t.idx}_#_`+mft(t)}function mft(t){return t instanceof w0t?t.terminalType.name:t instanceof d0t?t.nonTerminalName:""}function yft(r,t,e,n){var i=[];return 1<nY(t,(t,e)=>e.name===r.name?t+1:t,0)&&(t=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:e}),i.push({message:t,type:Kmt.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function vft(t,e,r){var n=[];return uj(e,t)||n.push({message:`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:Kmt.INVALID_RULE_OVERRIDE,ruleName:t}),n}function xft(r,t,n,i=[]){var e,a=[],t=bft(t.definition);return bj(t)?[]:(e=r.name,uj(t,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:Kmt.LEFT_RECURSION,ruleName:e}),e=RU(t,i.concat([r])),t=Iq(e,t=>{var e=mz(i);return e.push(t),xft(r,t,n,e)}),a.concat(t))}function bft(t){let e=[];if(bj(t))return e;if((r=kq(t))instanceof d0t)e.push(r.referencedRule);else if(r instanceof g0t||r instanceof f0t||r instanceof m0t||r instanceof y0t||r instanceof x0t||r instanceof v0t)e=e.concat(bft(r.definition));else if(r instanceof b0t)e=l$(x(r.definition,t=>bft(t.definition)));else if(!(r instanceof w0t))throw Error("non exhaustive match");var r=S0t(r),n=1<t.length;return r&&n?(r=FU(t),e.concat(bft(r))):e}function wft(n,i){var t=new Lft,t=(n.accept(t),t.alternations);return Iq(t,r=>{var t=UU(r.definition);return Iq(t,(t,e)=>(t=$1t([t],[],Wgt,1),bj(t)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:e}),type:Kmt.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:e+1}]:[]))})}function kft(n,i,a){var t=new Lft,t=(n.accept(t),t.alternations),t=sY(t,t=>!0===t.ignoreAmbiguities);return Iq(t,t=>{var e=Cft(r=nft(t.idx,n,t.maxLookahead||i,t),t,n,a),r=Sft(r,t,n,a);return e.concat(r)})}function Tft(e,r){var t=new Lft,t=(e.accept(t),t.alternations);return Iq(t,t=>255<t.definition.length?[{message:r.buildTooManyAlternativesError({topLevelRule:e,alternation:t}),type:Kmt.TOO_MANY_ALTS,ruleName:e.name,occurrence:t.idx}]:[])}function Eft(t,i,a){let s=[];return v(t,n=>{var t=new Nft,t=(n.accept(t),t.allProductions);v(t,t=>{var e=H1t(t),r=t.maxLookahead||i,e=ift(t.idx,n,e,r)[0];bj(l$(e))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:t}),s.push({message:r,type:Kmt.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),s}function Cft(a,s,r,n){let o=[],t=nY(a,(t,e,i)=>(!0!==s.definition[i].ignoreAmbiguities&&v(e,r=>{let n=[i];v(a,(t,e)=>{i!==e&&aft(t,r)&&!0!==s.definition[e].ignoreAmbiguities&&n.push(e)}),1<n.length&&!aft(o,r)&&(o.push(r),t.push({alts:n,path:r}))}),t),[]);return x(t,t=>{var e=x(t.alts,t=>t+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:e,prefixPath:t.path}),type:Kmt.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:t.alts}})}function Sft(t,i,a,s){let o=nY(t,(t,e,r)=>(e=x(e,t=>({idx:r,path:t})),t.concat(e)),[]);return kz(Iq(o,t=>{if(!0===i.definition[t.idx].ignoreAmbiguities)return[];let n=t.idx,e=t.path,r=cq(o,t=>!0!==i.definition[t.idx].ignoreAmbiguities&&t.idx<n&&sft(t.path,e));return x(r,t=>{var e=[t.idx+1,n+1],r=0===i.idx?"":i.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:i,ambiguityIndices:e,prefixPath:t.path}),type:Kmt.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:e}})}))}function _ft(t,e,r){let n=[],i=x(e,t=>t.name);return v(t,t=>{var e=t.name;uj(i,e)&&(t=r.buildNamespaceConflictError(t),n.push({message:t,type:Kmt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e}))}),n}var Aft,Lft,Nft,Ift=b(()=>{WY(),Jmt(),N0t(),uft(),Y1t(),h1t(),me(dft,"validateLookahead"),me(pft,"validateGrammar"),me(gft,"validateDuplicateProductions"),me(fft,"identifyProductionForDuplicates"),me(mft,"getExtraProductionArgument"),Aft=class extends k0t{static{me(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}},me(yft,"validateRuleDoesNotAlreadyExist"),me(vft,"validateRuleIsOverridden"),me(xft,"validateNoLeftRecursion"),me(bft,"getFirstNoneTerminal"),Lft=class extends k0t{static{me(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}},me(wft,"validateEmptyOrAlternative"),me(kft,"validateAmbiguousAlternationAlternatives"),Nft=class extends k0t{static{me(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}},me(Tft,"validateTooManyAlts"),me(Eft,"validateSomeNonEmptyLookaheadPath"),me(Cft,"checkAlternativesAmbiguities"),me(Sft,"checkPrefixAlternativesAmbiguities"),me(_ft,"checkTerminalAndNoneTerminalsNameSpace")});function Rft(t){let e=kU(t,{errMsgProvider:N1t}),r={};return v(t.rules,t=>{r[t.name]=t}),D1t(r,e.errMsgProvider)}function Mft(t){return pft((t=kU(t,{errMsgProvider:I1t})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var Dft=b(()=>{WY(),P1t(),Ift(),M1t(),me(Rft,"resolveGrammar"),me(Mft,"validateGrammar")});function Oft(t){return uj(Pft,t.name)}var Pft,Bft,$ft,Fft,zft,Gft,Uft=b(()=>{WY(),Pft=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(Pft),me(Oft,"isRecognitionException"),Bft=class extends Error{static{me(this,"RecognitionException")}constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},$ft=class extends Bft{static{me(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="MismatchedTokenException"}},Fft=class extends Bft{static{me(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="NoViableAltException"}},zft=class extends Bft{static{me(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name="NotAllInputParsedException"}},Gft=class extends Bft{static{me(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="EarlyExitException"}}});function qft(t,e,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o],c=(void 0===l&&(n=this.getCurrRuleFullName(),n=this.getGAstProductions()[n],l=new a(n,i).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=A1t,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,r,c)}var jft,Wft,Yft,Hft,Vft=b(()=>{R1t(),WY(),Uft(),z0t(),Jmt(),jft={},Wft="InRuleRecoveryException",Yft=class extends Error{static{me(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=Wft}},Hft=class{static{me(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(Qq(t,"recoveryEnabled")?t:Vmt).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=qft)}getTokenToInsert(t){return(t=y1t(t,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=me(()=>{var t=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:t,ruleName:this.getCurrRuleFullName()});(t=new $ft(t,l,this.LA(0))).resyncedTokens=UU(s),this.SAVE_ERROR(t)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,r){return!(!1===r||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))}getFollowsForInRuleRecovery(t,e){return t=this.getCurrentGrammarPath(t,e),this.getNextPossibleTokenTypes(t)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t))return e=this.SKIP_TOKEN(),this.consumeToken(),e;throw new Yft("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t)||bj(e))return!1;let r=this.LA(1);return void 0!==vq(e,t=>this.tokenMatcher(r,t))}canRecoverWithSingleTokenDeletion(t){return!!this.canTokenTypeBeDeletedInRecovery(t)&&this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){var e=this.getCurrFollowKey(),e=this.getFollowSetFromFollowKey(e);return uj(e,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),e=this.LA(1),r=2;for(;;){var n=vq(t,t=>v1t(e,t));if(void 0!==n)return n;e=this.LA(r),r++}}getCurrFollowKey(){var t,e,r;return 1===this.RULE_STACK.length?jft:(t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return x(r,(t,e)=>0===e?jft:{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n[e],inRule:this.shortRuleNameToFullName(r[e-1])})}flattenFollowSet(){var t=x(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return l$(t)}getFollowSetFromFollowKey(t){return t===jft?[A1t]:(t=t.ruleName+t.idxInCallingRule+$0t+t.inRule,this.resyncFollows[t])}addToResyncTokens(t,e){return this.tokenMatcher(t,A1t)||e.push(t),e}reSyncTo(t){let e=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,t);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,e);return UU(e)}attemptInRepetitionRecovery(t,e,r,n,i,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:mz(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return x(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},me(qft,"attemptInRepetitionRecovery")});function Xft(t,e,r){return r|e|t}var Kft,Zft=b(()=>{me(Xft,"getKeyForAutomaticLookahead")}),Qft=b(()=>{WY(),M1t(),Jmt(),Ift(),uft(),Kft=class{static{me(this,"LLkLookaheadStrategy")}constructor(t){this.maxLookahead=null!=(t=t?.maxLookahead)?t:Vmt.maxLookahead}validate(t){var e,r,n=this.validateNoLeftRecursion(t.rules);return bj(n)?(e=this.validateEmptyOrAlternatives(t.rules),r=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),t=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead),[...n,...e,...r,...t]):n}validateNoLeftRecursion(t){return Iq(t,t=>xft(t,t,I1t))}validateEmptyOrAlternatives(t){return Iq(t,t=>wft(t,I1t))}validateAmbiguousAlternationAlternatives(t,e){return Iq(t,t=>kft(t,e,I1t))}validateSomeNonEmptyLookaheadPath(t,e){return Eft(t,e,I1t)}buildLookaheadForAlternation(t){return X1t(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Z1t)}buildLookaheadForOptional(t){return K1t(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,H1t(t.prodType),Q1t)}}});function Jft(t){return rmt.reset(),t.accept(rmt),t=rmt.dslMethods,rmt.reset(),t}var tmt,emt,rmt,nmt=b(()=>{WY(),Jmt(),Zft(),N0t(),Qft(),tmt=class{static{me(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=(Qq(t,"dynamicTokensEnabled")?t:Vmt).dynamicTokensEnabled,this.maxLookahead=(Qq(t,"maxLookahead")?t:Vmt).maxLookahead,this.lookaheadStrategy=Qq(t,"lookaheadStrategy")?t.lookaheadStrategy:new Kft({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){v(t,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:t,repetition:e,option:r,repetitionMandatory:n,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:a}=Jft(s);v(t,r=>{var t=0===r.idx?"":r.idx;this.TRACE_INIT(""+A0t(r)+t,()=>{var t=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),e=Xft(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(e,t)})}),v(e,t=>{this.computeLookaheadFunc(s,t.idx,768,"Repetition",t.maxLookahead,A0t(t))}),v(r,t=>{this.computeLookaheadFunc(s,t.idx,512,"Option",t.maxLookahead,A0t(t))}),v(n,t=>{this.computeLookaheadFunc(s,t.idx,1024,"RepetitionMandatory",t.maxLookahead,A0t(t))}),v(i,t=>{this.computeLookaheadFunc(s,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,A0t(t))}),v(a,t=>{this.computeLookaheadFunc(s,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,A0t(t))})})})}computeLookaheadFunc(r,n,i,a,s,t){this.TRACE_INIT(""+t+(0===n?"":n),()=>{var t=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),e=Xft(this.fullRuleNameToShort[r.name],i,n);this.setLaFuncCache(e,t)})}getKeyForAutomaticLookahead(t,e){return e|t|this.getLastExplicitRuleShortName()}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},emt=class extends k0t{static{me(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},rmt=new emt,me(Jft,"collectMethods")});function imt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function amt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function smt(t,e,r){void 0===t.children[r]?t.children[r]=[e]:t.children[r].push(e)}function omt(t,e,r){void 0===t.children[e]?t.children[e]=[r]:t.children[e].push(r)}var lmt=b(()=>{me(imt,"setNodeLocationOnlyOffset"),me(amt,"setNodeLocationFull"),me(smt,"addTerminalToCst"),me(omt,"addNoneTerminalToCst")});function cmt(t,e){Object.defineProperty(t,hmt,{enumerable:!1,configurable:!0,writable:!1,value:e})}var hmt,umt=b(()=>{hmt="name",me(cmt,"defineNameProp")});function dmt(e,r){var n=yB(e),i=n.length;for(let t=0;t<i;t++){var a=e[n[t]],s=a.length;for(let t=0;t<s;t++){var o=a[t];void 0===o.tokenTypeIdx&&this[o.name](o.children,r)}}}function pmt(t,e){var r=me(function(){},"derivedConstructor"),t=(cmt(r,t+"BaseSemantics"),{visit:me(function(t,e){if(n8(t)&&(t=t[0]),!Lj(t))return this[t.name](t.children,e)},"visit"),validateVisitor:me(function(){var t=fmt(this,e);if(!bj(t))throw t=x(t,t=>t.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + `+t.join(` + +`).replace(/\n/g,` + `))},"validateVisitor")});return r.prototype=t,(r.prototype.constructor=r)._RULE_NAMES=e,r}function gmt(t,e,r){var n=me(function(){},"derivedConstructor");cmt(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(e,t=>{i[t]=dmt}),n.prototype=i,n.prototype.constructor=n}function fmt(t,e){return mmt(t,e)}function mmt(e,t){return t=cq(t,t=>!1===R6(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:ymt.MISSING_METHOD,methodName:t})),kz(t)}var ymt,vmt,xmt,bmt,wmt,kmt,Tmt,Emt=b(()=>{var t;WY(),umt(),me(dmt,"defaultVisit"),me(pmt,"createBaseSemanticVisitorConstructor"),me(gmt,"createBaseVisitorConstructorWithDefaults"),(t=ymt=ymt||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",me(fmt,"validateVisitor"),me(mmt,"validateMissingCstMethods")}),Cmt=b(()=>{lmt(),WY(),Emt(),Jmt(),vmt=class{static{me(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(Qq(t,"nodeLocationTracking")?t:Vmt).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=amt,this.setNodeLocationFromNode=amt,this.cstPostRule=UP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=UP,this.setNodeLocationFromNode=UP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=imt,this.setNodeLocationFromNode=imt,this.cstPostRule=UP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=UP,this.setNodeLocationFromNode=UP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=UP,this.setNodeLocationFromNode=UP,this.cstPostRule=UP,this.setInitialNodeLocation=UP}else this.cstInvocationStateUpdate=UP,this.cstFinallyStateUpdate=UP,this.cstPostTerminal=UP,this.cstPostNonTerminal=UP,this.cstPostRule=UP}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){t={name:t,children:Object.create(null)},this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?(t.endOffset=e.endOffset,t.endLine=e.endLine,t.endColumn=e.endColumn):(t.startOffset=NaN,t.startLine=NaN,t.startColumn=NaN)}cstPostRuleOnlyOffset(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?t.endOffset=e.endOffset:t.startOffset=NaN}cstPostTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];smt(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];omt(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return Lj(this.baseCstVisitorConstructor)?(t=pmt(this.className,yB(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return Lj(this.baseCstVisitorWithDefaultsConstructor)?(t=gmt(this.className,yB(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=t):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}}}),Smt=b(()=>{Jmt(),xmt=class{static{me(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Hmt}LA(t){return(t=this.currIdx+t)<0||this.tokVectorLength<=t?Hmt:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}}),_mt=b(()=>{WY(),Uft(),Jmt(),M1t(),Ift(),N0t(),bmt=class{static{me(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,e,r){return this.consumeInternal(e,t,r)}subrule(t,e,r){return this.subruleInternal(e,t,r)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,r=Xmt){uj(this.definedRulesNames,t)&&(n={message:I1t.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Kmt.DUPLICATE_RULE_NAME,ruleName:t},this.definitionErrors.push(n)),this.definedRulesNames.push(t);var n=this.defineRule(t,e,r);return this[t]=n}OVERRIDE_RULE(t,e,r=Xmt){var n=vft(t,this.definedRulesNames,this.className),n=(this.definitionErrors=this.definitionErrors.concat(n),this.defineRule(t,e,r));return this[t]=n}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);var t=this.saveRecogState();try{return e.apply(this,r),!0}catch(t){if(Oft(t))return!1;throw t}finally{this.reloadRecogState(t),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return c0t(oj(this.gastProductionsCache))}}}),Amt=b(()=>{WY(),Zft(),Uft(),uft(),Y1t(),Jmt(),Vft(),R1t(),h1t(),wmt=class{static{me(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ygt,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Qq(e,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(n8(t)){if(bj(t))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if("number"==typeof t[0].startOffset)throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(n8(t))this.tokensMap=nY(t,(t,e)=>(t[e.name]=e,t),{});else if(Qq(t,"modes")&&nq(l$(oj(t.modes)),n1t))e=l$(oj(t.modes)),e=NY(e),this.tokensMap=nY(e,(t,e)=>(t[e.name]=e,t),{});else{if(!L6(t))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=mz(t)}this.tokensMap.EOF=A1t,e=Qq(t,"modes")?l$(oj(t.modes)):oj(t),t=nq(e,t=>bj(t.categoryMatches)),this.tokenMatcher=t?Ygt:Wgt,Hgt(oj(this.tokensMap))}defineRule(r,n,t){if(this.selfAnalysisDone)throw Error(`Grammar rule <${r}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=(Qq(t,"resyncEnabled")?t:Xmt).resyncEnabled,a=(Qq(t,"recoveryValueFunc")?t:Xmt).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,t=!0===this.outputCst?me(function(...t){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,t);var e=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(e),e}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):me(function(...t){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,t)}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(t,{ruleName:r,originalGrammarAction:n})}invokeRuleCatch(t,e,r){var n=1===this.RULE_STACK.length,e=e&&!this.isBackTracking()&&this.recoveryEnabled;if(Oft(t)){var i=t;if(e){if(e=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(e))return i.resyncedTokens=this.reSyncTo(e),this.outputCst?((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,e):r(t);this.outputCst&&((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=e)}else if(n)return this.moveToTerminatedState(),r(t);throw i}throw t}optionInternal(t,e){var r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let n=this.getLaFuncFromCache(r),i;if("function"!=typeof t){i=t.DEF;let e=t.GATE;if(void 0!==e){let t=n;n=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=t;if(!0===n.call(this))return i.call(this)}atLeastOneInternal(t,e){var r=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=r;if(!0!==n.call(this))throw this.raiseEarlyExitException(t,lft.REPETITION_MANDATORY,r.ERR_MSG);{let t=this.doSingleRepetition(i);for(;!0===n.call(this)&&!0===t;)t=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],n,1024,t,j1t)}atLeastOneSepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,lft.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);for(n.call(this),r=me(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,r,n,W1t],r,1536,t,W1t)}manyInternal(t,e){var r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=me(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else i=r;let a=!0;for(;!0===n.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],n,768,t,U1t,a)}manySepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(n.call(this),e=me(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,q1t],e,1280,t,q1t)}}repetitionSepSecondInternal(t,e,r,n,i){for(;r();)this.CONSUME(e),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,n,i],r,1536,t,i)}doSingleRepetition(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){var r=this.getKeyForAutomaticLookahead(256,e),n=n8(t)?t:t.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,n)))return n[r].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){var t,e;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new zft(e,t)))}subruleInternal(t,e,r){var n;try{var i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=e,n=t.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:t.ruleName),n}catch(e){throw this.subruleInternalError(e,r,t.ruleName)}}subruleInternalError(t,e,r){throw Oft(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:r),delete t.partialCstResult),t}consumeInternal(t,e,r){let n;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),n=i):this.consumeInternalError(t,i,r)}catch(r){n=this.consumeInternalRecovery(t,e,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:t.name,n),n}consumeInternalError(t,e,r){var n=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new $ft(r,e,n))}consumeInternalRecovery(t,e,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;e=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,e)}catch(t){throw t.name===Wft?r:t}}saveRecogState(){var t=this.errors,e=mz(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),A1t)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),Lmt=b(()=>{Uft(),WY(),uft(),Jmt(),kmt=class{static{me(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=(Qq(t,"errorMessageProvider")?t:Vmt).errorMessageProvider}SAVE_ERROR(t){if(Oft(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:mz(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return mz(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){var n=this.getCurrRuleFullName(),t=ift(t,this.getGAstProductions()[n],e,this.maxLookahead)[0],i=[];for(let t=1;t<=this.maxLookahead;t++)i.push(this.LA(t));throw e=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:t,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n}),this.SAVE_ERROR(new Gft(e,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){var r=this.getCurrRuleFullName(),t=nft(t,this.getGAstProductions()[r],this.maxLookahead),n=[];for(let t=1;t<=this.maxLookahead;t++)n.push(this.LA(t));throw r=this.LA(0),t=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:t,actual:n,previous:r,customUserDescription:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Fft(t,this.LA(1),r))}}}),Nmt=b(()=>{Y1t(),WY(),Tmt=class{static{me(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){var r=this.gastProductionsCache[t];if(Lj(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return $1t([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){var e=kq(t.ruleStack),e=this.getGAstProductions()[e];return new z1t(e,t).startWalking()}}});function Imt(t,e,r,n=!1){Dmt(r);var i=PU(this.recordingProdStack),a=R6(e)?e:e.DEF,t=new t({definition:[],idx:r});return n&&(t.separator=e.SEP),Qq(e,"MAX_LOOKAHEAD")&&(t.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(t),a.call(this),i.definition.push(t),this.recordingProdStack.pop(),Omt}function Rmt(t,e){Dmt(e);let r=PU(this.recordingProdStack),n=!1===n8(t),i=0==n?t:t.DEF,a=new b0t({definition:[],idx:e,ignoreAmbiguities:n&&!0===t.IGNORE_AMBIGUITIES});return Qq(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),e=fY(i,t=>R6(t.GATE)),a.hasPredicates=e,r.definition.push(a),v(i,t=>{var e=new g0t({definition:[]});a.definition.push(e),Qq(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:Qq(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),Omt}function Mmt(t){return 0===t?"":""+t}function Dmt(t){if(t<0||Pmt<t)throw(t=new Error(`Invalid DSL Method idx value: <${t}> + Idx value must be a none negative value smaller than `+(Pmt+1))).KNOWN_RECORDER_ERROR=!0,t}var Omt,Pmt,Bmt,$mt,Fmt,zmt,Gmt,Umt=b(()=>{WY(),N0t(),d1t(),h1t(),R1t(),Jmt(),Zft(),Omt={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(Omt),Pmt=Math.pow(2,8)-1,Hgt([Bmt=f1t({name:"RECORDING_PHASE_TOKEN",pattern:c1t.NA})]),$mt=y1t(Bmt,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1),Object.freeze($mt),Fmt={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},zmt=class{static{me(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var t=0<r?r:"";this["CONSUME"+t]=function(t,e){return this.consumeInternalRecord(t,r,e)},this["SUBRULE"+t]=function(t,e){return this.subruleInternalRecord(t,r,e)},this["OPTION"+t]=function(t){return this.optionInternalRecord(t,r)},this["OR"+t]=function(t){return this.orInternalRecord(t,r)},this["MANY"+t]=function(t){this.manyInternalRecord(r,t)},this["MANY_SEP"+t]=function(t){this.manySepFirstInternalRecord(r,t)},this["AT_LEAST_ONE"+t]=function(t){this.atLeastOneInternalRecord(r,t)},this["AT_LEAST_ONE_SEP"+t]=function(t){this.atLeastOneSepFirstInternalRecord(r,t)}}this.consume=function(t,e,r){return this.consumeInternalRecord(e,t,r)},this.subrule=function(t,e,r){return this.subruleInternalRecord(e,t,r)},this.option=function(t,e){return this.optionInternalRecord(e,t)},this.or=function(t,e){return this.orInternalRecord(e,t)},this.many=function(t,e){this.manyInternalRecord(t,e)},this.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{var e=this;for(let t=0;t<10;t++){var r=0<t?t:"";delete e["CONSUME"+r],delete e["SUBRULE"+r],delete e["OPTION"+r],delete e["OR"+r],delete e["MANY"+r],delete e["MANY_SEP"+r],delete e["AT_LEAST_ONE"+r],delete e["AT_LEAST_ONE_SEP"+r]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,e){return()=>!0}LA_RECORD(t){return Hmt}topLevelRuleRecord(t,e){try{var r=new p0t({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{}throw t}}optionInternalRecord(t,e){return Imt.call(this,f0t,t,e)}atLeastOneInternalRecord(t,e){Imt.call(this,m0t,e,t)}atLeastOneSepFirstInternalRecord(t,e){Imt.call(this,y0t,e,t,!0)}manyInternalRecord(t,e){Imt.call(this,v0t,e,t)}manySepFirstInternalRecord(t,e){Imt.call(this,x0t,e,t,!0)}orInternalRecord(t,e){return Rmt.call(this,t,e)}subruleInternalRecord(t,e,r){var n,i;if(Dmt(e),t&&!1!==Qq(t,"ruleName"))return n=PU(this.recordingProdStack),i=t.ruleName,i=new d0t({idx:e,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?Fmt:Omt;throw(r=new Error(`<SUBRULE${Mmt(e)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(t,e,r){var n;if(Dmt(e),Jgt(t))return n=PU(this.recordingProdStack),r=new w0t({idx:e,terminalType:t,label:r?.LABEL}),n.definition.push(r),$mt;throw(n=new Error(`<CONSUME${Mmt(e)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,n}},me(Imt,"recordProd"),me(Rmt,"recordOrProd"),me(Mmt,"getIdxSuffix"),me(Dmt,"assertMethodIdxIsValid")}),qmt=b(()=>{WY(),s0t(),Jmt(),Gmt=class{static{me(this,"PerformanceTracer")}initPerformanceTracer(t){var e;Qq(t,"traceInitPerf")?(t=t.traceInitPerf,this.traceInitMaxIdent=(e="number"==typeof t)?t:1/0,this.traceInitPerf=e?0<t:t):(this.traceInitMaxIdent=0,this.traceInitPerf=Vmt.traceInitPerf),this.traceInitIndent=-1}TRACE_INIT(t,e){var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${t}>`),r0t(e)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${t}> time: ${n}ms`),this.traceInitIndent--,i):e()}}});function jmt(i,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(t=>{var e;"constructor"!==t&&((e=Object.getOwnPropertyDescriptor(n,t))&&(e.get||e.set)?Object.defineProperty(i.prototype,t,e):i.prototype[t]=r.prototype[t])})})}var Wmt=b(()=>{me(jmt,"applyMixins")});function Ymt(t=void 0){return function(){return t}}var Hmt,Vmt,Xmt,Kmt,Zmt,Qmt,Jmt=b(()=>{var t;WY(),s0t(),j0t(),R1t(),M1t(),Dft(),Vft(),nmt(),Cmt(),Smt(),_mt(),Amt(),Lmt(),Nmt(),Umt(),qmt(),Wmt(),Ift(),Hmt=y1t(A1t,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Hmt),Vmt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:L1t,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Xmt=Object.freeze({recoveryValueFunc:me(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=Kmt=Kmt||{})[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",me(Ymt,"EMPTY_ALT"),(Zmt=class e{static{me(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{var t;this.selfAnalysisDone=!0;let r=this.className,n=(this.TRACE_INIT("toFastProps",()=>{i0t(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,t=>{let e=this[t].originalGrammarAction,r;this.TRACE_INIT(t+" Rule",()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{n=Rft({rules:oj(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;bj(n)&&!1===this.skipValidations&&(t=Mft({rules:oj(this.gastProductionsCache),tokenTypes:oj(this.tokensMap),errMsgProvider:I1t,grammarName:r}),e=dft({lookaheadStrategy:this.lookaheadStrategy,rules:oj(this.gastProductionsCache),tokenTypes:oj(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),bj(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=G0t(oj(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:oj(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(oj(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!bj(this.definitionErrors))throw t=x(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected: + `+t.join(` +------------------------------- +`))})}constructor(t,e){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),Qq(e,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated. + Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=(Qq(e,"skipValidations")?e:Vmt).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,jmt(Zmt,[Hft,tmt,vmt,xmt,wmt,bmt,kmt,Tmt,zmt,Gmt]),Qmt=class extends Zmt{static{me(this,"EmbeddedActionsParser")}constructor(t,e=Vmt){(e=mz(e)).outputCst=!1,super(t,e)}}}),tyt=b(()=>{N0t()}),eyt=b(()=>{}),ryt=b(()=>{tyt(),eyt()}),nyt=b(()=>{Qpt()}),iyt=b(()=>{Qpt(),Jmt(),d1t(),R1t(),uft(),Qft(),M1t(),Uft(),u1t(),N0t(),N0t(),ryt(),nyt()});function ayt(t,e,r){return t.name+`_${e}_`+r}function syt(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(oyt(r,e),e.length);for(let t=0;t<n;t++){var i=e[t],a=fyt(r,i,i);void 0!==a&&Cyt(r,i,a)}return r}function oyt(e,r){var n=r.length;for(let t=0;t<n;t++){var i=r[t],a=_yt(e,i,void 0,{type:Iyt}),s=_yt(e,i,void 0,{type:Dyt});a.stop=s,e.ruleToStartState.set(i,a),e.ruleToStopState.set(i,s)}}function lyt(t,e,r){return r instanceof w0t?Tyt(t,e,r.terminalType,r):(r instanceof d0t?Eyt:r instanceof b0t?pyt:r instanceof f0t?gyt:r instanceof v0t?cyt:r instanceof x0t?hyt:r instanceof m0t?uyt:r instanceof y0t?dyt:fyt)(t,e,r)}function cyt(t,e,r){var n=_yt(t,e,r,{type:Myt});return xyt(t,n),yyt(t,e,r,byt(t,e,n,r,fyt(t,e,r)))}function hyt(t,e,r){var n=_yt(t,e,r,{type:Myt});return xyt(t,n),yyt(t,e,r,byt(t,e,n,r,fyt(t,e,r)),Tyt(t,e,r.separator,r))}function uyt(t,e,r){var n=_yt(t,e,r,{type:Ryt});return xyt(t,n),myt(t,e,r,byt(t,e,n,r,fyt(t,e,r)))}function dyt(t,e,r){var n=_yt(t,e,r,{type:Ryt});return xyt(t,n),myt(t,e,r,byt(t,e,n,r,fyt(t,e,r)),Tyt(t,e,r.separator,r))}function pyt(e,r,t){var n=_yt(e,r,t,{type:Nyt}),i=(xyt(e,n),x(t.definition,t=>lyt(e,r,t)));return byt(e,r,n,t,...i)}function gyt(t,e,r){var n=_yt(t,e,r,{type:Nyt});return xyt(t,n),vyt(t,e,r,byt(t,e,n,r,fyt(t,e,r)))}function fyt(e,r,t){return 1===(t=cq(x(t.definition,t=>lyt(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:kyt(e,t)}function myt(t,e,r,n,i){var a=n.left,n=n.right,s=_yt(t,e,r,{type:$yt}),o=(xyt(t,s),_yt(t,e,r,{type:Fyt}));return a.loopback=s,o.loopback=s,Syt(n,t.decisionMap[ayt(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===i?(Syt(s,a),Syt(s,o)):(Syt(s,o),Syt(s,i.left),Syt(i.right,a)),{left:a,right:o}}function yyt(t,e,r,n,i){var a=n.left,n=n.right,s=_yt(t,e,r,{type:Byt}),o=(xyt(t,s),_yt(t,e,r,{type:Fyt})),l=_yt(t,e,r,{type:Pyt});return s.loopback=l,o.loopback=l,Syt(s,a),Syt(s,o),Syt(n,l),void 0!==i?(Syt(l,o),Syt(l,i.left),Syt(i.right,a)):Syt(l,s),{left:t.decisionMap[ayt(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function vyt(t,e,r,n){var i=n.left;return Syt(i,n.right),t.decisionMap[ayt(e,"Option",r.idx)]=i,n}function xyt(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function byt(t,e,r,n,...i){var a,s=_yt(t,e,n,{type:Oyt,start:r});r.end=s;for(a of i)void 0!==a?(Syt(r,a.left),Syt(a.right,s)):Syt(r,s);return i={left:r,right:s},t.decisionMap[ayt(e,wyt(n),n.idx)]=r,i}function wyt(t){if(t instanceof b0t)return"Alternation";if(t instanceof f0t)return"Option";if(t instanceof v0t)return"Repetition";if(t instanceof x0t)return"RepetitionWithSeparator";if(t instanceof m0t)return"RepetitionMandatory";if(t instanceof y0t)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function kyt(e,r){var n=r.length;for(let t=0;t<n-1;t++){var i,a=r[t],s=(i=1===a.left.transitions.length?a.left.transitions[0]:void 0)instanceof qyt,o=i,l=r[t+1].left;a.left.type===Nyt&&a.right.type===Nyt&&void 0!==i&&(s&&o.followState===a.right||i.target===a.right)?(s?o.followState=l:i.target=l,Lyt(e,a.right)):Syt(a.right,l)}return{left:r[0].left,right:r[n-1].right}}function Tyt(t,e,r,n){var i=_yt(t,e,n,{type:Nyt}),t=_yt(t,e,n,{type:Nyt});return Ayt(i,new Gyt(t,r)),{left:i,right:t}}function Eyt(t,e,r){var n=r.referencedRule,i=t.ruleToStartState.get(n),a=_yt(t,e,r,{type:Nyt}),t=_yt(t,e,r,{type:Nyt});return Ayt(a,new qyt(i,n,t)),{left:a,right:t}}function Cyt(t,e,r){var n=t.ruleToStartState.get(e),t=(Syt(n,r.left),t.ruleToStopState.get(e));return Syt(r.right,t),{left:n,right:t}}function Syt(t,e){Ayt(t,new Uyt(e))}function _yt(t,e,r,n){return r=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n),t.states.push(r),r}function Ayt(t,e){0===t.transitions.length&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function Lyt(t,e){t.states.splice(t.states.indexOf(e),1)}var Nyt,Iyt,Ryt,Myt,Dyt,Oyt,Pyt,Byt,$yt,Fyt,zyt,Gyt,Uyt,qyt,jyt=b(()=>{Lq(),hq(),iyt(),me(ayt,"buildATNKey"),Nyt=1,Iyt=2,Ryt=4,Myt=5,Dyt=7,Oyt=8,Pyt=9,Byt=10,$yt=11,Fyt=12,zyt=class{static{me(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},Gyt=class extends zyt{static{me(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},Uyt=class extends zyt{static{me(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},qyt=class extends zyt{static{me(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}},me(syt,"createATN"),me(oyt,"createRuleStartAndStopATNStates"),me(lyt,"atom"),me(cyt,"repetition"),me(hyt,"repetitionSep"),me(uyt,"repetitionMandatory"),me(dyt,"repetitionMandatorySep"),me(pyt,"alternation"),me(gyt,"option"),me(fyt,"block"),me(myt,"plus"),me(yyt,"star"),me(vyt,"optional"),me(xyt,"defineDecisionState"),me(byt,"makeAlts"),me(wyt,"getProdType"),me(kyt,"makeBlock"),me(Tyt,"tokenRef"),me(Eyt,"ruleRef"),me(Cyt,"buildRuleHandle"),me(Syt,"epsilon"),me(_yt,"newState"),me(Ayt,"addTransition"),me(Lyt,"removeState")});function Wyt(t,e=!0){return`${e?"a"+t.alt:""}s${t.state.stateNumber}:`+t.stack.map(t=>t.stateNumber.toString()).join("_")}var Yyt,Hyt,Vyt=b(()=>{Lq(),Yyt={},Hyt=class{static{me(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){var e=Wyt(t);e in this.map||(this.map[e]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return x(this.configs,t=>t.alt)}get key(){let t="";for(var e in this.map)t+=e+":";return t}},me(Wyt,"getATNConfigKey")});function Xyt(n,i){let a={};return t=>{let e=t.toString(),r=a[e];return void 0===r&&(r={atnStartState:n,decision:i,states:{}},a[e]=r),r}}function Kyt(t,e=!0){var r,n=new Set;for(r of t){var i,a,s=new Set;for(i of r){if(void 0===i){if(e)break;return!1}for(a of[i.tokenTypeIdx].concat(i.categoryMatches))if(n.has(a)){if(!s.has(a))return!1}else n.add(a),s.add(a)}}return!0}function Zyt(e){var r=e.decisionStates.length,n=Array(r);for(let t=0;t<r;t++)n[t]=Xyt(e.decisionStates[t],t);return n}function Qyt(t,e,r,n){let i=t[e](r),a=i.start;return void 0===a&&(t=d2t(i.atnStartState),a=u2t(i,c2t(t)),i.start=a),Jyt.apply(this,[i,a,r,n])}function Jyt(t,e,r,n){let i=e,a=1,s=[],o=this.LA(a++);for(;;){var l=a2t(i,o);if((l=void 0===l?t2t.apply(this,[t,i,o,a,r,n]):l)===Yyt)return i2t(s,i,o);if(!0===l.isAcceptState)return l.prediction;i=l,s.push(o),o=this.LA(a++)}}function t2t(t,e,r,n,i,a){var s=s2t(e.configs,r,i);if(0===s.size)return h2t(t,e,r,Yyt),Yyt;let o=c2t(s),l=l2t(s,i);return void 0!==l?(o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l):y2t(s)&&(i=jj(s.alts),o.isAcceptState=!0,o.prediction=i,o.configs.uniqueAlt=i,e2t.apply(this,[t,n,s.alts,a])),o=h2t(t,e,r,o)}function e2t(t,e,r,n){var i=[];for(let t=1;t<=e;t++)i.push(this.LA(t).tokenType);n(r2t({topLevelRule:(t=t.atnStartState).rule,ambiguityIndices:r,production:t.production,prefixPath:i}))}function r2t(t){var e=x(t.prefixPath,t=>p1t(t)).join(", "),r=0===t.production.idx?"":t.production.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${n2t(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`}function n2t(t){if(t instanceof d0t)return"SUBRULE";if(t instanceof f0t)return"OPTION";if(t instanceof b0t)return"OR";if(t instanceof m0t)return"AT_LEAST_ONE";if(t instanceof y0t)return"AT_LEAST_ONE_SEP";if(t instanceof x0t)return"MANY_SEP";if(t instanceof v0t)return"MANY";if(t instanceof w0t)return"CONSUME";throw Error("non exhaustive match")}function i2t(t,e,r){return e=Iq(e.configs.elements,t=>t.state.transitions),{actualToken:r,possibleTokenTypes:MY(e.filter(t=>t instanceof Gyt).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function a2t(t,e){return t.edges[e.tokenTypeIdx]}function s2t(t,e,r){var n,i=new Hyt,a=[];for(n of t.elements)if(!1!==r.is(n.alt))if(n.state.type===Dyt)a.push(n);else{var s=n.state.transitions.length;for(let t=0;t<s;t++){var o=o2t(n.state.transitions[t],e);void 0!==o&&i.add({state:o,alt:n.alt,stack:n.stack})}}let l;if(void 0===(l=0===a.length&&1===i.size?i:l)){l=new Hyt;for(var c of i.elements)p2t(c,l)}if(0<a.length&&!f2t(l))for(var h of a)l.add(h);return l}function o2t(t,e){if(t instanceof Gyt&&v1t(e,t.tokenType))return t.target}function l2t(t,e){let r;for(var n of t.elements)if(!0===e.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function c2t(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function h2t(t,e,r,n){return n=u2t(t,n),e.edges[r.tokenTypeIdx]=n}function u2t(t,e){var r,n;return e===Yyt?e:(r=e.configs.key,void 0!==(n=t.states[r])?n:(e.configs.finalize(),t.states[r]=e))}function d2t(e){var r=new Hyt,n=e.transitions.length;for(let t=0;t<n;t++)p2t({state:e.transitions[t].target,alt:t,stack:[]},r);return r}function p2t(e,r){var t,n=e.state;if(n.type===Dyt)0<e.stack.length?p2t({state:(t=[...e.stack]).pop(),alt:e.alt,stack:t},r):r.add(e);else{n.epsilonOnlyTransitions||r.add(e);var i=n.transitions.length;for(let t=0;t<i;t++){var a=g2t(e,n.transitions[t]);void 0!==a&&p2t(a,r)}}}function g2t(t,e){var r;return e instanceof Uyt?{state:e.target,alt:t.alt,stack:t.stack}:e instanceof qyt?(r=[...t.stack,e.followState],{state:e.target,alt:t.alt,stack:r}):void 0}function f2t(t){for(var e of t.elements)if(e.state.type===Dyt)return!0;return!1}function m2t(t){for(var e of t.elements)if(e.state.type!==Dyt)return!1;return!0}function y2t(t){return!!m2t(t)||x2t(t=v2t(t.elements))&&!b2t(t)}function v2t(t){var r,n=new Map;for(r of t){let t=Wyt(r,!1),e=n.get(t);void 0===e&&(e={},n.set(t,e)),e[r.alt]=!0}return n}function x2t(t){for(var e of Array.from(t.values()))if(1<Object.keys(e).length)return!0;return!1}function b2t(t){for(var e of Array.from(t.values()))if(1===Object.keys(e).length)return!0;return!1}var w2t,k2t,T2t,E2t,C2t,S2t,_2t,A2t,L2t,N2t,I2t,R2t,M2t,D2t,O2t,P2t,B2t,$2t,F2t,z2t,G2t,U2t,q2t,j2t,W2t,Y2t,H2t,V2t,X2t,K2t,Z2t,Q2t,J2t,tvt,evt,rvt,nvt,ivt,avt,svt,ovt,lvt,cvt,hvt,uvt,dvt,pvt,gvt,fvt,mvt,yvt,vvt,xvt,bvt,wvt,kvt,Tvt,Evt,Cvt,Svt,_vt,Avt,Lvt,Nvt,Ivt,Rvt,Mvt,Dvt,Ovt,Pvt,Bvt,$vt,Fvt,zvt,Gvt,Uvt,qvt,jvt,Wvt,Yvt,Hvt,ye,Vvt,Xvt,Kvt,Zvt,Qvt,Jvt,txt=b(()=>{iyt(),jyt(),Vyt(),Wj(),Rq(),DY(),Lq(),c$(),VU(),wj(),iY(),me(Xyt,"createDFACache"),w2t=class{static{me(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let e="",r=this.predicates.length;for(let t=0;t<r;t++)e+=!0===this.predicates[t]?"1":"0";return e}},k2t=new w2t,T2t=class extends Kft{static{me(this,"LLStarLookaheadStrategy")}constructor(t){super(),this.logging=null!=(t=t?.logging)?t:t=>console.log(t)}initialize(t){this.atn=syt(t.rules),this.dfas=Zyt(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:e,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,o=ayt(r,"Alternation",e),l=this.atn.decisionMap[o].decision,c=x(V1t({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!Kyt(c,!1)||i)return n?function(e){var r=new w2t,n=void 0===e?0:e.length;for(let t=0;t<n;t++){var i=e?.[t].GATE;r.set(t,void 0===i||i.call(this))}var t=Qyt.call(this,a,l,r,s);return"number"==typeof t?t:void 0}:function(){var t=Qyt.call(this,a,l,k2t,s);return"number"==typeof t?t:void 0};{let r=nY(c,(e,t,r)=>(v(t,t=>{t&&(e[t.tokenTypeIdx]=r,v(t.categoryMatches,t=>{e[t]=r}))}),e),{});return n?function(t){var e=this.LA(1),e=r[e.tokenTypeIdx];if(void 0===t||void 0===e||void 0===(t=null==(t=t[e])?void 0:t.GATE)||!1!==t.call(this))return e}:function(){var t=this.LA(1);return r[t.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:t,rule:e,prodType:n,dynamicTokensEnabled:i}=r,a=this.dfas,s=this.logging,o=ayt(e,n,t),l=this.atn.decisionMap[o].decision,c=x(V1t({maxLookahead:1,occurrence:t,prodType:n,rule:e}),t=>x(t,t=>t[0]));if(Kyt(c)&&c[0][0]&&!i){if(r=c[0],1===(r=l$(r)).length&&bj(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=nY(r,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){var t=Qyt.call(this,a,l,k2t,s);return"object"!=typeof t&&0===t}}},me(Kyt,"isLL1Sequence"),me(Zyt,"initATNSimulator"),me(Qyt,"adaptivePredict"),me(Jyt,"performLookahead"),me(t2t,"computeLookaheadTarget"),me(e2t,"reportLookaheadAmbiguity"),me(r2t,"buildAmbiguityError"),me(n2t,"getProductionDslName"),me(i2t,"buildAdaptivePredictError"),me(a2t,"getExistingTargetState"),me(s2t,"computeReachSet"),me(o2t,"getReachableTarget"),me(l2t,"getUniqueAlt"),me(c2t,"newDFAState"),me(h2t,"addDFAEdge"),me(u2t,"addDFAState"),me(d2t,"computeStartState"),me(p2t,"closure"),me(g2t,"getEpsilonTarget"),me(f2t,"hasConfigInRuleStopState"),me(m2t,"allConfigsInRuleStopStates"),me(y2t,"hasConflictTerminatingPrediction"),me(v2t,"getConflictingAltSets"),me(x2t,"hasConflictingAltSet"),me(b2t,"hasStateAssociatedWithOneAlt")}),ext=b(()=>{txt()}),rxt=b(()=>{function t(t){return"string"==typeof t}var e,r,n,i;function a(t){return"string"==typeof t}function s(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}function o(t){return"number"==typeof t&&r.MIN_VALUE<=t&&t<=r.MAX_VALUE}function l(t,e){return{line:t=t===Number.MAX_VALUE?_2t.MAX_VALUE:t,character:e=e===Number.MAX_VALUE?_2t.MAX_VALUE:e}}function c(t){return ye.objectLiteral(t)&&ye.uinteger(t.line)&&ye.uinteger(t.character)}function h(t,e,r,n){if(ye.uinteger(t)&&ye.uinteger(e)&&ye.uinteger(r)&&ye.uinteger(n))return{start:A2t.create(t,e),end:A2t.create(r,n)};if(A2t.is(t)&&A2t.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${r}, ${n}]`)}function u(t){return ye.objectLiteral(t)&&A2t.is(t.start)&&A2t.is(t.end)}function d(t,e){return{uri:t,range:e}}function p(t){return ye.objectLiteral(t)&&L2t.is(t.range)&&(ye.string(t.uri)||ye.undefined(t.uri))}function g(t,e,r,n){return{targetUri:t,targetRange:e,targetSelectionRange:r,originSelectionRange:n}}function f(t){return ye.objectLiteral(t)&&L2t.is(t.targetRange)&&ye.string(t.targetUri)&&L2t.is(t.targetSelectionRange)&&(L2t.is(t.originSelectionRange)||ye.undefined(t.originSelectionRange))}function m(t,e,r,n){return{red:t,green:e,blue:r,alpha:n}}function y(t){return ye.objectLiteral(t)&&ye.numberRange(t.red,0,1)&&ye.numberRange(t.green,0,1)&&ye.numberRange(t.blue,0,1)&&ye.numberRange(t.alpha,0,1)}function v(t,e){return{range:t,color:e}}function x(t){return ye.objectLiteral(t)&&L2t.is(t.range)&&R2t.is(t.color)}function b(t,e,r){return{label:t,textEdit:e,additionalTextEdits:r}}function w(t){return ye.objectLiteral(t)&&ye.string(t.label)&&(ye.undefined(t.textEdit)||q2t.is(t))&&(ye.undefined(t.additionalTextEdits)||ye.typedArray(t.additionalTextEdits,q2t.is))}function k(t,e,r,n,i,a){return t={startLine:t,endLine:e},ye.defined(r)&&(t.startCharacter=r),ye.defined(n)&&(t.endCharacter=n),ye.defined(i)&&(t.kind=i),ye.defined(a)&&(t.collapsedText=a),t}function T(t){return ye.objectLiteral(t)&&ye.uinteger(t.startLine)&&ye.uinteger(t.startLine)&&(ye.undefined(t.startCharacter)||ye.uinteger(t.startCharacter))&&(ye.undefined(t.endCharacter)||ye.uinteger(t.endCharacter))&&(ye.undefined(t.kind)||ye.string(t.kind))}function E(t,e){return{location:t,message:e}}function C(t){return ye.defined(t)&&N2t.is(t.location)&&ye.string(t.message)}function S(t){return ye.objectLiteral(t)&&ye.string(t.href)}function _(t,e,r,n,i,a){return t={range:t,message:e},ye.defined(r)&&(t.severity=r),ye.defined(n)&&(t.code=n),ye.defined(i)&&(t.source=i),ye.defined(a)&&(t.relatedInformation=a),t}function A(t){var e;return ye.defined(t)&&L2t.is(t.range)&&ye.string(t.message)&&(ye.number(t.severity)||ye.undefined(t.severity))&&(ye.integer(t.code)||ye.string(t.code)||ye.undefined(t.code))&&(ye.undefined(t.codeDescription)||ye.string(null==(e=t.codeDescription)?void 0:e.href))&&(ye.string(t.source)||ye.undefined(t.source))&&(ye.undefined(t.relatedInformation)||ye.typedArray(t.relatedInformation,B2t.is))}function L(t,e,...r){return t={title:t,command:e},ye.defined(r)&&0<r.length&&(t.arguments=r),t}function N(t){return ye.defined(t)&&ye.string(t.title)&&ye.string(t.command)}function I(t,e){return{range:t,newText:e}}function R(t,e){return{range:{start:t,end:t},newText:e}}function M(t){return{range:t,newText:""}}function P(t){return ye.objectLiteral(t)&&ye.string(t.newText)&&L2t.is(t.range)}function B(t,e,r){return t={label:t},void 0!==e&&(t.needsConfirmation=e),void 0!==r&&(t.description=r),t}function $(t){return ye.objectLiteral(t)&&ye.string(t.label)&&(ye.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(ye.string(t.description)||void 0===t.description)}function F(t){return ye.string(t)}function z(t,e,r){return{range:t,newText:e,annotationId:r}}function G(t,e,r){return{range:{start:t,end:t},newText:e,annotationId:r}}function U(t,e){return{range:t,newText:"",annotationId:e}}function q(t){return q2t.is(t)&&(j2t.is(t.annotationId)||W2t.is(t.annotationId))}function j(t,e){return{textDocument:t,edits:e}}function W(t){return ye.defined(t)&&tvt.is(t.textDocument)&&Array.isArray(t.edits)}function Y(t,e,r){return t={kind:"create",uri:t},void 0===e||void 0===e.overwrite&&void 0===e.ignoreIfExists||(t.options=e),void 0!==r&&(t.annotationId=r),t}function H(t){return t&&"create"===t.kind&&ye.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ye.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ye.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||W2t.is(t.annotationId))}function V(t,e,r,n){return t={kind:"rename",oldUri:t,newUri:e},void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(t.options=r),void 0!==n&&(t.annotationId=n),t}function X(t){return t&&"rename"===t.kind&&ye.string(t.oldUri)&&ye.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ye.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ye.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||W2t.is(t.annotationId))}function K(t,e,r){return t={kind:"delete",uri:t},void 0===e||void 0===e.recursive&&void 0===e.ignoreIfNotExists||(t.options=e),void 0!==r&&(t.annotationId=r),t}function Z(t){return t&&"delete"===t.kind&&ye.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ye.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ye.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||W2t.is(t.annotationId))}function Q(t){return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(t=>ye.string(t.kind)?V2t.is(t)||X2t.is(t)||K2t.is(t):H2t.is(t)))}function J(t){return{uri:t}}function tt(t){return ye.defined(t)&&ye.string(t.uri)}function et(t,e){return{uri:t,version:e}}function rt(t){return ye.defined(t)&&ye.string(t.uri)&&ye.integer(t.version)}function nt(t,e){return{uri:t,version:e}}function it(t){return ye.defined(t)&&ye.string(t.uri)&&(null===t.version||ye.integer(t.version))}function at(t,e,r,n){return{uri:t,languageId:e,version:r,text:n}}function st(t){return ye.defined(t)&&ye.string(t.uri)&&ye.string(t.languageId)&&ye.integer(t.version)&&ye.string(t.text)}function ot(t){return t===n.PlainText||t===n.Markdown}function lt(t){var e=t;return ye.objectLiteral(t)&&rvt.is(e.kind)&&ye.string(e.value)}function ct(t,e,r){return{newText:t,insert:e,replace:r}}function ht(t){return t&&ye.string(t.newText)&&L2t.is(t.insert)&&L2t.is(t.replace)}function ut(t){return t&&(ye.string(t.detail)||void 0===t.detail)&&(ye.string(t.description)||void 0===t.description)}function dt(t){return{label:t}}function pt(t,e){return{items:t||[],isIncomplete:!!e}}function gt(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function ft(t){return ye.string(t)||ye.objectLiteral(t)&&ye.string(t.language)&&ye.string(t.value)}function mt(t){var e=t;return!!e&&ye.objectLiteral(e)&&(nvt.is(e.contents)||uvt.is(e.contents)||ye.typedArray(e.contents,uvt.is))&&(void 0===t.range||L2t.is(t.range))}function yt(t,e){return e?{label:t,documentation:e}:{label:t}}function vt(t,e,...r){return t={label:t},ye.defined(e)&&(t.documentation=e),ye.defined(r)?t.parameters=r:t.parameters=[],t}function xt(t,e){return t={range:t},ye.number(e)&&(t.kind=e),t}function bt(t,e,r,n,i){return t={name:t,kind:e,location:{uri:n,range:r}},i&&(t.containerName=i),t}function wt(t,e,r,n){return void 0!==n?{name:t,kind:e,location:{uri:r,range:n}}:{name:t,kind:e,location:{uri:r}}}function kt(t,e,r,n,i,a){return t={name:t,detail:e,kind:r,range:n,selectionRange:i},void 0!==a&&(t.children=a),t}function Tt(t){return t&&ye.string(t.name)&&ye.number(t.kind)&&L2t.is(t.range)&&L2t.is(t.selectionRange)&&(void 0===t.detail||ye.string(t.detail))&&(void 0===t.deprecated||ye.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}function Et(t,e,r){return t={diagnostics:t},null!=e&&(t.only=e),null!=r&&(t.triggerKind=r),t}function Ct(t){return ye.defined(t)&&ye.typedArray(t.diagnostics,G2t.is)&&(void 0===t.only||ye.typedArray(t.only,ye.string))&&(void 0===t.triggerKind||t.triggerKind===kvt.Invoked||t.triggerKind===kvt.Automatic)}function St(t,e,r){let n={title:t},i=!0;return"string"==typeof e?(i=!1,n.kind=e):U2t.is(e)?n.command=e:n.edit=e,i&&void 0!==r&&(n.kind=r),n}function _t(t){return t&&ye.string(t.title)&&(void 0===t.diagnostics||ye.typedArray(t.diagnostics,G2t.is))&&(void 0===t.kind||ye.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||U2t.is(t.command))&&(void 0===t.isPreferred||ye.boolean(t.isPreferred))&&(void 0===t.edit||Z2t.is(t.edit))}function At(t,e){return t={range:t},ye.defined(e)&&(t.data=e),t}function Lt(t){return ye.defined(t)&&L2t.is(t.range)&&(ye.undefined(t.command)||U2t.is(t.command))}function Nt(t,e){return{tabSize:t,insertSpaces:e}}function It(t){return ye.defined(t)&&ye.uinteger(t.tabSize)&&ye.boolean(t.insertSpaces)}function Rt(t,e,r){return{range:t,target:e,data:r}}function Mt(t){return ye.defined(t)&&L2t.is(t.range)&&(ye.undefined(t.target)||ye.string(t.target))}function Dt(t,e){return{range:t,parent:e}}function Ot(t){return ye.objectLiteral(t)&&L2t.is(t.range)&&(void 0===t.parent||i.is(t.parent))}function Pt(t){return ye.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}function Bt(t,e){return{range:t,text:e}}function $t(t){return null!=t&&L2t.is(t.range)&&ye.string(t.text)}function Ft(t,e,r){return{range:t,variableName:e,caseSensitiveLookup:r}}function zt(t){return null!=t&&L2t.is(t.range)&&ye.boolean(t.caseSensitiveLookup)&&(ye.string(t.variableName)||void 0===t.variableName)}function Gt(t,e){return{range:t,expression:e}}function Ut(t){return null!=t&&L2t.is(t.range)&&(ye.string(t.expression)||void 0===t.expression)}function qt(t,e){return{frameId:t,stoppedLocation:e}}function jt(t){return ye.defined(t)&&L2t.is(t.stoppedLocation)}function Wt(t){return 1===t||2===t}function Yt(t){return{value:t}}function Ht(t){return ye.objectLiteral(t)&&(void 0===t.tooltip||ye.string(t.tooltip)||nvt.is(t.tooltip))&&(void 0===t.location||N2t.is(t.location))&&(void 0===t.command||U2t.is(t.command))}function Vt(t,e,r){return t={position:t,label:e},void 0!==r&&(t.kind=r),t}function Xt(t){return ye.objectLiteral(t)&&A2t.is(t.position)&&(ye.string(t.label)||ye.typedArray(t.label,Bvt.is))&&(void 0===t.kind||Pvt.is(t.kind))&&void 0===t.textEdits||ye.typedArray(t.textEdits,q2t.is)&&(void 0===t.tooltip||ye.string(t.tooltip)||nvt.is(t.tooltip))&&(void 0===t.paddingLeft||ye.boolean(t.paddingLeft))&&(void 0===t.paddingRight||ye.boolean(t.paddingRight))}function Kt(t){return{kind:"snippet",value:t}}function Zt(t,e,r,n){return{insertText:t,filterText:e,range:r,command:n}}function Qt(t){return{items:t}}function Jt(t,e){return{range:t,text:e}}function te(t,e){return{triggerKind:t,selectedCompletionInfo:e}}function ee(t){return ye.objectLiteral(t)&&C2t.is(t.uri)&&ye.string(t.name)}function re(t,e,r,n){return new Hvt(t,e,r,n)}function ne(t){return!!(ye.defined(t)&&ye.string(t.uri)&&(ye.undefined(t.languageId)||ye.string(t.languageId))&&ye.uinteger(t.lineCount)&&ye.func(t.getText)&&ye.func(t.positionAt)&&ye.func(t.offsetAt))}function ie(e,t){let r=e.getText(),n=D(t,(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),i=r.length;for(let t=n.length-1;0<=t;t--){var a=n[t],s=e.offsetAt(a.range.start),o=e.offsetAt(a.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),i=s}return r}function D(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);D(s,i),D(o,i);let t=0,e=0,r=0;for(;t<s.length&&e<o.length;)i(s[t],o[e])<=0?n[r++]=s[t++]:n[r++]=o[e++];for(;t<s.length;)n[r++]=s[t++];for(;e<o.length;)n[r++]=o[e++]}return n}O=E2t=E2t||{},me(t,"is"),O.is=t,O=C2t=C2t||{},me(a,"is"),O.is=a,(e=S2t=S2t||{}).MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,me(s,"is"),e.is=s,(r=_2t=_2t||{}).MIN_VALUE=0,r.MAX_VALUE=2147483647,me(o,"is"),r.is=o,O=A2t=A2t||{},me(l,"create"),O.create=l,me(c,"is"),O.is=c,O=L2t=L2t||{},me(h,"create"),O.create=h,me(u,"is"),O.is=u,O=N2t=N2t||{},me(d,"create"),O.create=d,me(p,"is"),O.is=p,O=I2t=I2t||{},me(g,"create"),O.create=g,me(f,"is"),O.is=f,O=R2t=R2t||{},me(m,"create"),O.create=m,me(y,"is"),O.is=y,O=M2t=M2t||{},me(v,"create"),O.create=v,me(x,"is"),O.is=x,O=D2t=D2t||{},me(b,"create"),O.create=b,me(w,"is"),O.is=w,(O=O2t=O2t||{}).Comment="comment",O.Imports="imports",O.Region="region",O=P2t=P2t||{},me(k,"create"),O.create=k,me(T,"is"),O.is=T,O=B2t=B2t||{},me(E,"create"),O.create=E,me(C,"is"),O.is=C,(O=$2t=$2t||{}).Error=1,O.Warning=2,O.Information=3,O.Hint=4,(O=F2t=F2t||{}).Unnecessary=1,O.Deprecated=2,O=z2t=z2t||{},me(S,"is"),O.is=S,O=G2t=G2t||{},me(_,"create"),O.create=_,me(A,"is"),O.is=A,O=U2t=U2t||{},me(L,"create"),O.create=L,me(N,"is"),O.is=N,O=q2t=q2t||{},me(I,"replace"),O.replace=I,me(R,"insert"),O.insert=R,me(M,"del"),O.del=M,me(P,"is"),O.is=P,O=j2t=j2t||{},me(B,"create"),O.create=B,me($,"is"),O.is=$,O=W2t=W2t||{},me(F,"is"),O.is=F,O=Y2t=Y2t||{},me(z,"replace"),O.replace=z,me(G,"insert"),O.insert=G,me(U,"del"),O.del=U,me(q,"is"),O.is=q,O=H2t=H2t||{},me(j,"create"),O.create=j,me(W,"is"),O.is=W,O=V2t=V2t||{},me(Y,"create"),O.create=Y,me(H,"is"),O.is=H,O=X2t=X2t||{},me(V,"create"),O.create=V,me(X,"is"),O.is=X,O=K2t=K2t||{},me(K,"create"),O.create=K,me(Z,"is"),O.is=Z,O=Z2t=Z2t||{},me(Q,"is"),O.is=Q,O=Q2t=Q2t||{},me(J,"create"),O.create=J,me(tt,"is"),O.is=tt,O=J2t=J2t||{},me(et,"create"),O.create=et,me(rt,"is"),O.is=rt,O=tvt=tvt||{},me(nt,"create"),O.create=nt,me(it,"is"),O.is=it,O=evt=evt||{},me(at,"create"),O.create=at,me(st,"is"),O.is=st,(n=rvt=rvt||{}).PlainText="plaintext",n.Markdown="markdown",me(ot,"is"),n.is=ot,O=nvt=nvt||{},me(lt,"is"),O.is=lt,(O=ivt=ivt||{}).Text=1,O.Method=2,O.Function=3,O.Constructor=4,O.Field=5,O.Variable=6,O.Class=7,O.Interface=8,O.Module=9,O.Property=10,O.Unit=11,O.Value=12,O.Enum=13,O.Keyword=14,O.Snippet=15,O.Color=16,O.File=17,O.Reference=18,O.Folder=19,O.EnumMember=20,O.Constant=21,O.Struct=22,O.Event=23,O.Operator=24,O.TypeParameter=25,(O=avt=avt||{}).PlainText=1,O.Snippet=2,O=svt=svt||{},me(ct,"create"),O.create=ct,me(ht,"is"),O.is=ht,(O=ovt=ovt||{}).asIs=1,O.adjustIndentation=2,O=lvt=lvt||{},me(ut,"is"),O.is=ut,O=cvt=cvt||{},me(dt,"create"),O.create=dt,O=hvt=hvt||{},me(pt,"create"),O.create=pt,O=uvt=uvt||{},me(gt,"fromPlainText"),O.fromPlainText=gt,me(ft,"is"),O.is=ft,O=dvt=dvt||{},me(mt,"is"),O.is=mt,O=pvt=pvt||{},me(yt,"create"),O.create=yt,O=gvt=gvt||{},me(vt,"create"),O.create=vt,(O=fvt=fvt||{}).Text=1,O.Read=2,O.Write=3,O=mvt=mvt||{},me(xt,"create"),O.create=xt,(O=yvt=yvt||{}).File=1,O.Module=2,O.Namespace=3,O.Package=4,O.Class=5,O.Method=6,O.Property=7,O.Field=8,O.Constructor=9,O.Enum=10,O.Interface=11,O.Function=12,O.Variable=13,O.Constant=14,O.String=15,O.Number=16,O.Boolean=17,O.Array=18,O.Object=19,O.Key=20,O.Null=21,O.EnumMember=22,O.Struct=23,O.Event=24,O.Operator=25,O.TypeParameter=26,O=vvt=vvt||{},me(bt,"create"),O.create=bt,O=xvt=xvt||{},me(wt,"create"),O.create=wt,O=bvt=bvt||{},me(kt,"create"),O.create=kt,me(Tt,"is"),O.is=Tt,(O=wvt=wvt||{}).Empty="",O.QuickFix="quickfix",O.Refactor="refactor",O.RefactorExtract="refactor.extract",O.RefactorInline="refactor.inline",O.RefactorRewrite="refactor.rewrite",O.Source="source",O.SourceOrganizeImports="source.organizeImports",O.SourceFixAll="source.fixAll",(O=kvt=kvt||{}).Invoked=1,O.Automatic=2,O=Tvt=Tvt||{},me(Et,"create"),O.create=Et,me(Ct,"is"),O.is=Ct,O=Evt=Evt||{},me(St,"create"),O.create=St,me(_t,"is"),O.is=_t,O=Cvt=Cvt||{},me(At,"create"),O.create=At,me(Lt,"is"),O.is=Lt,O=Svt=Svt||{},me(Nt,"create"),O.create=Nt,me(It,"is"),O.is=It,O=_vt=_vt||{},me(Rt,"create"),O.create=Rt,me(Mt,"is"),O.is=Mt,i=Avt=Avt||{},me(Dt,"create"),i.create=Dt,me(Ot,"is"),i.is=Ot,(O=Lvt=Lvt||{}).namespace="namespace",O.type="type",O.class="class",O.enum="enum",O.interface="interface",O.struct="struct",O.typeParameter="typeParameter",O.parameter="parameter",O.variable="variable",O.property="property",O.enumMember="enumMember",O.event="event",O.function="function",O.method="method",O.macro="macro",O.keyword="keyword",O.modifier="modifier",O.comment="comment",O.string="string",O.number="number",O.regexp="regexp",O.operator="operator",O.decorator="decorator",(O=Nvt=Nvt||{}).declaration="declaration",O.definition="definition",O.readonly="readonly",O.static="static",O.deprecated="deprecated",O.abstract="abstract",O.async="async",O.modification="modification",O.documentation="documentation",O.defaultLibrary="defaultLibrary",O=Ivt=Ivt||{},me(Pt,"is"),O.is=Pt,O=Rvt=Rvt||{},me(Bt,"create"),O.create=Bt,me($t,"is"),O.is=$t,O=Mvt=Mvt||{},me(Ft,"create"),O.create=Ft,me(zt,"is"),O.is=zt,O=Dvt=Dvt||{},me(Gt,"create"),O.create=Gt,me(Ut,"is"),O.is=Ut,O=Ovt=Ovt||{},me(qt,"create"),O.create=qt,me(jt,"is"),O.is=jt,(O=Pvt=Pvt||{}).Type=1,O.Parameter=2,me(Wt,"is"),O.is=Wt,O=Bvt=Bvt||{},me(Yt,"create"),O.create=Yt,me(Ht,"is"),O.is=Ht,O=$vt=$vt||{},me(Vt,"create"),O.create=Vt,me(Xt,"is"),O.is=Xt,O=Fvt=Fvt||{},me(Kt,"createSnippet"),O.createSnippet=Kt,O=zvt=zvt||{},me(Zt,"create"),O.create=Zt,O=Gvt=Gvt||{},me(Qt,"create"),O.create=Qt,(O=Uvt=Uvt||{}).Invoked=0,O.Automatic=1,O=qvt=qvt||{},me(Jt,"create"),O.create=Jt,O=jvt=jvt||{},me(te,"create"),O.create=te,O=Wvt=Wvt||{},me(ee,"is"),O.is=ee,O=Yvt=Yvt||{},me(re,"create"),O.create=re,me(ne,"is"),O.is=ne,me(ie,"applyEdits"),O.applyEdits=ie,me(D,"mergeSort"),Hvt=class{static{me(this,"FullTextDocument")}constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){var e;return t?(e=this.offsetAt(t.start),t=this.offsetAt(t.end),this._content.substring(e,t)):this._content}update(t,e){this._content=t.text,this._version=e,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],r=this._content,n=!0;for(let t=0;t<r.length;t++){n&&(e.push(t),n=!1);var i=r.charAt(t);n="\r"===i||i===` +`,"\r"===i&&t+1<r.length&&r.charAt(t+1)===` +`&&t++}n&&0<r.length&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),r=0,n=e.length;if(0===n)return A2t.create(0,t);for(;r<n;){var i=Math.floor((r+n)/2);e[i]>t?n=i:r=i+1}var a=r-1;return A2t.create(a,t-e[a])}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],r=t.line+1<r.length?r[t.line+1]:this._content.length,Math.max(Math.min(e+t.character,r),e))}get lineCount(){return this.getLineOffsets().length}};{var O=ye=ye||{};let n=Object.prototype.toString;function ae(t){return typeof t<"u"}function se(t){return"u"<typeof t}function oe(t){return!0===t||!1===t}function le(t){return"[object String]"===n.call(t)}function ce(t){return"[object Number]"===n.call(t)}function he(t,e,r){return"[object Number]"===n.call(t)&&e<=t&&t<=r}function ue(t){return"[object Number]"===n.call(t)&&-2147483648<=t&&t<=2147483647}function de(t){return"[object Number]"===n.call(t)&&0<=t&&t<=2147483647}function pe(t){return"[object Function]"===n.call(t)}function ge(t){return null!==t&&"object"==typeof t}function fe(t,e){return Array.isArray(t)&&t.every(e)}me(ae,"defined"),O.defined=ae,me(se,"undefined"),O.undefined=se,me(oe,"boolean"),O.boolean=oe,me(le,"string"),O.string=le,me(ce,"number"),O.number=ce,me(he,"numberRange"),O.numberRange=he,me(ue,"integer"),O.integer=ue,me(de,"uinteger"),O.uinteger=de,me(pe,"func"),O.func=pe,me(ge,"objectLiteral"),O.objectLiteral=ge,me(fe,"typedArray"),O.typedArray=fe}}),nxt=b(()=>{rxt(),bht(),Vvt=class{static{me(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){var t;return null!=(t=this.nodeStack[this.nodeStack.length-1])?t:this.rootNode}buildRootNode(t){return this.rootNode=new Jvt(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new Zvt;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new Kvt(t.startOffset,t.image.length,rht(t),t.tokenType,!e)).grammarSource=e,t.root=this.rootNode,this.current.content.push(t),t}removeNode(t){var e=t.container;e&&0<=(t=e.content.indexOf(t))&&e.content.splice(t,1)}addHiddenNodes(t){var e,r=[];for(e of t){var n=new Kvt(e.startOffset,e.image.length,rht(e),e.tokenType,!0);n.root=this.rootNode,r.push(n)}let i=this.current,a=!1;if(0<i.content.length)i.content.push(...r);else{for(;i.container;){var s=i.container.content.indexOf(i);if(0<s){i.container.content.splice(s,0,...r),a=!0;break}i=i.container}a||this.rootNode.content.unshift(...r)}}construct(t){var e=this.current;"string"==typeof t.$type&&(this.current.astNode=t),t.$cstNode=e,0===(t=this.nodeStack.pop())?.content.length&&this.removeNode(t)}},Xvt=class{static{me(this,"AbstractCstNode")}get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var t="string"==typeof(null==(t=this._astNode)?void 0:t.$type)?this._astNode:null==(t=this.container)?void 0:t.astNode;if(t)return t;throw new Error("This node has no associated AST element")}set astNode(t){this._astNode=t}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},Kvt=class extends Xvt{static{me(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,e,r,n,i=!1){super(),this._hidden=i,this._offset=t,this._tokenType=n,this._length=e,this._range=r}},Zvt=class extends Xvt{static{me(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new Qvt(this)}get children(){return this.content}get offset(){var t;return null!=(t=null==(t=this.firstNonHiddenNode)?void 0:t.offset)?t:0}get length(){return this.end-this.offset}get end(){var t;return null!=(t=null==(t=this.lastNonHiddenNode)?void 0:t.end)?t:0}get range(){var t=this.firstNonHiddenNode,e=this.lastNonHiddenNode;return t&&e?(void 0===this._rangeCache&&(t=t.range,e=e.range,this._rangeCache={start:t.start,end:e.end.line<t.start.line?t.start:e.end}),this._rangeCache):{start:A2t.create(0,0),end:A2t.create(0,0)}}get firstNonHiddenNode(){for(var t of this.content)if(!t.hidden)return t;return this.content[0]}get lastNonHiddenNode(){for(let t=this.content.length-1;0<=t;t--){var e=this.content[t];if(!e.hidden)return e}return this.content[this.content.length-1]}},Qvt=class e extends Array{static{me(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,e,...r){return this.addParents(r),super.splice(t,e,...r)}addParents(t){for(var e of t)e.container=this.parent}},Jvt=class extends Zvt{static{me(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(t){super(),this._text="",this._text=t??""}}});function ixt(t){return t.$type===axt}var axt,sxt,oxt,lxt,cxt,hxt,uxt,dxt,pxt,gxt=b(()=>{iyt(),ext(),gdt(),Xpt(),Ndt(),nxt(),axt=Symbol("Datatype"),me(ixt,"isDataTypeNode"),sxt=me(t=>t.endsWith("")?t:t+"","withRuleSuffix"),oxt=class{static{me(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;var e=this.lexer.definition,r="production"===t.LanguageMetaData.mode;this.wrapper=new pxt(e,Object.assign(Object.assign({},t.parser.ParserConfig),{skipValidations:r,errorMessageProvider:t.parser.ParserErrorMessageProvider}))}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},lxt=class extends oxt{static{me(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new Vvt,this.stack=[],this.assignmentMap=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){var r=this.computeRuleType(t),r=this.wrapper.DEFINE_RULE(sxt(t.name),this.startImplementation(r,e).bind(this));return this.allRules.set(t.name,r),t.entry&&(this.mainRule=r),r}computeRuleType(t){if(!t.fragment)return Npt(t)?axt:Dpt(t)??t.name}parse(t,e={}){this.nodeBuilder.buildRootNode(t);var t=this.lexerResult=this.lexer.tokenize(t),r=(this.wrapper.input=t.tokens,e.rule?this.allRules.get(e.rule):this.mainRule);if(r)return r=r.call(this.wrapper,{}),this.nodeBuilder.addHiddenNodes(t.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:r,lexerErrors:t.errors,lexerReport:t.report,parserErrors:this.wrapper.errors};throw new Error(e.rule?`No rule found with name '${e.rule}'`:"No main rule available.")}startImplementation(i,a){return t=>{var e,r=!this.isRecording()&&void 0!==i;r&&(this.stack.push(e={$type:i}),i===axt)&&(e.value="");let n;try{n=a(t)}catch{n=void 0}return n=void 0===n&&r?this.construct():n}}extractHiddenTokens(t){var e=this.lexerResult.hidden;if(!e.length)return[];var r=t.startOffset;for(let t=0;t<e.length;t++)if(e[t].startOffset>r)return e.splice(0,t);return e.splice(0,e.length)}consume(e,r,n){if(e=this.wrapper.wrapConsume(e,r),!this.isRecording()&&this.isValidToken(e)){var r=this.extractHiddenTokens(e),r=(this.nodeBuilder.addHiddenNodes(r),this.nodeBuilder.buildLeafNode(e,n)),{assignment:t,isCrossRef:i}=this.getAssignment(n),a=this.current;if(t){var s=cut(n)?e.image:this.converter.convert(e.image,r);this.assign(t.operator,t.feature,s,r,i)}else if(ixt(a)){let t=e.image;cut(n)||(t=this.converter.convert(t,r).toString()),a.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,r,n,i){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(n)),r=this.wrapper.wrapSubrule(t,e,i),!this.isRecording()&&a&&0<a.length&&this.performSubruleAssignment(r,n,a)}performSubruleAssignment(t,e,r){var{assignment:e,isCrossRef:n}=this.getAssignment(e);e?this.assign(e.operator,e.feature,t,r,n):ixt(e=this.current)?e.value+=t.toString():"object"==typeof t&&t&&(r=this.assignWithoutOverride(t,e),this.stack.pop(),this.stack.push(r))}action(e,r){if(!this.isRecording()){let t=this.current;r.feature&&r.operator?(t=this.construct(),this.nodeBuilder.removeNode(t.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(t.$cstNode),this.stack.push({$type:e}),this.assign(r.operator,r.feature,t,t.$cstNode,!1)):t.$type=e}}construct(){var t;if(!this.isRecording())return mdt(t=this.current),this.nodeBuilder.construct(t),this.stack.pop(),ixt(t)?this.converter.convert(t.value,t.$cstNode):(_dt(this.astReflection,t),t)}getAssignment(t){var e;return this.assignmentMap.has(t)||(e=ydt(t,iut),this.assignmentMap.set(t,{assignment:e,isCrossRef:!!e&&sut(e.terminal)})),this.assignmentMap.get(t)}assign(t,e,r,n,i){var a=this.current,s=i&&"string"==typeof r?this.linker.buildReference(a,e,n,r):r;switch(t){case"=":a[e]=s;break;case"?=":a[e]=!0;break;case"+=":Array.isArray(a[e])||(a[e]=[]),a[e].push(s)}}assignWithoutOverride(t,e){for(var[r,n]of Object.entries(e)){var i=t[r];void 0===i?t[r]=n:Array.isArray(i)&&Array.isArray(n)&&(n.push(...i),t[r]=n)}return(e=t.$cstNode)&&(e.astNode=void 0,t.$cstNode=void 0),t}get definitionErrors(){return this.wrapper.definitionErrors}},cxt=class{static{me(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(t){return L1t.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return L1t.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return L1t.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return L1t.buildEarlyExitMessage(t)}},hxt=class extends cxt{static{me(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${t.LABEL?"`"+t.LABEL+"`":t.name.endsWith(":KW")?`keyword '${t.name.substring(0,t.name.length-3)}'`:`token of type '${t.name}'`} but found \`${e.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:t}){return`Expecting end of file but found \`${t.image}\`.`}},uxt=class extends oxt{static{me(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(t){return this.resetState(),t=this.lexer.tokenize(t,{mode:"partial"}),this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(t,e){return e=this.wrapper.DEFINE_RULE(sxt(t.name),this.startImplementation(e).bind(this)),this.allRules.set(t.name,e),t.entry&&(this.mainRule=e),e}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(r){return t=>{var e=this.keepStackSize();try{r(t)}finally{this.resetStackSize(e)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var t=this.elementStack.length;return this.stackSize=t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,r){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,r,n,i){this.before(n),this.wrapper.wrapSubrule(t,e,i),this.after(n)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){this.isRecording()||0<=(t=this.elementStack.lastIndexOf(t))&&this.elementStack.splice(t)}get currIdx(){return this.wrapper.currIdx}},dxt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new hxt},pxt=class extends Qmt{static{me(this,"ChevrotainWrapper")}constructor(t,e){var r=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},dxt),{lookaheadStrategy:r?new Kft({maxLookahead:e.maxLookahead}):new T2t({logging:e.skipValidations?()=>{}:void 0})}),e))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e){return this.RULE(t,e)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e)}wrapSubrule(t,e,r){return this.subrule(t,e,{ARGS:[r]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}}});function fxt(t,e,r){return mxt({parser:e,tokens:r,ruleNames:new Map},t),e}function mxt(t,e){let r=ppt(e,!1),n=Wct(e.rules).filter(Hht).filter(t=>r.has(t));for(var i of n){var a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(i,yxt(a,i.definition))}}function yxt(e,r,t=!1){let n;if(cut(r))n=_xt(e,r);else if(rut(r))n=vxt(e,r);else if(iut(r))n=yxt(e,r.terminal);else if(sut(r))n=Sxt(e,r);else if(dut(r))n=xxt(e,r);else if(nut(r))n=kxt(e,r);else if(mut(r))n=Txt(e,r);else if(lut(r))n=Ext(e,r);else{if(!out(r))throw new kht(r.$cstNode,"Unexpected element type: "+r.$type);{let t=e.consume++;n=me(()=>e.parser.consume(t,A1t,r),"method")}}return Axt(e,t?void 0:Cxt(r),n,r.cardinality)}function vxt(t,e){let r=Opt(e);return()=>t.parser.action(r,e)}function xxt(i,a){let s=a.rule.ref;if(Hht(s)){let e=i.subrule++,r=s.fragment,n=0<a.arguments.length?bxt(s,a.arguments):()=>({});return t=>i.parser.subrule(e,Lxt(i,s),r,a,n(t))}if(Qht(s)){let t=i.consume++,e=Ixt(i,s.name);return()=>i.parser.consume(t,e,a)}if(!s)throw new kht(a.$cstNode,"Undefined rule: "+a.rule.$refText);wht(s)}function bxt(a,t){let s=t.map(t=>wxt(t.value));return e=>{var r={};for(let t=0;t<s.length;t++){var n=a.parameters[t],i=s[t];r[n.name]=i(e)}return r}}function wxt(n){if(Bht(n)){let e=wxt(n.left),r=wxt(n.right);return t=>e(t)||r(t)}if(Pht(n)){let e=wxt(n.left),r=wxt(n.right);return t=>e(t)&&r(t)}if(qht(n)){let e=wxt(n.value);return t=>!e(t)}if(Yht(n)){let e=n.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(Oht(n)){let t=!!n.true;return()=>t}wht()}function kxt(r,n){if(1===n.elements.length)return yxt(r,n.elements[0]);{let t=[];for(var i of n.elements){var a={ALT:yxt(r,i,!0)};(i=Cxt(i))&&(a.GATE=wxt(i)),t.push(a)}let e=r.or++;return n=>r.parser.alternatives(e,t.map(t=>{let e={ALT:me(()=>t.ALT(n),"ALT")},r=t.GATE;return r&&(e.GATE=()=>r(n)),e}))}}function Txt(s,t){if(1===t.elements.length)return yxt(s,t.elements[0]);let e=[];for(var r of t.elements){var n={ALT:yxt(s,r,!0)};(r=Cxt(r))&&(n.GATE=wxt(r)),e.push(n)}let o=s.or++,l=me((t,e)=>`uGroup_${t}_`+e.getRuleStack().join("-"),"idFunc"),i=me(a=>s.parser.alternatives(o,e.map((e,r)=>{let t={ALT:me(()=>!0,"ALT")},n=s.parser,i=(t.ALT=()=>{var t;e.ALT(a),n.isRecording()||(t=l(o,n),n.unorderedGroups.get(t)||n.unorderedGroups.set(t,[]),"u"<typeof(t=n.unorderedGroups.get(t))?.[r]&&(t[r]=!0))},e.GATE);return i?t.GATE=()=>i(a):t.GATE=()=>!n.unorderedGroups.get(l(o,n))?.[r],t})),"alternatives"),a=Axt(s,Cxt(t),i,"*");return t=>{a(t),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function Ext(e,t){let r=t.elements.map(t=>yxt(e,t));return e=>r.forEach(t=>t(e))}function Cxt(t){if(lut(t))return t.guardCondition}function Sxt(n,i,a=i.terminal){if(a){if(dut(a)&&Hht(a.rule.ref)){let e=a.rule.ref,r=n.subrule++;return t=>n.parser.subrule(r,Lxt(n,e),!1,i,t)}if(dut(a)&&Qht(a.rule.ref)){let t=n.consume++,e=Ixt(n,a.rule.ref.name);return()=>n.parser.consume(t,e,i)}if(cut(a)){let t=n.consume++,e=Ixt(n,a.value);return()=>n.parser.consume(t,e,i)}throw new Error("Could not build cross reference parser")}if(!i.type.ref)throw new Error("Could not resolve reference to type: "+i.type.$refText);if(a=Ept(i.type.ref)?.terminal)return Sxt(n,i,a);throw new Error("Could not find name assignment for type: "+Opt(i.type.ref))}function _xt(t,e){let r=t.consume++,n=t.tokens[e.value];if(n)return()=>t.parser.consume(r,n,e);throw new Error("Could not find token for keyword: "+e.value)}function Axt(n,t,i,e){let a=t&&wxt(t);if(!e){if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:me(()=>i(t),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Ymt(),GATE:me(()=>!a(t),"GATE")}])}return i}if("*"===e){let e=n.many++;return t=>n.parser.many(e,{DEF:me(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}if("+"===e){let r=n.many++;if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:me(()=>n.parser.atLeastOne(r,{DEF:me(()=>i(t),"DEF")}),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Ymt(),GATE:me(()=>!a(t),"GATE")}])}return t=>n.parser.atLeastOne(r,{DEF:me(()=>i(t),"DEF")})}if("?"===e){let e=n.optional++;return t=>n.parser.optional(e,{DEF:me(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}wht()}function Lxt(t,e){if(e=Nxt(t,e),t=t.parser.getRule(e))return t;throw new Error(`Rule "${e}" not found."`)}function Nxt(n,i){if(Hht(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let t=i,e=t.$container,r=i.$type;for(;!Hht(e);)(lut(e)||nut(e)||mut(e))&&(r=e.elements.indexOf(t).toString()+":"+r),e=(t=e).$container;return r=e.name+":"+r,n.ruleNames.set(i,r),r}}function Ixt(t,e){if(t=t.tokens[e])return t;throw new Error(`Token "${e}" not found."`)}var Rxt=b(()=>{iyt(),gdt(),Tht(),Zct(),Xpt(),me(fxt,"createParser"),me(mxt,"buildRules"),me(yxt,"buildElement"),me(vxt,"buildAction"),me(xxt,"buildRuleCall"),me(bxt,"buildRuleCallPredicate"),me(wxt,"buildPredicate"),me(kxt,"buildAlternatives"),me(Txt,"buildUnorderedGroup"),me(Ext,"buildGroup"),me(Cxt,"getGuardCondition"),me(Sxt,"buildCrossReference"),me(_xt,"buildKeyword"),me(Axt,"wrap"),me(Lxt,"getRule"),me(Nxt,"getRuleName"),me(Ixt,"getToken")});function Mxt(t){var e=t.Grammar,r=t.parser.Lexer;return fxt(e,t=new uxt(t),r.definition),t.finalize(),t}var Dxt=b(()=>{gxt(),Rxt(),me(Mxt,"createCompletionParser")});function Oxt(t){return(t=Pxt(t)).finalize(),t}function Pxt(t){var e=t.Grammar,r=t.parser.Lexer;return fxt(e,new lxt(t),r.definition)}var Bxt,$xt,Fxt,zxt=b(()=>{gxt(),Rxt(),me(Oxt,"createLangiumParser"),me(Pxt,"prepareLangiumParser")}),Gxt=b(()=>{iyt(),gdt(),Ndt(),Xpt(),cpt(),Zct(),Bxt=class{static{me(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(t,e){let r=Wct(ppt(t,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,e);return n.forEach(t=>{var e=t.PATTERN;"object"==typeof e&&e&&"test"in e&&Jdt(e)?i.unshift(t):i.push(t)}),i}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(Qht).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){var e=Fpt(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,n={name:t.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),t.hidden&&(n.GROUP=Jdt(e)?c1t.SKIPPED:"hidden"),n}requiresCustomPattern(t){return!!(t.flags.includes("u")||t.flags.includes("s")||t.source.includes("?<=")||t.source.includes("?<!"))}regexPatternFunction(t){let r=new RegExp(t,t.flags+"y");return(t,e)=>(r.lastIndex=e,r.exec(t))}buildKeywordTokens(t,e,r){return t.filter(Hht).flatMap(t=>kdt(t).filter(cut)).distinct(t=>t.value).toArray().sort((t,e)=>e.value.length-t.value.length).map(t=>this.buildKeywordToken(t,e,!!r?.caseInsensitive))}buildKeywordToken(t,e,r){return r=this.buildKeywordPattern(t,r),t={name:t.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(t,e)},"function"==typeof r&&(t.LINE_BREAKS=!0),t}buildKeywordPattern(t,e){return e?new RegExp(ept(t.value)):t.value}findLongerAlt(n,t){return t.reduce((t,e)=>{var r=e?.PATTERN;return r?.source&&rpt("^"+r.source+"$",n.value)&&t.push(e),t},[])}}}),Uxt=b(()=>{function t(e){let r="";for(let t=1;t<e.length-1;t++){var n,i=e.charAt(t);"\\"===i?(n=e.charAt(++t),r+=a(n)):r+=i}return r}function a(t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return t}}function e(t){return"^"===t.charAt(0)?t.substring(1):t}function r(t){return parseInt(t)}function n(t){return BigInt(t)}function i(t){return new Date(t)}function s(t){return Number(t)}function o(t){return"true"===t.toLowerCase()}var l;gdt(),Xpt(),$xt=class{static{me(this,"DefaultValueConverter")}convert(t,e){var r=e.grammarSource;if(dut(r=sut(r)?fpt(r):r)){if(r=r.rule.ref)return this.runConverter(r,t,e);throw new Error("This cst node was not parsed by a rule.")}return t}runConverter(t,e,r){switch(t.name.toUpperCase()){case"INT":return Fxt.convertInt(e);case"STRING":return Fxt.convertString(e);case"ID":return Fxt.convertID(e)}switch(null==(t=$pt(t))?void 0:t.toLowerCase()){case"number":return Fxt.convertNumber(e);case"boolean":return Fxt.convertBoolean(e);case"bigint":return Fxt.convertBigint(e);case"date":return Fxt.convertDate(e);default:return e}}},l=Fxt=Fxt||{},me(t,"convertString"),l.convertString=t,me(a,"convertEscapeCharacter"),me(e,"convertID"),l.convertID=e,me(r,"convertInt"),l.convertInt=r,me(n,"convertBigint"),l.convertBigint=n,me(i,"convertDate"),l.convertDate=i,me(s,"convertNumber"),l.convertNumber=s,me(o,"convertBoolean"),l.convertBoolean=o}),qxt=WBt(t=>{var e,r;function n(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}function i(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}Object.defineProperty(t,"__esModule",{value:!0}),me(n,"RAL"),r=n,me(i,"install"),r.install=i,t.default=n}),jxt=WBt(t=>{function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function n(t){return"number"==typeof t||t instanceof Number}function i(t){return t instanceof Error}function a(t){return"function"==typeof t}function s(t){return Array.isArray(t)}function o(t){return s(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,me(e,"boolean"),t.boolean=e,me(r,"string"),t.string=r,me(n,"number"),t.number=n,me(i,"error"),t.error=i,me(a,"func"),t.func=a,me(s,"array"),t.array=s,me(o,"stringArray"),t.stringArray=o}),Wxt=WBt(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var s=qxt();{var r=e.Event={};let t={dispose(){}};r.None=function(){return t}}var i=class{static{me(this,"CallbackList")}add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:me(()=>this.remove(t,e),"dispose")})}remove(n,i=null){if(this._callbacks){let r=!1;for(let t=0,e=this._callbacks.length;t<e;t++)if(this._callbacks[t]===n){if(this._contexts[t]===i)return this._callbacks.splice(t,1),void this._contexts.splice(t,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...r){if(!this._callbacks)return[];var n=[],i=this._callbacks.slice(0),a=this._contexts.slice(0);for(let t=0,e=i.length;t<e;t++)try{n.push(i[t].apply(a[t],r))}catch(t){(0,s.default)().console.error(t)}return n}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},r=class a{static{me(this,"Emitter")}constructor(t){this._options=t}get event(){return this._event||(this._event=(t,e,r)=>{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);let n={dispose:me(()=>{this._callbacks&&(this._callbacks.remove(t,e),n.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(n),n}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(e.Emitter=r)._noop=function(){}}),Yxt=WBt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r,n=qxt(),i=jxt(),a=Wxt();function s(t){return t&&(t===r.None||t===r.Cancelled||i.boolean(t.isCancellationRequested)&&!!t.onCancellationRequested)}(r=e||(t.CancellationToken=e={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),me(s,"is"),r.is=s;var o=Object.freeze(function(t,e){let r=(0,n.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),l=class{static{me(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},c=class{static{me(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=e.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=e.None}};t.CancellationTokenSource=c}),Hxt={},Vxt=b(()=>{U(Hxt,q(Yxt(),1))});function Xxt(){return new Promise(t=>{"u"<typeof setImmediate?setTimeout(t,0):setImmediate(t)})}function Kxt(){return tbt=performance.now(),new Hxt.CancellationTokenSource}function Zxt(t){ebt=t}function Qxt(t){return t===rbt}async function Jxt(t){if(t!==Hxt.CancellationToken.None){var e=performance.now();if(ebt<=e-tbt&&(tbt=e,await Xxt(),tbt=performance.now()),t.isCancellationRequested)throw rbt}}var tbt,ebt,rbt,nbt,ibt=b(()=>{Vxt(),me(Xxt,"delayNextTick"),tbt=0,ebt=10,me(Kxt,"startCancelableOperation"),me(Zxt,"setInterruptionPeriod"),rbt=Symbol("OperationCancelled"),me(Qxt,"isOperationCancelled"),me(Jxt,"interruptAndCheck"),nbt=class{static{me(this,"Deferred")}constructor(){this.promise=new Promise((e,r)=>{this.resolve=t=>(e(t),this),this.reject=t=>(r(t),this)})}}});function abt(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);abt(s,i),abt(o,i);let t=0,e=0,r=0;for(;t<s.length&&e<o.length;)i(s[t],o[e])<=0?n[r++]=s[t++]:n[r++]=o[e++];for(;t<s.length;)n[r++]=s[t++];for(;e<o.length;)n[r++]=o[e++]}return n}function sbt(e,t,r=0){var n=t?[r]:[];for(let t=0;t<e.length;t++){var i=e.charCodeAt(t);obt(i)&&(13===i&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,n.push(r+t+1))}return n}function obt(t){return 13===t||10===t}function lbt(t){var e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function cbt(t){var e=lbt(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var hbt,ubt,dbt,pbt,gbt,fbt,mbt,ybt,vbt,xbt,bbt=b(()=>{function t(t,e,r,n){return new hbt(t,e,r,n)}function e(t,e,r){if(t instanceof hbt)return t.update(e,r),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(t,e){let r=t.getText(),n=abt(e.map(cbt),(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),i=0,a=[];for(var s of n){var o=t.offsetAt(s.range.start);if(o<i)throw new Error("Overlapping edit");o>i&&a.push(r.substring(i,o)),s.newText.length&&a.push(s.newText),i=t.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}var n;hbt=class i{static{me(this,"FullTextDocument")}constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){var e;return t?(e=this.offsetAt(t.start),t=this.offsetAt(t.end),this._content.substring(e,t)):this._content}update(t,e){for(var a of t)if(i.isIncremental(a)){var s=lbt(a.range),o=this.offsetAt(s.start),l=this.offsetAt(s.end);this._content=this._content.substring(0,o)+a.text+this._content.substring(l,this._content.length);let r=Math.max(s.start.line,0),t=Math.max(s.end.line,0),n=this._lineOffsets,i=sbt(a.text,!1,o);if(t-r===i.length)for(let t=0,e=i.length;t<e;t++)n[t+r+1]=i[t];else i.length<1e4?n.splice(r+1,t-r,...i):this._lineOffsets=n=n.slice(0,r+1).concat(i,n.slice(t+1));var c=a.text.length-(l-o);if(0!=c)for(let t=r+1+i.length,e=n.length;t<e;t++)n[t]=n[t]+c}else{if(!i.isFull(a))throw new Error("Unknown change event received");this._content=a.text,this._lineOffsets=void 0}this._version=e}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=sbt(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),r=0,n=e.length;if(0===n)return{line:0,character:t};for(;r<n;){var i=Math.floor((r+n)/2);e[i]>t?n=i:r=i+1}var a=r-1;return{line:a,character:(t=this.ensureBeforeEOL(t,e[a]))-e[a]}}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],t.character<=0?e:(r=t.line+1<r.length?r[t.line+1]:this._content.length,t=Math.min(e+t.character,r),this.ensureBeforeEOL(t,e)))}ensureBeforeEOL(t,e){for(;e<t&&obt(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(t){return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}},n=ubt=ubt||{},me(t,"create"),n.create=t,me(e,"update"),n.update=e,me(r,"applyEdits"),n.applyEdits=r,me(abt,"mergeSort"),me(sbt,"computeLineOffsets"),me(obt,"isEOL"),me(lbt,"getWellformedRange"),me(cbt,"getWellformedEdit")}),wbt=b(()=>{var r={470:t=>{function d(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function a(t,e){for(var r,n="",i=0,a=-1,s=0,o=0;o<=t.length;++o){if(o<t.length)r=t.charCodeAt(o);else{if(47===r)break;r=47}if(47===r){if(a!==o-1&&1!==s)if(a!==o-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){var l=n.lastIndexOf("/");if(l!==n.length-1){i=-1===l?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),a=o,s=0;continue}}else if(2===n.length||1===n.length){n="",a=o,s=i=0;continue}e&&(0<n.length?n+="/..":n="..",i=2)}else 0<n.length?n+="/"+t.slice(a+1,o):n=t.slice(a+1,o),i=o-a-1;a=o,s=0}else 46===r&&-1!==s?++s:s=-1}return n}me(d,"e"),me(a,"r");var p={resolve:me(function(){for(var t,e="",r=!1,n=arguments.length-1;-1<=n&&!r;n--){var i=0<=n?arguments[n]:t=void 0===t?process.cwd():t;d(i),0!==i.length&&(e=i+"/"+e,r=47===i.charCodeAt(0))}return e=a(e,!r),r?0<e.length?"/"+e:"/":0<e.length?e:"."},"resolve"),normalize:me(function(t){var e,r;return d(t),0===t.length?".":(e=47===t.charCodeAt(0),r=47===t.charCodeAt(t.length-1),0<(t=0!==(t=a(t,!e)).length||e?t:".").length&&r&&(t+="/"),e?"/"+t:t)},"normalize"),isAbsolute:me(function(t){return d(t),0<t.length&&47===t.charCodeAt(0)},"isAbsolute"),join:me(function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var r=arguments[e];d(r),0<r.length&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":p.normalize(t)},"join"),relative:me(function(t,e){if(d(t),d(e),t===e||(t=p.resolve(t))===(e=p.resolve(e)))return"";for(var r=1;r<t.length&&47===t.charCodeAt(r);++r);for(var n=t.length,i=n-r,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var s=e.length-a,o=i<s?i:s,l=-1,c=0;c<=o;++c){if(c===o){if(o<s){if(47===e.charCodeAt(a+c))return e.slice(a+c+1);if(0===c)return e.slice(a+c)}else o<i&&(47===t.charCodeAt(r+c)?l=c:0===c&&(l=0));break}var h=t.charCodeAt(r+c);if(h!==e.charCodeAt(a+c))break;47===h&&(l=c)}for(var u="",c=r+l+1;c<=n;++c)c!==n&&47!==t.charCodeAt(c)||(0===u.length?u+="..":u+="/..");return 0<u.length?u+e.slice(a+l):(47===e.charCodeAt(a+=l)&&++a,e.slice(a))},"relative"),_makeLong:me(function(t){return t},"_makeLong"),dirname:me(function(t){if(d(t),0===t.length)return".";for(var e=47===t.charCodeAt(0),r=-1,n=!0,i=t.length-1;1<=i;--i)if(47===t.charCodeAt(i)){if(!n){r=i;break}}else n=!1;return-1===r?e?"/":".":e&&1===r?"//":t.slice(0,r)},"dirname"),basename:me(function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');d(t);var r=0,n=-1,i=!0;if(void 0!==e&&0<e.length&&e.length<=t.length){if(e.length===t.length&&e===t)return"";for(var a=e.length-1,s=-1,o=t.length-1;0<=o;--o){var l=t.charCodeAt(o);if(47===l){if(!i){r=o+1;break}}else-1===s&&(i=!1,s=o+1),0<=a&&(l===e.charCodeAt(a)?-1==--a&&(n=o):(a=-1,n=s))}return r===n?n=s:-1===n&&(n=t.length),t.slice(r,n)}for(o=t.length-1;0<=o;--o)if(47===t.charCodeAt(o)){if(!i){r=o+1;break}}else-1===n&&(i=!1,n=o+1);return-1===n?"":t.slice(r,n)},"basename"),extname:me(function(t){d(t);for(var e=-1,r=0,n=-1,i=!0,a=0,s=t.length-1;0<=s;--s){var o=t.charCodeAt(s);if(47!==o)-1===n&&(i=!1,n=s+1),46===o?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){r=s+1;break}}return-1===e||-1===n||0===a||1===a&&e===n-1&&e===r+1?"":t.slice(e,n)},"extname"),format:me(function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return e=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||""),e?e===t.root?e+r:e+"/"+r:r;var e,r},"format"),parse:me(function(t){d(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0!==t.length){for(var r,n=47===t.charCodeAt(0),i=n?(e.root="/",1):0,a=-1,s=0,o=-1,l=!0,c=t.length-1,h=0;i<=c;--c)if(47!==(r=t.charCodeAt(c)))-1===o&&(l=!1,o=c+1),46===r?-1===a?a=c:1!==h&&(h=1):-1!==a&&(h=-1);else if(!l){s=c+1;break}-1===a||-1===o||0===h||1===h&&a===o-1&&a===s+1?-1!==o&&(e.base=e.name=0===s&&n?t.slice(1,o):t.slice(s,o)):(0===s&&n?(e.name=t.slice(1,a),e.base=t.slice(1,o)):(e.name=t.slice(s,a),e.base=t.slice(s,o)),e.ext=t.slice(a,o)),0<s?e.dir=t.slice(0,s-1):n&&(e.dir="/")}return e},"parse"),sep:"/",delimiter:":",win32:null,posix:null};p.posix=p,t.exports=p}},n={};function h(t){var e=n[t];return void 0===e&&(e=n[t]={exports:{}},r[t](e,e.exports,h)),e.exports}me(h,"r"),h.d=(t,e)=>{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var u,d,p={};{let n,r=((h.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(p),h.d(p,{URI:me(()=>w,"URI"),Utils:me(()=>u,"Utils")}),"object"==typeof process?n="win32"===process.platform:"object"==typeof navigator&&(n=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),i=/^\//,a=/^\/\//;function g(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!r.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!i.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}me(g,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{me(this,"f")}static isUri(t){return t instanceof w||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,a=!1){"object"==typeof t?(this.scheme=t.scheme||"",this.authority=t.authority||"",this.path=t.path||"",this.query=t.query||"",this.fragment=t.fragment||""):(this.scheme=t||a?t:"file",this.authority=e||"",this.path=((t,e)=>{switch(t){case"https":case"http":case"file":e?"/"!==e[0]&&(e="/"+e):e="/"}return e})(this.scheme,r||""),this.query=n||"",this.fragment=i||"",g(this,a))}get fsPath(){return y(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===n?n=this.path:null===n&&(n=""),void 0===i?i=this.query:null===i&&(i=""),void 0===a?a=this.fragment:null===a&&(a=""),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new k(e,r,n,i,a)}static parse(t,e=!1){return(t=s.exec(t))?new k(t[2]||"",b(t[4]||""),b(t[5]||""),b(t[7]||""),b(t[9]||""),e):new k("","","","","")}static file(t){let e="",r;return"/"===(t=n?t.replace(/\\/g,"/"):t)[0]&&"/"===t[1]&&(t=-1===(r=t.indexOf("/",2))?(e=t.substring(2),"/"):(e=t.substring(2,r),t.substring(r)||"/")),new k("file",e,t,"","")}static from(t){return g(t=new k(t.scheme,t.authority,t.path,t.query,t.fragment),!0),t}toString(t=!1){return v(this,t)}toJSON(){return this}static revive(t){var e;return t&&(t instanceof w?t:((e=new k(t))._formatted=t.external,e._fsPath=t._sep===o?t.fsPath:null,e))}}let o=n?1:void 0;class k extends w{static{me(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(t=!1){return t?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=o),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}let l={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,r,n){let i,a=-1;for(let t=0;t<e.length;t++){var s=e.charCodeAt(t);97<=s&&s<=122||65<=s&&s<=90||48<=s&&s<=57||45===s||46===s||95===s||126===s||r&&47===s||n&&91===s||n&&93===s||n&&58===s?(-1!==a&&(i+=encodeURIComponent(e.substring(a,t)),a=-1),void 0!==i&&(i+=e.charAt(t))):(void 0===i&&(i=e.substr(0,t)),void 0!==(s=l[s])?(-1!==a&&(i+=encodeURIComponent(e.substring(a,t)),a=-1),i+=s):-1===a&&(a=t))}return-1!==a&&(i+=encodeURIComponent(e.substring(a))),void 0!==i?i:e}function m(e){let r;for(let t=0;t<e.length;t++){var n=e.charCodeAt(t);35===n||63===n?(void 0===r&&(r=e.substr(0,t)),r+=l[n]):void 0!==r&&(r+=e[t])}return void 0!==r?r:e}function y(t,e){let r;return r=t.authority&&1<t.path.length&&"file"===t.scheme?"//"+t.authority+t.path:47===t.path.charCodeAt(0)&&(65<=t.path.charCodeAt(1)&&t.path.charCodeAt(1)<=90||97<=t.path.charCodeAt(1)&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,r=n?r.replace(/\//g,"\\"):r}function v(e,t){let r=t?m:f,n="",{scheme:i,authority:a,path:s,query:o,fragment:l}=e;if(i&&(n=n+i+":"),!a&&"file"!==i||(n+="//"),a){let t=a.indexOf("@");-1!==t&&(e=a.substr(0,t),a=a.substr(t+1),-1===(t=e.lastIndexOf(":"))?n+=r(e,!1,!1):n=(n=n+r(e.substr(0,t),!1,!1)+":")+r(e.substr(t+1),!1,!0),n+="@"),a=a.toLowerCase(),-1===(t=a.lastIndexOf(":"))?n+=r(a,!1,!0):n=(n+=r(a.substr(0,t),!1,!0))+a.substr(t)}return s&&(3<=s.length&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)?65<=(e=s.charCodeAt(1))&&e<=90&&(s=`/${String.fromCharCode(e+32)}:`+s.substr(3)):2<=s.length&&58===s.charCodeAt(1)&&65<=(e=s.charCodeAt(0))&&e<=90&&(s=String.fromCharCode(e+32)+":"+s.substr(2)),n+=r(s,!0,!1)),o&&(n=(n+="?")+r(o,!1,!1)),n=l?(n+="#")+(t?l:f(l,!1,!1)):n}function x(t){try{return decodeURIComponent(t)}catch{return 3<t.length?t.substr(0,3)+x(t.substr(3)):t}}me(f,"d"),me(m,"p"),me(y,"m"),me(v,"y"),me(x,"v");let e=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(t){return t.match(e)?t.replace(e,t=>x(t)):t}me(b,"C");let t=h(470),c=t.posix||t;(d=u=u||{}).joinPath=function(t,...e){return t.with({path:c.join(t.path,...e)})},d.resolvePath=function(t,...e){let r=t.path,n=!1,i=("/"!==r[0]&&(r="/"+r,n=!0),c.resolve(r,...e));return n&&"/"===i[0]&&!t.authority&&(i=i.substring(1)),t.with({path:i})},d.dirname=function(t){if(0===t.path.length||"/"===t.path)return t;let e=c.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},d.basename=function(t){return c.basename(t.path)},d.extname=function(t){return c.extname(t.path)}}({URI:dbt,Utils:pbt}=p)}),kbt=b(()=>{function t(t,e){return t?.toString()===e?.toString()}function e(t,e){let r="string"==typeof t?t:t.path,n="string"==typeof e?e:e.path,i=r.split("/").filter(t=>0<t.length),a=n.split("/").filter(t=>0<t.length),s=0;for(;s<i.length&&i[s]===a[s];s++);return"../".repeat(i.length-s)+a.slice(s).join("/")}function r(t){return dbt.parse(t.toString()).toString()}var n;wbt(),(n=gbt=gbt||{}).basename=pbt.basename,n.dirname=pbt.dirname,n.extname=pbt.extname,n.joinPath=pbt.joinPath,n.resolvePath=pbt.resolvePath,me(t,"equals"),n.equals=t,me(e,"relative"),n.relative=e,me(r,"normalize"),n.normalize=r}),Tbt=b(()=>{var t;bbt(),Tbt(),Vxt(),Zct(),kbt(),(t=fbt=fbt||{})[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated",mbt=class{static{me(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=Hxt.CancellationToken.None){var r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??dbt.parse(t.uri),Hxt.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromString(t,e,r){return Hxt.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e,r){var n;return"string"==typeof e?(n=this.parse(t,e,r),this.createLangiumDocument(n,t,void 0,e)):"$model"in e?(n={value:e.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(n,t)):(n=this.parse(t,e.getText(),r),this.createLangiumDocument(n,t,e))}async createAsync(t,e,r){var n;return"string"==typeof e?(n=await this.parseAsync(t,e,r),this.createLangiumDocument(n,t,void 0,e)):(n=await this.parseAsync(t,e.getText(),r),this.createLangiumDocument(n,t,e))}createLangiumDocument(e,r,t,n){let i;if(t)i={parseResult:e,uri:r,state:fbt.Parsed,references:[],textDocument:t};else{let t=this.createTextDocumentGetter(r,n);i={parseResult:e,uri:r,state:fbt.Parsed,references:[],get textDocument(){return t()}}}return e.value.$document=i}async update(t,e){var r=null==(r=t.parseResult.value.$cstNode)?void 0:r.root.fullText,n=null==(n=this.textDocuments)?void 0:n.get(t.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(t.uri);return n?Object.defineProperty(t,"textDocument",{value:n}):(n=this.createTextDocumentGetter(t.uri,i),Object.defineProperty(t,"textDocument",{get:n})),r!==i&&(t.parseResult=await this.parseAsync(t.uri,i,e),t.parseResult.value.$document=t),t.state=fbt.Parsed,t}parse(t,e,r){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e,r)}parseAsync(t,e,r){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,r)}createTextDocumentGetter(t,e){let r=this.serviceRegistry,n;return()=>n=n??ubt.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??"")}},ybt=class{static{me(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.serviceRegistry=t.ServiceRegistry}get all(){return Wct(this.documentMap.values())}addDocument(t){var e=t.uri.toString();if(this.documentMap.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentMap.set(e,t)}getDocument(t){return t=t.toString(),this.documentMap.get(t)}async getOrCreateDocument(t,e){return this.getDocument(t)||(t=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(t),t)}createDocument(t,e,r){return r?this.langiumDocumentFactory.fromString(e,t,r).then(t=>(this.addDocument(t),t)):(r=this.langiumDocumentFactory.fromString(e,t),this.addDocument(r),r)}hasDocument(t){return this.documentMap.has(t.toString())}invalidateDocument(t){var e=t.toString();return(e=this.documentMap.get(e))&&(this.serviceRegistry.getServices(t).references.Linker.unlink(e),e.state=fbt.Changed,e.precomputedScopes=void 0,e.diagnostics=void 0),e}deleteDocument(t){var t=t.toString(),e=this.documentMap.get(t);return e&&(e.state=fbt.Changed,this.documentMap.delete(t)),e}}}),Ebt=b(()=>{Vxt(),Uct(),Ndt(),ibt(),Tbt(),vbt=Symbol("ref_resolving"),xbt=class{static{me(this,"DefaultLinker")}constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator}async link(e,t=Hxt.CancellationToken.None){for(var r of Tdt(e.parseResult.value))await Jxt(t),Cdt(r).forEach(t=>this.doLink(t,e))}doLink(t,e){var r=t.reference;if(void 0===r._ref){r._ref=vbt;try{var n,i=this.getCandidate(t);Bct(i)?r._ref=i:(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)?(n=this.loadAstNode(i),r._ref=n??this.createLinkingError(t,i)):r._ref=void 0)}catch(e){console.error(`An error occurred while resolving reference to '${r.$refText}':`,e),i=null!=(n=e.message)?n:String(e),r._ref=Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${r.$refText}': `+i})}e.references.push(r)}}unlink(t){for(var e of t.references)delete e._ref,delete e._nodeDescription;t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}buildReference(n,i,t,a){let s=this,o={$refNode:t,$refText:a,get ref(){var t;if(Dct(this._ref))return this._ref;if(Pct(this._nodeDescription)){var e=s.loadAstNode(this._nodeDescription);this._ref=e??s.createLinkingError({reference:o,container:n,property:i},this._nodeDescription)}else if(void 0===this._ref){this._ref=vbt;var e=bdt(n).$document,r=s.getLinkedNode({reference:o,container:n,property:i});if(r.error&&e&&e.state<fbt.ComputedScopes)return this._ref=void 0;this._ref=null!=(t=r.node)?t:r.error,this._nodeDescription=r.descr,e?.references.push(this)}else if(this._ref===vbt)throw new Error(`Cyclic reference resolution detected: ${s.astNodeLocator.getAstNodePath(n)}/${i} (symbol '${a}')`);return Dct(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Bct(this._ref)?this._ref:void 0}};return o}getLinkedNode(e){try{var r,n=this.getCandidate(e);return Bct(n)?{error:n}:(r=this.loadAstNode(n))?{node:r,descr:n}:{descr:n,error:this.createLinkingError(e,n)}}catch(t){return console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t),n=null!=(r=t.message)?r:String(t),{error:Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${e.reference.$refText}': `+n})}}}loadAstNode(t){var e;return t.node||((e=this.langiumDocuments().getDocument(t.documentUri))?this.astNodeLocator.getAstNode(e.parseResult.value,t.path):void 0)}createLinkingError(t,e){(r=bdt(t.container).$document)&&r.state<fbt.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);var r=this.reflection.getReferenceType(t);return Object.assign(Object.assign({},t),{message:`Could not resolve reference to ${r} named '${t.reference.$refText}'.`,targetDescription:e})}}});function Cbt(t){return"string"==typeof t.name}var Sbt,_bt,Abt,Lbt,Nbt,Ibt,Rbt,Mbt,Dbt,Obt,Pbt,Bbt,$bt,Fbt,zbt=b(()=>{Xpt(),me(Cbt,"isNamed"),Sbt=class{static{me(this,"DefaultNameProvider")}getName(t){if(Cbt(t))return t.name}getNameNode(t){return vpt(t.$cstNode,"name")}}}),Gbt=b(()=>{Xpt(),Uct(),Ndt(),bht(),Zct(),kbt(),_bt=class{static{me(this,"DefaultReferences")}constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator}findDeclaration(t){if(t){var e=Tpt(t),r=t.astNode;if(e&&r){if(Oct(e=r[e.feature]))return e.ref;if(Array.isArray(e))for(var n of e)if(Oct(n)&&n.$refNode&&n.$refNode.offset<=t.offset&&n.$refNode.end>=t.end)return n.ref}if(r&&(e=this.nameProvider.getNameNode(r))&&(e===t||eht(t,e)))return r}}findDeclarationNode(t){if((t=this.findDeclaration(t))?.$cstNode)return this.nameProvider.getNameNode(t)??t.$cstNode}findReferences(t,e){var r,n=[];e.includeDeclaration&&(r=this.getReferenceToSelf(t))&&n.push(r);let i=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(i=i.filter(t=>gbt.equals(t.sourceUri,e.documentUri))),n.push(...i),Wct(n)}getReferenceToSelf(t){var e,r=this.nameProvider.getNameNode(t);if(r)return e=xdt(t),t=this.nodeLocator.getAstNodePath(t),{sourceUri:e.uri,sourcePath:t,targetUri:e.uri,targetPath:t,segment:nht(r),local:!0}}}}),Ubt=b(()=>{Zct(),Abt=class{static{me(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(var[e,r]of t)this.add(e,r)}get size(){return Kct.sum(Wct(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,e){var r;return void 0===e?this.map.delete(t):!!((r=this.map.get(t))&&0<=(e=r.indexOf(e)))&&(1===r.length?this.map.delete(t):r.splice(e,1),!0)}get(t){return null!=(t=this.map.get(t))?t:[]}has(t,e){return void 0===e?this.map.has(t):!!(t=this.map.get(t))&&0<=t.indexOf(e)}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(r){this.map.forEach((t,e)=>t.forEach(t=>r(t,e,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Wct(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return Wct(this.map.keys())}values(){return Wct(this.map.values()).flat()}entriesGroupedByKey(){return Wct(this.map.entries())}},Lbt=class{static{me(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(var[e,r]of t)this.set(e,r)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){var e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}}}),qbt=b(()=>{Vxt(),Ndt(),Ubt(),ibt(),Nbt=class{static{me(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=Hxt.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,r=wdt,n=Hxt.CancellationToken.None){var i,a=[];this.exportNode(t,a,e);for(i of r(t))await Jxt(n),this.exportNode(i,a,e);return a}exportNode(t,e,r){var n=this.nameProvider.getName(t);n&&e.push(this.descriptions.createDescription(t,n,r))}async computeLocalScopes(t,e=Hxt.CancellationToken.None){var r,n=t.parseResult.value,i=new Abt;for(r of kdt(n))await Jxt(e),this.processNode(r,t,i);return i}processNode(t,e,r){var n,i=t.$container;i&&(n=this.nameProvider.getName(t))&&r.add(i,this.descriptions.createDescription(t,n,e))}}}),jbt=b(()=>{Zct(),Ibt=class{static{me(this,"StreamScope")}constructor(t,e,r){this.elements=t,this.outerScope=e,this.caseInsensitive=null!=(t=r?.caseInsensitive)&&t}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){return(this.caseInsensitive?this.elements.find(t=>t.name.toLowerCase()===e.toLowerCase()):this.elements.find(t=>t.name===e))||(this.outerScope?this.outerScope.getElement(e):void 0)}},Rbt=class{static{me(this,"MapScope")}constructor(t,e,r){var n;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(n of t){var i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}this.outerScope=e}getElement(t){var e=this.caseInsensitive?t.toLowerCase():t;return this.elements.get(e)||(this.outerScope?this.outerScope.getElement(t):void 0)}getAllElements(){let t=Wct(this.elements.values());return t=this.outerScope?t.concat(this.outerScope.getAllElements()):t}},Mbt={getElement(){},getAllElements(){return Hct}}}),Wbt=b(()=>{Dbt=class{static{me(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},Obt=class extends Dbt{static{me(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){return this.throwIfDisposed(),this.cache.has(t)?this.cache.get(t):e?(e=e(),this.cache.set(t,e),e):void 0}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},Pbt=class extends Dbt{static{me(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=t??(t=>t)}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,r){this.throwIfDisposed(),this.cacheForContext(t).set(e,r)}get(t,e,r){return this.throwIfDisposed(),(t=this.cacheForContext(t)).has(e)?t.get(e):r?(r=r(),t.set(e,r),r):void 0}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){this.throwIfDisposed(),t?(t=this.converter(t),this.cache.delete(t)):this.cache.clear()}cacheForContext(t){let e=this.converter(t),r=this.cache.get(e);return r||(r=new Map,this.cache.set(e,r)),r}},Bbt=class extends Pbt{static{me(this,"DocumentCache")}constructor(t,e){super(t=>t.toString()),e?(this.toDispose.push(t.workspace.DocumentBuilder.onDocumentPhase(e,t=>{this.clear(t.uri.toString())})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{for(var r of e)this.clear(r)}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{var r;for(r of t.concat(e))this.clear(r)}))}},$bt=class extends Obt{static{me(this,"WorkspaceCache")}constructor(t,e){super(),e?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(e,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{0<e.length&&this.clear()}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),Ybt=b(()=>{jbt(),Ndt(),Zct(),Wbt(),Fbt=class{static{me(this,"DefaultScopeProvider")}constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new $bt(t.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=xdt(e.container).precomputedScopes;if(i){let t=e.container;do{var a=i.get(t);0<a.length&&r.push(Wct(a).filter(t=>this.reflection.isSubtype(t.type,n))),t=t.$container}while(t)}let s=this.getGlobalScope(n,e);for(let t=r.length-1;0<=t;t--)s=this.createScope(r[t],s);return s}createScope(t,e,r){return new Ibt(Wct(t),e,r)}createScopeForNodes(t,e,r){return t=Wct(t).map(t=>{var e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable(),new Ibt(t,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new Rbt(this.indexManager.allElements(t)))}}});function Hbt(t){return"string"==typeof t.$comment}function Vbt(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}var Xbt,Kbt,Zbt=b(()=>{wbt(),Uct(),Ndt(),Xpt(),me(Hbt,"isAstNodeWithComment"),me(Vbt,"isIntermediateReference"),Xbt=class{static{me(this,"DefaultJsonSerializer")}constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,e){let r=e??{},n=e?.replacer,i=me((t,e)=>this.replacer(t,e,r),"defaultReplacer"),a=n?(t,e)=>n(t,e,i):i;try{return this.currentDocument=xdt(t),JSON.stringify(t,a,e?.space)}finally{this.currentDocument=void 0}}deserialize(t,e){return e=e??{},t=JSON.parse(t),this.linkNode(t,t,e),t}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(Oct(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let t=xdt(l),e="";return this.currentDocument&&this.currentDocument!==t&&(e=o?o(t.uri,r):t.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:e+"#"+o,$refText:n}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:n}}if(Dct(r)){let t;return a&&(t=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),!e||r.$document)&&t?.$textRegion&&(t.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString()),i&&!e&&((t=t??Object.assign({},r)).$sourceText=null==(o=r.$cstNode)?void 0:o.text),s&&(t=t??Object.assign({},r),n=this.commentProvider.getComment(r))&&(t.$comment=n.replace(/\r/g,"")),t??r}return r}}addAstNodeRegionWithAssignmentsTo(n){let i=me(t=>({offset:t.offset,end:t.end,length:t.length,range:t.range}),"createDocumentSegment");if(n.$cstNode){let t=n.$textRegion=i(n.$cstNode),r=t.assignments={};return Object.keys(n).filter(t=>!t.startsWith("$")).forEach(t=>{var e=ypt(n.$cstNode,t).map(i);0!==e.length&&(r[t]=e)}),n}}linkNode(e,r,n,t,i,a){for(var[s,o]of Object.entries(e))if(Array.isArray(o))for(let t=0;t<o.length;t++){var l=o[t];Vbt(l)?o[t]=this.reviveReference(e,s,r,l,n):Dct(l)&&this.linkNode(l,r,n,e,s,t)}else Vbt(o)?e[s]=this.reviveReference(e,s,r,o,n):Dct(o)&&this.linkNode(o,r,n,e,s);var c=e;c.$container=t,c.$containerProperty=i,c.$containerIndex=a}reviveReference(t,e,r,n,i){let a=n.$refText,s=n.$error;if(n.$ref){if(Dct(r=this.getRefNode(r,n.$ref,i.uriConverter)))return{$refText:(a=a||this.nameProvider.getName(r))??"",ref:r};s=r}return s?((n={$refText:a??""}).error={container:t,property:e,message:s,reference:n},n):void 0}getRefNode(t,e,r){try{var n,i,a,s,o=e.indexOf("#");return 0===o?this.astNodeLocator.getAstNode(t,e.substring(1))||"Could not resolve path: "+e:o<0?(n=r?r(e):dbt.parse(e),(i=this.langiumDocuments.getDocument(n))?i.parseResult.value:"Could not find document for URI: "+e):(a=r?r(e.substring(0,o)):dbt.parse(e.substring(0,o)),(s=this.langiumDocuments.getDocument(a))?o===e.length-1?s.parseResult.value:this.astNodeLocator.getAstNode(s.parseResult.value,e.substring(o+1))||"Could not resolve URI: "+e:"Could not find document for URI: "+e)}catch(t){return String(t)}}}}),Qbt=b(()=>{kbt(),Kbt=class{static{me(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(t){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=t?.workspace.TextDocuments}register(t){var e,r=t.LanguageMetaData;for(e of r.fileExtensions)this.fileExtensionMap.has(e)&&console.warn(`The file extension ${e} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(e,t);this.languageIdMap.set(r.languageId,t),1===this.languageIdMap.size?this.singleton=t:this.singleton=void 0}getServices(t){if(void 0!==this.singleton)return this.singleton;if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var e=null==(e=null==(e=this.textDocuments)?void 0:e.get(t))?void 0:e.languageId;if(void 0!==e){var r=this.languageIdMap.get(e);if(r)return r}if(r=gbt.extname(t),t=this.fileExtensionMap.get(r))return t;throw e?new Error(`The service registry contains no services for the extension '${r}' for language '${e}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(t){try{return this.getServices(t),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function Jbt(t){return{code:t}}var t4t,e4t,r4t=b(()=>{n3t(),Ubt(),ibt(),Zct(),me(Jbt,"diagnosticData"),(t4t=t4t||{}).all=["fast","slow","built-in"],e4t=class{static{me(this,"ValidationRegistry")}constructor(t){this.entries=new Abt,this.entriesBefore=[],this.entriesAfter=[],this.reflection=t.shared.AstReflection}register(t,e=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(var[n,i]of Object.entries(t))if(Array.isArray(i))for(var a of i)a={check:this.wrapValidationException(a,e),category:r},this.addEntry(n,a);else"function"==typeof i?(i={check:this.wrapValidationException(i,e),category:r},this.addEntry(n,i)):wht()}wrapValidationException(n,i){return async(t,e,r)=>{await this.handleException(()=>n.call(i,t,e,r),"An error occurred during validation",e,t)}}async handleException(t,e,r,n){try{await t()}catch(t){if(Qxt(t))throw t;console.error(e+":",t),t instanceof Error&&t.stack&&console.error(t.stack),r("error",e+": "+(t instanceof Error?t.message:String(t)),{node:n})}}addEntry(t,e){if("AstNode"===t)this.entries.add("AstNode",e);else for(var r of this.reflection.getAllSubTypes(t))this.entries.add(r,e)}getChecks(t,e){let r=Wct(this.entries.get(t)).concat(this.entries.get("AstNode"));return(r=e?r.filter(t=>e.includes(t.category)):r).map(t=>t.check)}registerBeforeDocument(t,e=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",e))}registerAfterDocument(t,e=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",e))}wrapPreparationException(i,a,s){return async(t,e,r,n)=>{await this.handleException(()=>i.call(s,t,e,r,n),a,e,t)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function n4t(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=vpt(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=wpt(t.node.$cstNode,t.keyword,t.index)),(e=e??t.node.$cstNode)?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function i4t(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function a4t(t){switch(t){case"error":return Jbt(o4t.LexingError);case"warning":return Jbt(o4t.LexingWarning);case"info":return Jbt(o4t.LexingInfo);case"hint":return Jbt(o4t.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var s4t,o4t,l4t,c4t,h4t,u4t,d4t,p4t,g4t,f4t,m4t=b(()=>{var t;Vxt(),Xpt(),Ndt(),bht(),ibt(),r4t(),s4t=class{static{me(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},r=Hxt.CancellationToken.None){var n=t.parseResult,i=[];if(await Jxt(r),e.categories&&!e.categories.includes("built-in")||(this.processLexingErrors(n,i,e),!(e.stopAfterLexingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===o4t.LexingError)||(this.processParsingErrors(n,i,e),e.stopAfterParsingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===o4t.ParsingError))||(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===o4t.LinkingError))))){try{i.push(...await this.validateAst(n.value,e,r))}catch(t){if(Qxt(t))throw t;console.error("An error occurred during validation:",t)}await Jxt(r)}return i}processLexingErrors(t,e,r){var n;for(n of[...t.lexerErrors,...null!=(t=null==(t=t.lexerReport)?void 0:t.diagnostics)?t:[]]){var i={severity:i4t(i=null!=(i=n.severity)?i:"error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:a4t(i),source:this.getSource()};e.push(i)}}processParsingErrors(t,e,r){for(var n of t.parserErrors){let t;var i,a;isNaN(n.token.startOffset)?"previousToken"in n&&(a=n.previousToken,t=isNaN(a.startOffset)?{start:i={line:0,character:0},end:i}:{start:i={line:a.endLine-1,character:a.endColumn},end:i}):t=rht(n.token),t&&(a={severity:i4t("error"),range:t,message:n.message,data:Jbt(o4t.ParsingError),source:this.getSource()},e.push(a))}}processLinkingErrors(t,e,r){for(var n of t.references){var i;(n=n.error)&&(i={node:n.container,property:n.property,index:n.index,data:{code:o4t.LinkingError,containerType:n.container.$type,property:n.property,refText:n.reference.$refText}},e.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(t,e,r=Hxt.CancellationToken.None){let n=[],i=me((t,e,r)=>{n.push(this.toDiagnostic(t,e,r))},"acceptor");return await this.validateAstBefore(t,e,i,r),await this.validateAstNodes(t,e,i,r),await this.validateAstAfter(t,e,i,r),n}async validateAstBefore(t,e,r,n=Hxt.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksBefore)await Jxt(n),await a(t,r,null!=(i=e.categories)?i:[],n)}async validateAstNodes(t,r,n,i=Hxt.CancellationToken.None){await Promise.all(Tdt(t).map(async t=>{var e;await Jxt(i);for(e of this.validationRegistry.getChecks(t.$type,r.categories))await e(t,n,i)}))}async validateAstAfter(t,e,r,n=Hxt.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksAfter)await Jxt(n),await a(t,r,null!=(i=e.categories)?i:[],n)}toDiagnostic(t,e,r){return{message:e,range:n4t(r),severity:i4t(t),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},me(n4t,"getDiagnosticRange"),me(i4t,"toDiagnosticSeverity"),me(a4t,"toDiagnosticData"),(t=o4t=o4t||{}).LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"}),y4t=b(()=>{Vxt(),Uct(),Ndt(),bht(),ibt(),kbt(),l4t=class{static{me(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(e,t,r){var r=r??xdt(e),n=(t=t??this.nameProvider.getName(e),this.astNodeLocator.getAstNodePath(e));if(!t)throw new Error(`Node at path ${n} has no name.`);let i,a=me(()=>{var t;return i=i??nht(null!=(t=this.nameProvider.getNameNode(e))?t:e.$cstNode)},"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:nht(e.$cstNode),type:e.$type,documentUri:r.uri,path:n}}},c4t=class{static{me(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=Hxt.CancellationToken.None){let r=[],n=t.parseResult.value;for(var i of Tdt(n))await Jxt(e),Cdt(i).filter(t=>!Bct(t)).forEach(t=>{(t=this.createDescription(t))&&r.push(t)});return r}createDescription(t){var e,r=t.reference.$nodeDescription,n=t.reference.$refNode;if(r&&n)return{sourceUri:e=xdt(t.container).uri,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:nht(n),local:gbt.equals(r.documentUri,e)}}}}),v4t=b(()=>{h4t=class{static{me(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){var e;return t.$container?(e=this.getAstNodePath(t.$container),t=this.getPathSegment(t),e+this.segmentSeparator+t):""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(t)return void 0!==e?t+this.indexSeparator+e:t;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(t,e){return e.split(this.segmentSeparator).reduce((t,e)=>{var r,n;return t&&0!==e.length?0<(n=e.indexOf(this.indexSeparator))?(r=e.substring(0,n),n=parseInt(e.substring(n+1)),t[r]?.[n]):t[e]:t},t)}}}),x4t={},b4t=b(()=>{U(x4t,q(Wxt(),1))}),w4t=b(()=>{b4t(),ibt(),u4t=class{static{me(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new nbt,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new x4t.Emitter,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=null!=(t=null==(t=t.capabilities.workspace)?void 0:t.configuration)&&t}async initialized(e){var t;if(this.workspaceConfig&&(e.register&&(t=this.serviceRegistry.all,e.register({section:t.map(t=>this.toSectionName(t.LanguageMetaData.languageId))})),e.fetchConfiguration)){let t=this.serviceRegistry.all.map(t=>({section:this.toSectionName(t.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((t,e)=>{this.updateSectionConfiguration(t.section,r[e])})}this._ready.resolve()}updateConfiguration(r){r.settings&&Object.keys(r.settings).forEach(t=>{var e=r.settings[t];this.updateSectionConfiguration(t,e),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:e})})}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){if(await this.ready,t=this.toSectionName(t),this.settings[t])return this.settings[t][e]}toSectionName(t){return""+t}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}}),k4t=b(()=>{function t(t){return{dispose:me(async()=>t(),"dispose")}}var e=d4t=d4t||{};me(t,"create"),e.create=t}),T4t=b(()=>{Vxt(),k4t(),Ubt(),ibt(),Zct(),r4t(),Tbt(),p4t=class{static{me(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Abt,this.documentPhaseListeners=new Abt,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=fbt.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.serviceRegistry=t.ServiceRegistry}async build(t,r={},e=Hxt.CancellationToken.None){var n;for(n of t){var i,a=n.uri.toString();if(n.state===fbt.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=fbt.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let t=this.buildState.get(a),e=null==(i=t?.result)?void 0:i.validationChecks;e&&0<(i=(null!=(i=r.validation.categories)?i:t4t.all).filter(t=>!e.includes(t))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:i})},result:t.result}),n.state=fbt.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=fbt.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,r,e)}async update(t,e,r=Hxt.CancellationToken.None){this.currentState=fbt.Changed;for(var n of e)this.langiumDocuments.deleteDocument(n),this.buildState.delete(n.toString()),this.indexManager.remove(n);for(var i of t){var a;this.langiumDocuments.invalidateDocument(i)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},i)).state=fbt.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let s=Wct(t).concat(e).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!s.has(t.uri.toString())&&this.shouldRelink(t,s)).forEach(t=>{this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t),t.state=Math.min(t.state,fbt.ComputedScopes),t.diagnostics=void 0}),await this.emitUpdate(t,e),await Jxt(r),t=this.sortDocuments(this.langiumDocuments.all.filter(t=>t.state<fbt.Linked||!(null!=(t=this.buildState.get(t.uri.toString()))&&t.completed)).toArray()),await this.buildDocuments(t,this.updateBuildOptions,r)}async emitUpdate(e,r){await Promise.all(this.updateListeners.map(t=>t(e,r)))}sortDocuments(t){let e=0,r=t.length-1;for(;e<r;){for(;e<t.length&&this.hasTextDocument(t[e]);)e++;for(;0<=r&&!this.hasTextDocument(t[r]);)r--;e<r&&([t[e],t[r]]=[t[r],t[e]])}return t}hasTextDocument(t){var e;return!(null==(e=this.textDocuments)||!e.get(t.uri))}shouldRelink(t,e){return!!t.references.some(t=>void 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(e){return this.updateListeners.push(e),d4t.create(()=>{var t=this.updateListeners.indexOf(e);0<=t&&this.updateListeners.splice(t,1)})}async buildDocuments(t,e,r){this.prepareBuild(t,e),await this.runCancelable(t,fbt.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,fbt.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,fbt.ComputedScopes,r,async t=>{var e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,r)}),await this.runCancelable(t,fbt.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(t,fbt.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));var n,e=t.filter(t=>this.shouldValidate(t));await this.runCancelable(e,fbt.Validated,r,t=>this.validate(t,r));for(n of t){var i=this.buildState.get(n.uri.toString());i&&(i.completed=!0)}}prepareBuild(t,e){for(var r of t){var r=r.uri.toString(),n=this.buildState.get(r);n&&!n.completed||this.buildState.set(r,{completed:!1,options:e,result:n?.result})}}async runCancelable(t,e,r,n){var i;for(i of t.filter(t=>t.state<e))await Jxt(r),await n(i),i.state=e,await this.notifyDocumentPhase(i,e,r);t=t.filter(t=>t.state===e),await this.notifyBuildPhase(t,e,r),this.currentState=e}onBuildPhase(t,e){return this.buildPhaseListeners.add(t,e),d4t.create(()=>{this.buildPhaseListeners.delete(t,e)})}onDocumentPhase(t,e){return this.documentPhaseListeners.add(t,e),d4t.create(()=>{this.documentPhaseListeners.delete(t,e)})}waitUntil(i,t,a){let s;return t&&"path"in t?s=t:a=t,a=a??Hxt.CancellationToken.None,s&&(t=this.langiumDocuments.getDocument(s))&&t.state>i?Promise.resolve(s):this.currentState>=i?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(rbt):new Promise((e,t)=>{let r=this.onBuildPhase(i,()=>{var t;r.dispose(),n.dispose(),s?(t=this.langiumDocuments.getDocument(s),e(t?.uri)):e(void 0)}),n=a.onCancellationRequested(()=>{r.dispose(),n.dispose(),t(rbt)})})}async notifyDocumentPhase(t,e,r){var n;for(n of this.documentPhaseListeners.get(e).slice())try{await n(t,r)}catch(t){if(!Qxt(t))throw t}}async notifyBuildPhase(t,e,r){var n;if(0!==t.length)for(n of this.buildPhaseListeners.get(e).slice())await Jxt(r),await n(t,r)}shouldValidate(t){return!!this.getBuildOptions(t).validation}async validate(t,e){var r=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,n=this.getBuildOptions(t).validation,r=await r.validateDocument(t,n="object"==typeof n?n:void 0,e);t.diagnostics?t.diagnostics.push(...r):t.diagnostics=r,(e=this.buildState.get(t.uri.toString()))&&(null==e.result&&(e.result={}),t=null!=(r=n?.categories)?r:t4t.all,e.result.validationChecks?e.result.validationChecks.push(...t):e.result.validationChecks=[...t])}getBuildOptions(t){return null!=(t=null==(t=this.buildState.get(t.uri.toString()))?void 0:t.options)?t:{}}}}),E4t=b(()=>{Ndt(),Wbt(),Vxt(),Zct(),kbt(),g4t=class{static{me(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new Pbt,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){let r=xdt(t).uri,n=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{gbt.equals(t.targetUri,r)&&t.targetPath===e&&n.push(t)})}),Wct(n)}allElements(e,r){let t=Wct(this.symbolIndex.keys());return(t=r?t.filter(t=>!r||r.has(t)):t).map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,r){var t;return r?this.symbolByTypeIndex.get(e,r,()=>{var t;return(null!=(t=this.symbolIndex.get(e))?t:[]).filter(t=>this.astReflection.isSubtype(t.type,r))}):null!=(t=this.symbolIndex.get(e))?t:[]}remove(t){t=t.toString(),this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(t,e=Hxt.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).references.ScopeComputation.computeExports(t,e),t=t.uri.toString(),this.symbolIndex.set(t,e),this.symbolByTypeIndex.clear(t)}async updateReferences(t,e=Hxt.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).workspace.ReferenceDescriptionProvider.createDescriptions(t,e),this.referenceIndex.set(t.uri.toString(),e)}isAffected(t,e){return!!(t=this.referenceIndex.get(t.uri.toString()))&&t.some(t=>!t.local&&e.has(t.targetUri.toString()))}}}),C4t=b(()=>{Vxt(),ibt(),kbt(),f4t=class{static{me(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new nbt,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){this.folders=null!=(t=t.workspaceFolders)?t:void 0}initialized(t){return this.mutex.write(t=>{var e;return this.initializeWorkspace(null!=(e=this.folders)?e:[],t)})}async initializeWorkspace(t,e=Hxt.CancellationToken.None){t=await this.performStartup(t),await Jxt(e),await this.documentBuilder.build(t,this.initialBuildOptions,e)}async performStartup(t){let e=this.serviceRegistry.all.flatMap(t=>t.LanguageMetaData.fileExtensions),r=[],n=me(t=>{r.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)},"collector");return await this.loadAdditionalDocuments(t,n),await Promise.all(t.map(t=>[t,this.getRootFolder(t)]).map(async t=>this.traverseFolder(...t,e,n))),this._ready.resolve(),r}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return dbt.parse(t.uri)}async traverseFolder(e,t,r,n){t=await this.fileSystemProvider.readDirectory(t),await Promise.all(t.map(async t=>{this.includeEntry(e,t,r)&&(t.isDirectory?await this.traverseFolder(e,t.uri,r,n):t.isFile&&(t=await this.langiumDocuments.getOrCreateDocument(t.uri),n(t)))}))}includeEntry(t,e,r){var n=gbt.basename(e.uri);return!n.startsWith(".")&&(e.isDirectory?"node_modules"!==n&&"out"!==n:!!e.isFile&&(n=gbt.extname(e.uri),r.includes(n)))}}});function S4t(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function _4t(t){return t&&"modes"in t&&"defaultMode"in t}function A4t(t){return!S4t(t)&&!_4t(t)}var L4t,N4t,I4t,R4t=b(()=>{iyt(),L4t=class{static{me(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(t,e,r,n,i){return s1t.buildUnexpectedCharactersMessage(t,e,r,n,i)}buildUnableToPopLexerModeMessage(t){return s1t.buildUnableToPopLexerModeMessage(t)}},N4t={mode:"full"},I4t=class{static{me(this,"DefaultLexer")}constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;var e=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive}),e=(this.tokenTypes=this.toTokenTypeDictionary(e),A4t(e)?Object.values(e):e),t="production"===t.LanguageMetaData.mode;this.chevrotainLexer=new c1t(e,{positionTracking:"full",skipValidations:t,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,e=0){var r,n=this.chevrotainLexer.tokenize(t);return{tokens:n.tokens,errors:n.errors,hidden:null!=(n=n.groups.hidden)?n:[],report:null==(r=(n=this.tokenBuilder).flushLexingReport)?void 0:r.call(n,t)}}toTokenTypeDictionary(t){if(A4t(t))return t;let e=_4t(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}},me(S4t,"isTokenTypeArray"),me(_4t,"isIMultiModeLexerDefinition"),me(A4t,"isTokenTypeDictionary")});function M4t(t,e,r){let n,i;return n="string"==typeof t?(i=e,r):(i=t.range.start,e),i=i||A2t.create(0,0),r=O4t(t),e=H4t(n),z4t({index:0,tokens:P4t({lines:r,position:i,options:e}),position:i})}function D4t(t,e){var r,n,e=H4t(e);return 0!==(t=O4t(t)).length&&(r=t[t.length-1],n=e.start,e=e.end,!!n?.exec(t[0]))&&!!e?.exec(r)}function O4t(t){return("string"==typeof t?t:t.text).split(ipt)}function P4t(a){let s,o,l,c=[],h=a.position.line,u=a.position.character;for(let i=0;i<a.lines.length;i++){let t=0===i,e=i===a.lines.length-1,r=a.lines[i],n=0;var d,p,g,f,m,y;t&&a.options.start?(d=null==(s=a.options.start)?void 0:s.exec(r))&&(n=d.index+d[0].length):(d=null==(o=a.options.line)?void 0:o.exec(r))&&(n=d.index+d[0].length),$4t(r=(r=e&&(p=null==(l=a.options.end)?void 0:l.exec(r))?r.substring(0,p.index):r).substring(0,F4t(r)),n)>=r.length?0<c.length&&(p=A2t.create(h,u),c.push({type:"break",content:"",range:L2t.create(p,p)})):(Q4t.lastIndex=n,(m=Q4t.exec(r))&&(g=m[0],m=m[1],y=A2t.create(h,u+n),f=A2t.create(h,u+n+g.length),c.push({type:"tag",content:m,range:L2t.create(y,f)}),n+=g.length,n=$4t(r,n)),n<r.length&&(m=r.substring(n),y=Array.from(m.matchAll(J4t)),c.push(...B4t(y,m,h,u+n)))),h++,u=0}return 0<c.length&&"break"===c[c.length-1].type?c.slice(0,-1):c}function B4t(t,n,i,a){var s=[];if(0===t.length){var e=A2t.create(i,a),r=A2t.create(i,a+n.length);s.push({type:"text",content:n,range:L2t.create(e,r)})}else{let r=0;for(var o of t){var l=o.index,c=n.substring(r,l);0<c.length&&s.push({type:"text",content:n.substring(r,l),range:L2t.create(A2t.create(i,r+a),A2t.create(i,l+a))});let t=c.length+1,e=o[1];s.push({type:"inline-tag",content:e,range:L2t.create(A2t.create(i,r+t+a),A2t.create(i,r+t+e.length+a))}),t+=e.length,4===o.length?(t+=o[2].length,s.push({type:"text",content:c=o[3],range:L2t.create(A2t.create(i,r+t+a),A2t.create(i,r+t+c.length+a))})):s.push({type:"text",content:"",range:L2t.create(A2t.create(i,r+t+a),A2t.create(i,r+t+a))}),r=l+o[0].length}0<(e=n.substring(r)).length&&s.push({type:"text",content:e,range:L2t.create(A2t.create(i,r+a),A2t.create(i,r+a+e.length))})}return s}function $4t(t,e){var r=t.substring(e).match(t5t);return r?e+r.index:t.length}function F4t(t){if((t=t.match(e5t))&&"number"==typeof t.index)return t.index}function z4t(t){var e=A2t.create(t.position.line,t.position.character);if(0===t.tokens.length)return new r5t([],L2t.create(e,e));for(var r=[];t.index<t.tokens.length;){var n=G4t(t,r[r.length-1]);n&&r.push(n)}var i=null!=(i=null==(i=r[0])?void 0:i.range.start)?i:e,a=null!=(a=null==(a=r[r.length-1])?void 0:a.range.end)?a:e;return new r5t(r,L2t.create(i,a))}function G4t(t,e){var r=t.tokens[t.index];return"tag"===r.type?W4t(t,!1):"text"===r.type||"inline-tag"===r.type?q4t(t):(U4t(r,e),void t.index++)}function U4t(t,e){e&&(t=new a5t("",t.range),("inlines"in e?e:e.content).inlines.push(t))}function q4t(t){let e=t.tokens[t.index],r=e,n=e,i=[];for(;e&&"break"!==e.type&&"tag"!==e.type;)i.push(j4t(t)),n=e,e=t.tokens[t.index];return new i5t(i,L2t.create(r.range.start,n.range.end))}function j4t(t){return"inline-tag"===t.tokens[t.index].type?W4t(t,!0):Y4t(t)}function W4t(t,e){var r,n=t.tokens[t.index++],i=n.content.substring(1);return"text"===t.tokens[t.index]?.type?e?(r=Y4t(t),new n5t(i,new i5t([r],r.range),e,L2t.create(n.range.start,r.range.end))):(r=q4t(t),new n5t(i,r,e,L2t.create(n.range.start,r.range.end))):(t=n.range,new n5t(i,new i5t([],t),e,t))}function Y4t(t){return t=t.tokens[t.index++],new a5t(t.content,t.range)}function H4t(t){var e,r;return t?({start:t,end:e,line:r}=t,{start:V4t(t,!0),end:V4t(e,!1),line:V4t(r,!0)}):H4t({start:"/**",end:"*/",line:"*"})}function V4t(t,e){var r;return"string"==typeof t||"object"==typeof t?(r="string"==typeof t?tpt(t):t.source,e?new RegExp("^\\s*"+r):new RegExp(`\\s*${r}\\s*$`)):t}function X4t(r,n,i){var a;if("linkplain"===r||"linkcode"===r||"link"===r){let t=n.indexOf(" "),e=n;return 0<t&&(a=$4t(n,t),e=n.substring(a),n=n.substring(0,t)),("linkcode"===r||"link"===r&&"code"===i.link)&&(e=`\`${e}\``),null!=(r=null==(a=i.renderLink)?void 0:a.call(i,n,e))?r:K4t(n,e)}}function K4t(t,e){try{return dbt.parse(t,!0),`[${e}](${t})`}catch{return t}}function Z4t(t){return t.endsWith(` +`)?` +`:` + +`}var Q4t,J4t,t5t,e5t,r5t,n5t,i5t,a5t,s5t,o5t,l5t,c5t,h5t,u5t,d5t,p5t=b(()=>{rxt(),cpt(),kbt(),me(M4t,"parseJSDoc"),me(D4t,"isJSDoc"),me(O4t,"getLines"),Q4t=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,J4t=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,me(P4t,"tokenize"),me(B4t,"buildInlineTokens"),t5t=/\S/,e5t=/\s*$/,me($4t,"skipWhitespace"),me(F4t,"lastCharacter"),me(z4t,"parseJSDocComment"),me(G4t,"parseJSDocElement"),me(U4t,"appendEmptyLine"),me(q4t,"parseJSDocText"),me(j4t,"parseJSDocInline"),me(W4t,"parseJSDocTag"),me(Y4t,"parseJSDocLine"),me(H4t,"normalizeOptions"),me(V4t,"normalizeOption"),r5t=class{static{me(this,"JSDocCommentImpl")}constructor(t,e){this.elements=t,this.range=e}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(var e of this.elements)0===t.length?t=e.toString():(e=e.toString(),t+=Z4t(t)+e);return t.trim()}toMarkdown(t){let e="";for(var r of this.elements)0===e.length?e=r.toMarkdown(t):(r=r.toMarkdown(t),e+=Z4t(e)+r);return e.trim()}},n5t=class{static{me(this,"JSDocTagImpl")}constructor(t,e,r,n){this.name=t,this.content=e,this.inline=r,this.range=n}toString(){let t="@"+this.name,e=this.content.toString();return 1===this.content.inlines.length?t=t+" "+e:1<this.content.inlines.length&&(t=t+` +`+e),this.inline?`{${t}}`:t}toMarkdown(t){var e;return null!=(e=null==(e=t?.renderTag)?void 0:e.call(t,this))?e:this.toMarkdownDefault(t)}toMarkdownDefault(t){var e=this.content.toMarkdown(t);if(this.inline){var r=X4t(this.name,e,t??{});if("string"==typeof r)return r}let n="",i=("italic"===t?.tag||void 0===t?.tag?n="*":"bold"===t?.tag?n="**":"bold-italic"===t?.tag&&(n="***"),n+"@"+this.name+n);return 1===this.content.inlines.length?i=i+" — "+e:1<this.content.inlines.length&&(i=i+` +`+e),this.inline?`{${i}}`:i}},me(X4t,"renderInlineTag"),me(K4t,"renderLinkDefault"),i5t=class{static{me(this,"JSDocTextImpl")}constructor(t,e){this.inlines=t,this.range=e}toString(){let e="";for(let t=0;t<this.inlines.length;t++){var r=this.inlines[t],n=this.inlines[t+1];e+=r.toString(),n&&n.range.start.line>r.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let r="";for(let t=0;t<this.inlines.length;t++){var n=this.inlines[t],i=this.inlines[t+1];r+=n.toMarkdown(e),i&&i.range.start.line>n.range.start.line&&(r+=` +`)}return r}},a5t=class{static{me(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},me(Z4t,"fillNewlines")}),g5t=b(()=>{Ndt(),p5t(),s5t=class{static{me(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(r){var t=this.commentProvider.getComment(r);if(t&&D4t(t))return M4t(t).toMarkdown({renderLink:me((t,e)=>this.documentationLinkRenderer(r,t,e),"renderLink"),renderTag:me(t=>this.documentationTagRenderer(r,t),"renderTag")})}documentationLinkRenderer(t,e,r){var n=null!=(n=this.findNameInPrecomputedScopes(t,e))?n:this.findNameInGlobalScope(t,e);return n&&n.nameSegment?(t=n.nameSegment.range.start.line+1,e=n.nameSegment.range.start.character+1,`[${r}](${n.documentUri.with({fragment:`L${t},`+e}).toString()})`):void 0}documentationTagRenderer(t,e){}findNameInPrecomputedScopes(e,r){var n=xdt(e).precomputedScopes;if(n){let t=e;do{var i=n.get(t).find(t=>t.name===r);if(i)return i}while(t=t.$container)}}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}}),f5t=b(()=>{Zbt(),bht(),o5t=class{static{me(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return Hbt(t)?t.$comment:null==(t=oht(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),m5t=b(()=>{ibt(),b4t(),l5t=class{static{me(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,e){return Promise.resolve(this.syncParser.parse(t))}},c5t=class{static{me(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let e=this.createWorker();e.onReady(()=>{var t;0<this.queue.length&&(t=this.queue.shift())&&(e.lock(),t.resolve(e))}),this.workerPool.push(e)}}async parse(t,e){let r=await this.acquireParserWorker(e),n=new nbt,i,a=e.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(t).then(t=>{t=this.hydrator.hydrate(t),n.resolve(t)}).catch(t=>{n.reject(t)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(t){t.terminate(),0<=(t=this.workerPool.indexOf(t))&&this.workerPool.splice(t,1)}async acquireParserWorker(t){this.initializeWorkers();for(var e of this.workerPool)if(e.ready)return e.lock(),e;let r=new nbt;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(rbt)}),this.queue.push(r),r.promise}},h5t=class{static{me(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,n){this.onReadyEmitter=new x4t.Emitter,this.deferred=new nbt,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=n,e(t=>{this.deferred.resolve(t),this.unlock()}),r(t=>{this.deferred.reject(t),this.unlock()})}terminate(){this.deferred.reject(rbt),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new nbt,this.sendMessage(t),this.deferred.promise}}}),y5t=b(()=>{Vxt(),ibt(),u5t=class{static{me(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Hxt.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=Kxt();return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r=Hxt.CancellationToken.None){var n=new nbt;return t.push({action:e,deferred:n,cancellationToken:r}),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var t=[];if(0<this.writeQueue.length)t.push(this.writeQueue.shift());else{if(!(0<this.readQueue.length))return;t.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(t.map(async({action:t,deferred:e,cancellationToken:r})=>{try{var n=await Promise.resolve().then(()=>t(r));e.resolve(n)}catch(t){Qxt(t)?e.resolve(void 0):e.reject(t)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),v5t=b(()=>{nxt(),gdt(),Uct(),Ndt(),Ubt(),bht(),d5t=class{static{me(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new Lbt,this.tokenTypeIdMap=new Lbt,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(t=>Object.assign(Object.assign({},t),{message:t.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){var e,r=new Map,n=new Map;for(e of Tdt(t))r.set(e,{});if(t.$cstNode)for(var i of Jct(t.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(i.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)Dct(a)?s.push(this.dehydrateAstNode(a,e)):Oct(a)?s.push(this.dehydrateReference(a,e)):s.push(a)}else Dct(n)?i[r]=this.dehydrateAstNode(n,e):Oct(n)?i[r]=this.dehydrateReference(n,e):void 0!==n&&(i[r]=n);return i}dehydrateReference(t,e){var r={};return r.$refText=t.$refText,t.$refNode&&(r.$refNode=e.cstNodes.get(t.$refNode)),r}dehydrateCstNode(t,e){var r=e.cstNodes.get(t);return zct(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),$ct(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):Fct(t)&&(r.tokenType=t.tokenType.name,r.offset=t.offset,r.length=t.length,r.startLine=t.range.start.line,r.startColumn=t.range.start.character,r.endLine=t.range.end.line,r.endColumn=t.range.end.character),r}hydrate(t){var e=t.value,r=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,r),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,r)}}createHydrationContext(t){var e,r=new Map,n=new Map;for(e of Tdt(t))r.set(e,{});let i;if(t.$cstNode)for(var a of Jct(t.$cstNode)){let t;"fullText"in a?(t=new Jvt(a.fullText),i=t):"content"in a?t=new Zvt:"tokenType"in a&&(t=this.hydrateCstLeafNode(a)),t&&(n.set(a,t),t.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,t.$cstNode&&(i.$cstNode=e.cstNodes.get(t.$cstNode));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)Dct(a)?s.push(this.setParent(this.hydrateAstNode(a,e),i)):Oct(a)?s.push(this.hydrateReference(a,i,r,e)):s.push(a)}else Dct(n)?i[r]=this.setParent(this.hydrateAstNode(n,e),i):Oct(n)?i[r]=this.hydrateReference(n,i,r,e):void 0!==n&&(i[r]=n);return i}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,r,n){return this.linker.buildReference(e,r,n.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,r=0){var n=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(n.grammarSource=this.getGrammarElement(t.grammarSource)),n.astNode=e.astNodes.get(t.astNode),$ct(n))for(var i of t.content)i=this.hydrateCstNode(i,e,r++),n.content.push(i);return n}hydrateCstLeafNode(t){var e=this.getTokenType(t.tokenType),r=t.offset;return new Kvt(r,t.length,{start:{line:t.startLine,character:t.startColumn},end:{line:t.endLine,character:t.endColumn}},e,t.hidden)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(var e of Tdt(this.grammar))Rht(e)&&this.grammarElementIdMap.set(e,t++)}}});function x5t(t){return{documentation:{CommentProvider:me(t=>new o5t(t),"CommentProvider"),DocumentationProvider:me(t=>new s5t(t),"DocumentationProvider")},parser:{AsyncParser:me(t=>new l5t(t),"AsyncParser"),GrammarConfig:me(t=>Kpt(t),"GrammarConfig"),LangiumParser:me(t=>Oxt(t),"LangiumParser"),CompletionParser:me(t=>Mxt(t),"CompletionParser"),ValueConverter:me(()=>new $xt,"ValueConverter"),TokenBuilder:me(()=>new Bxt,"TokenBuilder"),Lexer:me(t=>new I4t(t),"Lexer"),ParserErrorMessageProvider:me(()=>new hxt,"ParserErrorMessageProvider"),LexerErrorMessageProvider:me(()=>new L4t,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:me(()=>new h4t,"AstNodeLocator"),AstNodeDescriptionProvider:me(t=>new l4t(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:me(t=>new c4t(t),"ReferenceDescriptionProvider")},references:{Linker:me(t=>new xbt(t),"Linker"),NameProvider:me(()=>new Sbt,"NameProvider"),ScopeProvider:me(t=>new Fbt(t),"ScopeProvider"),ScopeComputation:me(t=>new Nbt(t),"ScopeComputation"),References:me(t=>new _bt(t),"References")},serializer:{Hydrator:me(t=>new d5t(t),"Hydrator"),JsonSerializer:me(t=>new Xbt(t),"JsonSerializer")},validation:{DocumentValidator:me(t=>new s4t(t),"DocumentValidator"),ValidationRegistry:me(t=>new e4t(t),"ValidationRegistry")},shared:me(()=>t.shared,"shared")}}function b5t(e){return{ServiceRegistry:me(t=>new Kbt(t),"ServiceRegistry"),workspace:{LangiumDocuments:me(t=>new ybt(t),"LangiumDocuments"),LangiumDocumentFactory:me(t=>new mbt(t),"LangiumDocumentFactory"),DocumentBuilder:me(t=>new p4t(t),"DocumentBuilder"),IndexManager:me(t=>new g4t(t),"IndexManager"),WorkspaceManager:me(t=>new f4t(t),"WorkspaceManager"),FileSystemProvider:me(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:me(()=>new u5t,"WorkspaceLock"),ConfigurationProvider:me(t=>new u4t(t),"ConfigurationProvider")}}}var w5t=b(()=>{Zpt(),Dxt(),zxt(),Gxt(),Uxt(),Ebt(),zbt(),Gbt(),qbt(),Ybt(),Zbt(),Qbt(),m4t(),r4t(),y4t(),v4t(),w4t(),T4t(),Tbt(),E4t(),C4t(),R4t(),g5t(),f5t(),gxt(),m5t(),y5t(),v5t(),me(x5t,"createDefaultCoreModule"),me(b5t,"createDefaultSharedCoreModule")});function k5t(t,e,r,n,i,a,s,o,l){return E5t([t,e,r,n,i,a,s,o,l].reduce(S5t,{}))}function T5t(t){if(t&&t[A5t])for(var e of Object.values(t))T5t(e);return t}function E5t(r,n){let i=new Proxy({},{deleteProperty:me(()=>!1,"deleteProperty"),set:me(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:me((t,e)=>e===A5t||C5t(t,e,r,n||i),"get"),getOwnPropertyDescriptor:me((t,e)=>(C5t(t,e,r,n||i),Object.getOwnPropertyDescriptor(t,e)),"getOwnPropertyDescriptor"),has:me((t,e)=>e in r,"has"),ownKeys:me(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return i}function C5t(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===L5t)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in r){r=r[e],t[e]=L5t;try{t[e]="function"==typeof r?r(n):E5t(r,n)}catch(r){throw t[e]=r instanceof Error?r:void 0,r}return t[e]}}function S5t(t,e){if(e)for(var[r,n]of Object.entries(e)){var i;void 0!==n&&(null!==(i=t[r])&&null!==n&&"object"==typeof i&&"object"==typeof n?t[r]=S5t(i,n):t[r]=n)}return t}var _5t,A5t,L5t,N5t,I5t,R5t,M5t,D5t,O5t,P5t=b(()=>{(_5t=_5t||{}).merge=(t,e)=>S5t(S5t({},t),e),me(k5t,"inject"),A5t=Symbol("isProxy"),me(T5t,"eagerLoad"),me(E5t,"_inject"),L5t=Symbol(),me(C5t,"_resolve"),me(S5t,"_merge")}),B5t=b(()=>{}),$5t=b(()=>{f5t(),g5t(),p5t()}),F5t=b(()=>{}),z5t=b(()=>{Zpt(),F5t()}),G5t=b(()=>{iyt(),Gxt(),R4t(),N5t={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(I5t=I5t||{}).REGULAR="indentation-sensitive",I5t.IGNORE_INDENTATION="ignore-indentation",R5t=class extends Bxt{static{me(this,"IndentationAwareTokenBuilder")}constructor(t=N5t){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},N5t),t),this.indentTokenType=f1t({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=f1t({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(t,e){var r;if(!S4t(t=super.buildTokens(t,e)))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,o,l,c,h=[];for(r of t){for(var[u,d]of s)r.name===u?r.PUSH_MODE=I5t.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===i?o=r:r.name===n?l=r:r.name===a?c=r:h.push(r)}if(o&&l&&c)return 0<s.length?{modes:{[I5t.REGULAR]:[o,l,...h,c],[I5t.IGNORE_INDENTATION]:[...h,c]},defaultMode:I5t.REGULAR}:[o,l,c,...h];throw new Error("Some indentation/whitespace tokens not found!")}flushLexingReport(t){var e=super.flushLexingReport(t);return Object.assign(Object.assign({},e),{remainingDedents:this.flushRemainingDedents(t)})}isStartOfLine(t,e){return 0===e||`\r +`.includes(t[e-1])}matchWhitespace(t,e,r,n){return this.whitespaceRegExp.lastIndex=e,{currIndentLevel:null!=(t=(e=this.whitespaceRegExp.exec(t))?.[0].length)?t:0,prevIndentLevel:this.indentationStack.at(-1),match:e}}createIndentationTokenInstance(t,e,r,n){return e=this.getLineNumber(e,n),y1t(t,r,n,n+r.length,e,e,1,r.length)}getLineNumber(t,e){return t.substring(0,e).split(/\r\n|\r|\n/).length}indentMatcher(t,e,r,n){return!this.isStartOfLine(t,e)||({currIndentLevel:t,prevIndentLevel:e,match:r}=this.matchWhitespace(t,e,r,n),t<=e)?null:(this.indentationStack.push(t),r)}dedentMatcher(e,r,n,t){if(this.isStartOfLine(e,r)){var{currIndentLevel:t,prevIndentLevel:i,match:a}=this.matchWhitespace(e,r,n,t);if(!(i<=t))if(-1===(i=this.indentationStack.lastIndexOf(t)))this.diagnostics.push({severity:"error",message:`Invalid dedent level ${t} at offset: ${r}. Current indentation stack: `+this.indentationStack,offset:r,length:null!=(a=null==(t=a?.[0])?void 0:t.length)?a:0,line:this.getLineNumber(e,r),column:1});else{var s=this.indentationStack.length-i-1,o=null!=(a=null==(t=e.substring(0,r).match(/[\r\n]+$/))?void 0:t[0].length)?a:1;for(let t=0;t<s;t++){var l=this.createIndentationTokenInstance(this.dedentTokenType,e,"",r-(o-1));n.push(l),this.indentationStack.pop()}}}return null}buildTerminalToken(t){var t=super.buildTerminalToken(t),{indentTokenName:e,dedentTokenName:r,whitespaceTokenName:n}=this.options;return t.name===e?this.indentTokenType:t.name===r?this.dedentTokenType:t.name===n?f1t({name:n,pattern:this.whitespaceRegExp,group:c1t.SKIPPED}):t}flushRemainingDedents(t){for(var e=[];1<this.indentationStack.length;)e.push(this.createIndentationTokenInstance(this.dedentTokenType,t,"",t.length)),this.indentationStack.pop();return this.indentationStack=[0],e}},M5t=class extends I4t{static{me(this,"IndentationAwareLexer")}constructor(t){if(super(t),!(t.parser.TokenBuilder instanceof R5t))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=t.parser.TokenBuilder}tokenize(t,e=N4t){var r=super.tokenize(t),t=r.report,{indentTokenType:e,dedentTokenType:t}=("full"===e?.mode&&r.tokens.push(...t.remainingDedents),t.remainingDedents=[],this.indentationTokenBuilder),n=e.tokenTypeIdx,i=t.tokenTypeIdx,a=[],s=r.tokens.length-1;for(let t=0;t<s;t++){var o=r.tokens[t],l=r.tokens[t+1];o.tokenTypeIdx===n&&l.tokenTypeIdx===i?t++:a.push(o)}return 0<=s&&a.push(r.tokens[s]),r.tokens=a,r}}}),U5t=b(()=>{}),q5t=b(()=>{m5t(),Dxt(),nxt(),G5t(),zxt(),gxt(),R4t(),Rxt(),U5t(),Gxt(),Uxt()}),j5t=b(()=>{Ebt(),zbt(),Gbt(),jbt(),qbt(),Ybt()}),W5t=b(()=>{v5t(),Zbt()}),Y5t=b(()=>{D5t=class{static{me(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},O5t={fileSystemProvider:me(()=>new D5t,"fileSystemProvider")}});function H5t(){var t=k5t(b5t(O5t),K5t),e=k5t(x5t({shared:t}),X5t);return t.ServiceRegistry.register(e),e}function V5t(t){var e=H5t(),t=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(t,dbt.parse(`memory://${null!=(e=t.name)?e:"grammar"}.langium`)),t}var X5t,K5t,Z5t=b(()=>{w5t(),P5t(),gdt(),Y5t(),kbt(),X5t={Grammar:me(()=>{},"Grammar"),LanguageMetaData:me(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},K5t={AstReflection:me(()=>new ddt,"AstReflection")},me(H5t,"createMinimalGrammarServices"),me(V5t,"loadGrammarFromJson")}),Q5t={},J5t=(KBt(Q5t,{AstUtils:()=>fdt,BiMap:()=>Lbt,Cancellation:()=>Hxt,ContextCache:()=>Pbt,CstUtils:()=>Qct,DONE_RESULT:()=>Vct,Deferred:()=>nbt,Disposable:()=>d4t,DisposableCache:()=>Dbt,DocumentCache:()=>Bbt,EMPTY_STREAM:()=>Hct,ErrorWithLocation:()=>kht,GrammarUtils:()=>hpt,MultiMap:()=>Abt,OperationCancelled:()=>rbt,Reduction:()=>Kct,RegExpUtils:()=>Kdt,SimpleCache:()=>Obt,StreamImpl:()=>Yct,TreeStreamImpl:()=>Xct,URI:()=>dbt,UriUtils:()=>gbt,WorkspaceCache:()=>$bt,assertUnreachable:()=>wht,delayNextTick:()=>Xxt,interruptAndCheck:()=>Jxt,isOperationCancelled:()=>Qxt,loadGrammarFromJson:()=>V5t,setInterruptionPeriod:()=>Zxt,startCancelableOperation:()=>Kxt,stream:()=>Wct}),b(()=>{Wbt(),b4t(),U(Q5t,x4t),Ubt(),k4t(),Tht(),Z5t(),ibt(),Zct(),kbt(),Ndt(),Vxt(),bht(),Xpt(),cpt()})),t3t=b(()=>{m4t(),r4t()}),e3t=b(()=>{y4t(),v4t(),w4t(),T4t(),Tbt(),Y5t(),E4t(),y5t(),C4t()}),r3t={},n3t=(KBt(r3t,{AbstractAstReflection:()=>Gct,AbstractCstNode:()=>Xvt,AbstractLangiumParser:()=>oxt,AbstractParserErrorMessageProvider:()=>cxt,AbstractThreadedAsyncParser:()=>c5t,AstUtils:()=>fdt,BiMap:()=>Lbt,Cancellation:()=>Hxt,CompositeCstNodeImpl:()=>Zvt,ContextCache:()=>Pbt,CstNodeBuilder:()=>Vvt,CstUtils:()=>Qct,DEFAULT_TOKENIZE_OPTIONS:()=>N4t,DONE_RESULT:()=>Vct,DatatypeSymbol:()=>axt,DefaultAstNodeDescriptionProvider:()=>l4t,DefaultAstNodeLocator:()=>h4t,DefaultAsyncParser:()=>l5t,DefaultCommentProvider:()=>o5t,DefaultConfigurationProvider:()=>u4t,DefaultDocumentBuilder:()=>p4t,DefaultDocumentValidator:()=>s4t,DefaultHydrator:()=>d5t,DefaultIndexManager:()=>g4t,DefaultJsonSerializer:()=>Xbt,DefaultLangiumDocumentFactory:()=>mbt,DefaultLangiumDocuments:()=>ybt,DefaultLexer:()=>I4t,DefaultLexerErrorMessageProvider:()=>L4t,DefaultLinker:()=>xbt,DefaultNameProvider:()=>Sbt,DefaultReferenceDescriptionProvider:()=>c4t,DefaultReferences:()=>_bt,DefaultScopeComputation:()=>Nbt,DefaultScopeProvider:()=>Fbt,DefaultServiceRegistry:()=>Kbt,DefaultTokenBuilder:()=>Bxt,DefaultValueConverter:()=>$xt,DefaultWorkspaceLock:()=>u5t,DefaultWorkspaceManager:()=>f4t,Deferred:()=>nbt,Disposable:()=>d4t,DisposableCache:()=>Dbt,DocumentCache:()=>Bbt,DocumentState:()=>fbt,DocumentValidator:()=>o4t,EMPTY_SCOPE:()=>Mbt,EMPTY_STREAM:()=>Hct,EmptyFileSystem:()=>O5t,EmptyFileSystemProvider:()=>D5t,ErrorWithLocation:()=>kht,GrammarAST:()=>Eht,GrammarUtils:()=>hpt,IndentationAwareLexer:()=>M5t,IndentationAwareTokenBuilder:()=>R5t,JSDocDocumentationProvider:()=>s5t,LangiumCompletionParser:()=>uxt,LangiumParser:()=>lxt,LangiumParserErrorMessageProvider:()=>hxt,LeafCstNodeImpl:()=>Kvt,LexingMode:()=>I5t,MapScope:()=>Rbt,Module:()=>_5t,MultiMap:()=>Abt,OperationCancelled:()=>rbt,ParserWorker:()=>h5t,Reduction:()=>Kct,RegExpUtils:()=>Kdt,RootCstNodeImpl:()=>Jvt,SimpleCache:()=>Obt,StreamImpl:()=>Yct,StreamScope:()=>Ibt,TextDocument:()=>ubt,TreeStreamImpl:()=>Xct,URI:()=>dbt,UriUtils:()=>gbt,ValidationCategory:()=>t4t,ValidationRegistry:()=>e4t,ValueConverter:()=>Fxt,WorkspaceCache:()=>$bt,assertUnreachable:()=>wht,createCompletionParser:()=>Mxt,createDefaultCoreModule:()=>x5t,createDefaultSharedCoreModule:()=>b5t,createGrammarConfig:()=>Kpt,createLangiumParser:()=>Oxt,createParser:()=>fxt,delayNextTick:()=>Xxt,diagnosticData:()=>Jbt,eagerLoad:()=>T5t,getDiagnosticRange:()=>n4t,indentationBuilderDefaultOptions:()=>N5t,inject:()=>k5t,interruptAndCheck:()=>Jxt,isAstNode:()=>Dct,isAstNodeDescription:()=>Pct,isAstNodeWithComment:()=>Hbt,isCompositeCstNode:()=>$ct,isIMultiModeLexerDefinition:()=>_4t,isJSDoc:()=>D4t,isLeafCstNode:()=>Fct,isLinkingError:()=>Bct,isNamed:()=>Cbt,isOperationCancelled:()=>Qxt,isReference:()=>Oct,isRootCstNode:()=>zct,isTokenTypeArray:()=>S4t,isTokenTypeDictionary:()=>A4t,loadGrammarFromJson:()=>V5t,parseJSDoc:()=>M4t,prepareLangiumParser:()=>Pxt,setInterruptionPeriod:()=>Zxt,startCancelableOperation:()=>Kxt,stream:()=>Wct,toDiagnosticData:()=>a4t,toDiagnosticSeverity:()=>i4t}),b(()=>{w5t(),P5t(),Qbt(),B5t(),Uct(),$5t(),z5t(),q5t(),j5t(),W5t(),J5t(),U(r3t,Q5t),t3t(),e3t(),gdt()}));function i3t(t){return F3t.isInstance(t,m3t)}function a3t(t){return F3t.isInstance(t,v3t)}function s3t(t){return F3t.isInstance(t,k3t)}function o3t(t){return F3t.isInstance(t,T3t)}function l3t(t){return F3t.isInstance(t,E3t)}function c3t(t){return F3t.isInstance(t,_3t)}function h3t(t){return F3t.isInstance(t,L3t)}function u3t(t){return F3t.isInstance(t,N3t)}function d3t(t){return F3t.isInstance(t,"Pie")}function p3t(t){return F3t.isInstance(t,I3t)}function g3t(t){return F3t.isInstance(t,M3t)}var f3t,s,m3t,y3t,v3t,x3t,b3t,w3t,k3t,T3t,E3t,C3t,S3t,_3t,A3t,L3t,N3t,I3t,R3t,M3t,D3t,O3t,P3t,B3t,$3t,F3t,z3t,G3t,U3t,q3t,j3t,W3t,Y3t,H3t,V3t,X3t,K3t,Z3t,Q3t,J3t,twt,ewt,rwt,nwt,iwt,awt,swt,owt,lwt,cwt,hwt,uwt,dwt,pwt,gwt,fwt,mwt,ywt,vwt,xwt=b(()=>{n3t(),n3t(),n3t(),n3t(),f3t=Object.defineProperty,s=me((t,e)=>f3t(t,"name",{value:e,configurable:!0}),"__name"),m3t="Architecture",me(i3t,"isArchitecture"),s(i3t,"isArchitecture"),y3t="Axis",v3t="Branch",me(a3t,"isBranch"),s(a3t,"isBranch"),x3t="Checkout",b3t="CherryPicking",w3t="ClassDefStatement",k3t="Commit",me(s3t,"isCommit"),s(s3t,"isCommit"),T3t="GitGraph",me(o3t,"isGitGraph"),s(o3t,"isGitGraph"),E3t="Info",me(l3t,"isInfo"),s(l3t,"isInfo"),C3t="Item",S3t="Junction",_3t="Merge",me(c3t,"isMerge"),s(c3t,"isMerge"),A3t="Option",L3t="Packet",me(h3t,"isPacket"),s(h3t,"isPacket"),N3t="PacketBlock",me(u3t,"isPacketBlock"),s(u3t,"isPacketBlock"),me(d3t,"isPie"),s(d3t,"isPie"),I3t="PieSection",me(p3t,"isPieSection"),s(p3t,"isPieSection"),R3t="Service",M3t="Treemap",me(g3t,"isTreemap"),s(g3t,"isTreemap"),D3t="TreemapRow",O3t="Direction",P3t="Leaf",B3t="Section",$3t=class extends Gct{static{me(this,"MermaidAstReflection")}static{s(this,"MermaidAstReflection")}getAllTypes(){return[m3t,y3t,v3t,x3t,b3t,w3t,k3t,"Curve",O3t,"Edge","Entry",T3t,"Group",E3t,C3t,S3t,P3t,_3t,A3t,L3t,N3t,"Pie",I3t,"Radar",B3t,R3t,"Statement",M3t,D3t]}computeIsSubtype(t,e){switch(t){case v3t:case x3t:case b3t:case k3t:case _3t:return this.isSubtype("Statement",e);case O3t:return this.isSubtype(T3t,e);case P3t:case B3t:return this.isSubtype(C3t,e);default:return!1}}getReferenceType(t){if("Entry:axis"!=(t=t.container.$type+":"+t.property))throw new Error(t+" is not a valid reference id.");return y3t}getTypeMetaData(t){switch(t){case m3t:return{name:m3t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case y3t:return{name:y3t,properties:[{name:"label"},{name:"name"}]};case v3t:return{name:v3t,properties:[{name:"name"},{name:"order"}]};case x3t:return{name:x3t,properties:[{name:"branch"}]};case b3t:return{name:b3t,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case w3t:return{name:w3t,properties:[{name:"className"},{name:"styleText"}]};case k3t:return{name:k3t,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Curve":return{name:"Curve",properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"Entry":return{name:"Entry",properties:[{name:"axis"},{name:"value"}]};case T3t:return{name:T3t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case E3t:return{name:E3t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case C3t:return{name:C3t,properties:[{name:"classSelector"},{name:"name"}]};case S3t:return{name:S3t,properties:[{name:"id"},{name:"in"}]};case _3t:return{name:_3t,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case A3t:return{name:A3t,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case L3t:return{name:L3t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case N3t:return{name:N3t,properties:[{name:"bits"},{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case I3t:return{name:I3t,properties:[{name:"label"},{name:"value"}]};case"Radar":return{name:"Radar",properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case R3t:return{name:R3t,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case M3t:return{name:M3t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"},{name:"TreemapRows",defaultValue:[]}]};case D3t:return{name:D3t,properties:[{name:"indent"},{name:"item"}]};case O3t:return{name:O3t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};case P3t:return{name:P3t,properties:[{name:"classSelector"},{name:"name"},{name:"value"}]};case B3t:return{name:B3t,properties:[{name:"classSelector"},{name:"name"}]};default:return{name:t,properties:[]}}}},F3t=new $3t,G3t=s(()=>z3t=z3t??V5t(`{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"InfoGrammar"),q3t=s(()=>U3t=U3t??V5t(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PacketGrammar"),W3t=s(()=>j3t=j3t??V5t(`{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PieGrammar"),H3t=s(()=>Y3t=Y3t??V5t(`{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"ArchitectureGrammar"),X3t=s(()=>V3t=V3t??V5t(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"GitGraphGrammar"),Z3t=s(()=>K3t=K3t??V5t(`{"$type":"Grammar","isDeclared":true,"name":"Radar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"types":[],"usedGrammars":[]}`),"RadarGrammar"),J3t=s(()=>Q3t=Q3t??V5t(`{"$type":"Grammar","isDeclared":true,"name":"Treemap","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","}},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),"TreemapGrammar"),swt={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(awt={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(iwt={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(nwt={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(rwt={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(ewt={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(twt={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},owt={AstReflection:s(()=>new $3t,"AstReflection")},lwt={Grammar:s(()=>G3t(),"Grammar"),LanguageMetaData:s(()=>twt,"LanguageMetaData"),parser:{}},cwt={Grammar:s(()=>q3t(),"Grammar"),LanguageMetaData:s(()=>ewt,"LanguageMetaData"),parser:{}},hwt={Grammar:s(()=>W3t(),"Grammar"),LanguageMetaData:s(()=>rwt,"LanguageMetaData"),parser:{}},uwt={Grammar:s(()=>H3t(),"Grammar"),LanguageMetaData:s(()=>nwt,"LanguageMetaData"),parser:{}},dwt={Grammar:s(()=>X3t(),"Grammar"),LanguageMetaData:s(()=>iwt,"LanguageMetaData"),parser:{}},pwt={Grammar:s(()=>Z3t(),"Grammar"),LanguageMetaData:s(()=>awt,"LanguageMetaData"),parser:{}},gwt={Grammar:s(()=>J3t(),"Grammar"),LanguageMetaData:s(()=>swt,"LanguageMetaData"),parser:{}},fwt={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},mwt=class extends $xt{static{me(this,"AbstractMermaidValueConverter")}static{s(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){var n=this.runCommonConverter(t,e,r);return void 0===(n=void 0===n?this.runCustomConverter(t,e,r):n)?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){return void 0!==(t=fwt[t.name])&&null!==(t=t.exec(e))?void 0!==t[1]?t[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==t[2]?t[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`):void 0:void 0}},ywt=class extends mwt{static{me(this,"CommonValueConverter")}static{s(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},vwt=class extends Bxt{static{me(this,"AbstractMermaidTokenBuilder")}static{s(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}},class extends vwt{static{me(this,"CommonTokenBuilder")}static{s(this,"CommonTokenBuilder")}}});function bwt(t=O5t){var t=k5t(b5t(t),owt),e=k5t(x5t({shared:t}),dwt,kwt);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var wwt,kwt,Twt=b(()=>{xwt(),n3t(),wwt=class extends vwt{static{me(this,"GitGraphTokenBuilder")}static{s(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},kwt={parser:{TokenBuilder:s(()=>new wwt,"TokenBuilder"),ValueConverter:s(()=>new ywt,"ValueConverter")}},me(bwt,"createGitGraphServices"),s(bwt,"createGitGraphServices")});function Ewt(t=O5t){var t=k5t(b5t(t),owt),e=k5t(x5t({shared:t}),lwt,Swt);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var Cwt,Swt,_wt=b(()=>{xwt(),n3t(),Cwt=class extends vwt{static{me(this,"InfoTokenBuilder")}static{s(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},Swt={parser:{TokenBuilder:s(()=>new Cwt,"TokenBuilder"),ValueConverter:s(()=>new ywt,"ValueConverter")}},me(Ewt,"createInfoServices"),s(Ewt,"createInfoServices")});function Awt(t=O5t){var t=k5t(b5t(t),owt),e=k5t(x5t({shared:t}),cwt,Nwt);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var Lwt,Nwt,Iwt=b(()=>{xwt(),n3t(),Lwt=class extends vwt{static{me(this,"PacketTokenBuilder")}static{s(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},Nwt={parser:{TokenBuilder:s(()=>new Lwt,"TokenBuilder"),ValueConverter:s(()=>new ywt,"ValueConverter")}},me(Awt,"createPacketServices"),s(Awt,"createPacketServices")});function Rwt(t=O5t){var t=k5t(b5t(t),owt),e=k5t(x5t({shared:t}),hwt,Owt);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var Mwt,Dwt,Owt,Pwt=b(()=>{xwt(),n3t(),Mwt=class extends vwt{static{me(this,"PieTokenBuilder")}static{s(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},Dwt=class extends mwt{static{me(this,"PieValueConverter")}static{s(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},Owt={parser:{TokenBuilder:s(()=>new Mwt,"TokenBuilder"),ValueConverter:s(()=>new Dwt,"ValueConverter")}},me(Rwt,"createPieServices"),s(Rwt,"createPieServices")});function Bwt(t=O5t){var t=k5t(b5t(t),owt),e=k5t(x5t({shared:t}),uwt,zwt);return t.ServiceRegistry.register(e),{shared:t,Architecture:e}}var $wt,Fwt,zwt,Gwt=b(()=>{xwt(),n3t(),$wt=class extends vwt{static{me(this,"ArchitectureTokenBuilder")}static{s(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},Fwt=class extends mwt{static{me(this,"ArchitectureValueConverter")}static{s(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){return"ARCH_ICON"===t.name?e.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===t.name?e.replace(/["()]/g,""):"ARCH_TITLE"===t.name?e.replace(/[[\]]/g,"").trim():void 0}},zwt={parser:{TokenBuilder:s(()=>new $wt,"TokenBuilder"),ValueConverter:s(()=>new Fwt,"ValueConverter")}},me(Bwt,"createArchitectureServices"),s(Bwt,"createArchitectureServices")});function Uwt(t=O5t){var t=k5t(b5t(t),owt),e=k5t(x5t({shared:t}),pwt,jwt);return t.ServiceRegistry.register(e),{shared:t,Radar:e}}var qwt,jwt,Wwt=b(()=>{xwt(),n3t(),qwt=class extends vwt{static{me(this,"RadarTokenBuilder")}static{s(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},jwt={parser:{TokenBuilder:s(()=>new qwt,"TokenBuilder"),ValueConverter:s(()=>new ywt,"ValueConverter")}},me(Uwt,"createRadarServices"),s(Uwt,"createRadarServices")});function Ywt(t){var e,r=t.validation.TreemapValidator;(t=t.validation.ValidationRegistry)&&(e={Treemap:r.checkSingleRoot.bind(r)},t.register(e,r))}function Hwt(t=O5t){var t=k5t(b5t(t),owt),e=k5t(x5t({shared:t}),gwt,Qwt);return t.ServiceRegistry.register(e),Ywt(e),{shared:t,Treemap:e}}var Vwt,Xwt,Kwt,Zwt,Qwt,Jwt=b(()=>{xwt(),n3t(),Vwt=class extends vwt{static{me(this,"TreemapTokenBuilder")}static{s(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},Xwt=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,Kwt=class extends mwt{static{me(this,"TreemapValueConverter")}static{s(this,"TreemapValueConverter")}runCustomConverter(t,e,r){return"NUMBER2"===t.name?parseFloat(e.replace(/,/g,"")):"SEPARATOR"===t.name||"STRING2"===t.name?e.substring(1,e.length-1):"INDENTATION"===t.name?e.length:"ClassDef"===t.name?"string"!=typeof e?e:(t=Xwt.exec(e))?{$type:"ClassDefStatement",className:t[1],styleText:t[2]||void 0}:void 0:void 0}},me(Ywt,"registerValidationChecks"),s(Ywt,"registerValidationChecks"),Zwt=class{static{me(this,"TreemapValidator")}static{s(this,"TreemapValidator")}checkSingleRoot(t,e){let r;for(var n of t.TreemapRows)n.item&&(void 0===r&&void 0===n.indent?r=0:(void 0===n.indent||void 0!==r&&r>=parseInt(n.indent,10))&&e("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},Qwt={parser:{TokenBuilder:s(()=>new Vwt,"TokenBuilder"),ValueConverter:s(()=>new Kwt,"ValueConverter")},validation:{TreemapValidator:s(()=>new Zwt,"TreemapValidator")}},me(Hwt,"createTreemapServices"),s(Hwt,"createTreemapServices")}),t6t={},e6t=(KBt(t6t,{InfoModule:()=>Swt,createInfoServices:()=>Ewt}),b(()=>{_wt(),xwt()})),r6t={},n6t=(KBt(r6t,{PacketModule:()=>Nwt,createPacketServices:()=>Awt}),b(()=>{Iwt(),xwt()})),i6t={},a6t=(KBt(i6t,{PieModule:()=>Owt,createPieServices:()=>Rwt}),b(()=>{Pwt(),xwt()})),s6t={},o6t=(KBt(s6t,{ArchitectureModule:()=>zwt,createArchitectureServices:()=>Bwt}),b(()=>{Gwt(),xwt()})),l6t={},c6t=(KBt(l6t,{GitGraphModule:()=>kwt,createGitGraphServices:()=>bwt}),b(()=>{Twt(),xwt()})),h6t={},u6t=(KBt(h6t,{RadarModule:()=>jwt,createRadarServices:()=>Uwt}),b(()=>{Wwt(),xwt()})),d6t={},p6t=(KBt(d6t,{TreemapModule:()=>Qwt,createTreemapServices:()=>Hwt}),b(()=>{Jwt(),xwt()}));async function g6t(t,e){var r=m6t[t];if(!r)throw new Error("Unknown diagram type: "+t);if(f6t[t]||await r(),0<(r=f6t[t].parse(e)).lexerErrors.length||0<r.parserErrors.length)throw new y6t(r);return r.value}var f6t,m6t,y6t,v6t=b(()=>{Twt(),_wt(),Iwt(),Pwt(),Gwt(),Wwt(),Jwt(),xwt(),f6t={},m6t={info:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(e6t(),t6t))).createInfoServices)().Info.parser.LangiumParser;f6t.info=t},"info"),packet:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(n6t(),r6t))).createPacketServices)().Packet.parser.LangiumParser;f6t.packet=t},"packet"),pie:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(a6t(),i6t))).createPieServices)().Pie.parser.LangiumParser;f6t.pie=t},"pie"),architecture:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(o6t(),s6t))).createArchitectureServices)().Architecture.parser.LangiumParser;f6t.architecture=t},"architecture"),gitGraph:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(c6t(),l6t))).createGitGraphServices)().GitGraph.parser.LangiumParser;f6t.gitGraph=t},"gitGraph"),radar:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(u6t(),h6t))).createRadarServices)().Radar.parser.LangiumParser;f6t.radar=t},"radar"),treemap:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(p6t(),d6t))).createTreemapServices)().Treemap.parser.LangiumParser;f6t.treemap=t},"treemap")},me(g6t,"parse"),s(g6t,"parse"),y6t=class extends Error{static{me(this,"MermaidParseError")}constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>t.message).join(` +`)} `+t.parserErrors.map(t=>t.message).join(` +`)),this.result=t}static{s(this,"MermaidParseError")}}});function x6t(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var b6t,w6t,k6t=b(()=>{me(x6t,"populateCommonDb")}),T6t=b(()=>{b6t={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),E6t=b(()=>{w6t=class{constructor(t){this.init=t,this.records=this.init()}static{me(this,"ImperativeState")}reset(){this.records=this.init()}}});function C6t(){return qC({length:7})}function S6t(t,n){let i=Object.create(null);return t.reduce((t,e)=>{var r=n(e);return i[r]||(i[r]=!0,t.push(e)),t},[])}function _6t(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function A6t(t){let e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]),r="";t.forEach(function(t){t===e?r+="\t*":r+="\t|"});var n,i=[r,e.id,e.seq];for(n in y.records.branches)y.records.branches.get(n)===e.id&&i.push(n);if(D.debug(i.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){var a=y.records.commits.get(e.parents[0]);_6t(t,e,a),e.parents[1]&&t.push(y.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;e.parents[0]&&(a=y.records.commits.get(e.parents[0]),_6t(t,e,a))}A6t(t=S6t(t,t=>t.id))}var L6t,N6t,y,I6t,R6t,M6t,D6t,O6t,P6t,B6t,$6t,F6t,z6t,G6t,U6t,q6t,j6t,W6t,Y6t,H6t,V6t,X6t,K6t,Z6t,Q6t,J6t,tkt,ekt,rkt,nkt,ikt,akt,skt,okt,lkt,ckt,hkt,ukt,dkt,pkt,gkt,fkt,mkt,ykt,vkt,xkt,bkt,wkt,kkt,Tkt,Ekt,Ckt,Skt,_kt,Akt,Lkt,Nkt,Ikt,Rkt,Mkt,Dkt,Okt,Pkt=b(()=>{t(),iS(),rn(),Oc(),ku(),T6t(),E6t(),tn(),L6t=We.gitGraph,N6t=me(()=>SC({...L6t,...ar().gitGraph}),"getConfig"),y=new w6t(()=>{var t=(e=N6t()).mainBranchName,e=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:e}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}}),me(C6t,"getID"),me(S6t,"uniqBy"),I6t=me(function(t){y.records.direction=t},"setDirection"),R6t=me(function(t){D.debug("options str",t),t=t?.trim()||"{}";try{y.records.options=JSON.parse(t)}catch(t){D.error("error while parsing gitGraph options",t.message)}},"setOptions"),M6t=me(function(){return y.records.options},"getOptions"),D6t=me(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags,a=(D.info("commit",e,r,n,i),D.debug("Entering commit:",e,r,n,i),N6t());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),i=i?.map(t=>L.sanitizeText(t,a)),t={id:r||y.records.seq+"-"+C6t(),message:e,seq:y.records.seq++,type:n??b6t.NORMAL,tags:i??[],parents:null==y.records.head?[]:[y.records.head.id],branch:y.records.currBranch},y.records.head=t,D.info("main branch",a.mainBranchName),y.records.commits.has(t.id)&&D.warn(`Commit ID ${t.id} already exists`),y.records.commits.set(t.id,t),y.records.branches.set(y.records.currBranch,t.id),D.debug("in pushCommit "+t.id)},"commit"),O6t=me(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,N6t());if(y.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);y.records.branches.set(e,null!=y.records.head?y.records.head.id:null),y.records.branchConfig.set(e,{name:e,order:t}),$6t(e),D.debug("in createBranch")},"branch"),P6t=me(t=>{var e=t.branch,r=t.id,n=t.type,i=t.tags,a=N6t(),e=L.sanitizeText(e,a),r=r&&L.sanitizeText(r,a),t=y.records.branches.get(y.records.currBranch),a=y.records.branches.get(e),t=t?y.records.commits.get(t):void 0,s=a?y.records.commits.get(a):void 0;if(t&&s&&t.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(y.records.currBranch===e)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(void 0===t||!t)throw(o=new Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`)).hash={text:"merge "+e,token:"merge "+e,expected:["commit"]},o;if(!y.records.branches.has(e))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist")).hash={text:"merge "+e,token:"merge "+e,expected:["branch "+e]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits")).hash={text:"merge "+e,token:"merge "+e,expected:['"commit"']},o;if(t===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(r&&y.records.commits.has(r))throw(t=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id")).hash={text:`merge ${e} ${r} ${n} `+i?.join(" "),token:`merge ${e} ${r} ${n} `+i?.join(" "),expected:[`merge ${e} ${r}_UNIQUE ${n} `+i?.join(" ")]},t;var s=a||"",o={id:r||y.records.seq+"-"+C6t(),message:`merged branch ${e} into `+y.records.currBranch,seq:y.records.seq++,parents:null==y.records.head?[]:[y.records.head.id,s],branch:y.records.currBranch,type:b6t.MERGE,customType:n,customId:!!r,tags:i??[]};y.records.head=o,y.records.commits.set(o.id,o),y.records.branches.set(y.records.currBranch,o.id),D.debug(y.records.branches),D.debug("in mergeBranch")},"merge"),B6t=me(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent,a=(D.debug("Entering cherryPick:",e,r,n),N6t());if(e=L.sanitizeText(e,a),r=L.sanitizeText(r,a),n=n?.map(t=>L.sanitizeText(t,a)),i=L.sanitizeText(i,a),!e||!y.records.commits.has(e))throw(t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},t;if(void 0===(t=y.records.commits.get(e))||!t)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(t.parents)||!t.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=t.branch;if(t.type===b6t.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!y.records.commits.has(r)){if(s===y.records.currBranch)throw(s=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;if(void 0===(s=y.records.branches.get(y.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},o;var o=y.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;o={id:y.records.seq+"-"+C6t(),message:`cherry-picked ${t?.message} into `+y.records.currBranch,seq:y.records.seq++,parents:null==y.records.head?[]:[y.records.head.id,t.id],branch:y.records.currBranch,type:b6t.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+t.id+(t.type===b6t.MERGE?"|parent:"+i:"")]},y.records.head=o,y.records.commits.set(o.id,o),y.records.branches.set(y.records.currBranch,o.id),D.debug(y.records.branches),D.debug("in cherryPick")}},"cherryPick"),$6t=me(function(t){var e;if(t=L.sanitizeText(t,N6t()),!y.records.branches.has(t))throw(e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`)).hash={text:"checkout "+t,token:"checkout "+t,expected:["branch "+t]},e;y.records.currBranch=t,e=y.records.branches.get(y.records.currBranch),y.records.head=void 0!==e&&e?y.records.commits.get(e)??null:null},"checkout"),me(_6t,"upsert"),me(A6t,"prettyPrintCommitHistory"),F6t=me(function(){D.debug(y.records.commits),A6t([j6t()[0]])},"prettyPrint"),z6t=me(function(){y.reset(),fh()},"clear"),G6t=me(function(){return[...y.records.branchConfig.values()].map((t,e)=>null!=t.order?t:{...t,order:parseFloat("0."+e)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),U6t=me(function(){return y.records.branches},"getBranches"),q6t=me(function(){return y.records.commits},"getCommits"),j6t=me(function(){var t=[...y.records.commits.values()];return t.forEach(function(t){D.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),W6t=me(function(){return y.records.currBranch},"getCurrentBranch"),Y6t=me(function(){return y.records.direction},"getDirection"),H6t=me(function(){return y.records.head},"getHead"),V6t={commitType:b6t,getConfig:N6t,setDirection:I6t,setOptions:R6t,getOptions:M6t,commit:D6t,branch:O6t,merge:P6t,cherryPick:B6t,checkout:$6t,prettyPrint:F6t,clear:z6t,getBranchesAsObjArray:G6t,getBranches:U6t,getCommits:q6t,getCommitsArray:j6t,getCurrentBranch:W6t,getDirection:Y6t,getHead:H6t,setAccTitle:mh,getAccTitle:yh,getAccDescription:xh,setAccDescription:vh,setDiagramTitle:bh,getDiagramTitle:wh}}),Bkt=b(()=>{v6t(),t(),k6t(),Pkt(),T6t(),X6t=me((t,e)=>{x6t(t,e),t.dir&&e.setDirection(t.dir);for(var r of t.statements)K6t(r,e)},"populate"),K6t=me((t,e)=>{var r={Commit:me(t=>e.commit(Z6t(t)),"Commit"),Branch:me(t=>e.branch(Q6t(t)),"Branch"),Merge:me(t=>e.merge(J6t(t)),"Merge"),Checkout:me(t=>e.checkout(tkt(t)),"Checkout"),CherryPicking:me(t=>e.cherryPick(ekt(t)),"CherryPicking")}[t.$type];r?r(t):D.error("Unknown statement type: "+t.$type)},"parseStatement"),Z6t=me(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?b6t[t.type]:b6t.NORMAL,tags:t.tags??void 0}),"parseCommit"),Q6t=me(t=>({name:t.name,order:t.order??0}),"parseBranch"),J6t=me(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?b6t[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),tkt=me(t=>t.branch,"parseCheckout"),ekt=me(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),rkt={parse:me(async t=>{t=await g6t("gitGraph",t),D.debug(t),X6t(t,V6t)},"parse")}}),$kt=b(()=>{i6(),Tu(),t(),iS(),T6t(),Rkt=O(),nkt=Rkt?.gitGraph,ikt=new Map,akt=new Map,skt=new Map,okt=[],lkt=0,ckt="LR",hkt=me(()=>{ikt.clear(),akt.clear(),skt.clear(),lkt=0,okt=[],ckt="LR"},"clear"),ukt=me(t=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{var e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),dkt=me(t=>{let r,n,i;return i="BT"===ckt?(n=me((t,e)=>t<=e,"comparisonFunc"),1/0):(n=me((t,e)=>e<=t,"comparisonFunc"),0),t.forEach(t=>{var e="TB"===ckt||"BT"==ckt?akt.get(t)?.y:akt.get(t)?.x;void 0!==e&&n(e,i)&&(r=t,i=e)}),r},"findClosestParent"),pkt=me(t=>{let r="",n=1/0;return t.forEach(t=>{var e=akt.get(t).y;e<=n&&(r=t,n=e)}),r||void 0},"findClosestParentBT"),gkt=me((t,n,e)=>{let i=e,a=e,r=[];t.forEach(t=>{var e=n.get(t);if(!e)throw new Error("Commit not found for key "+t);e.parents.length?(i=mkt(e),a=Math.max(i,a)):r.push(e),ykt(e,i)}),i=a,r.forEach(t=>{vkt(t,i,e)}),t.forEach(t=>{var e,r;(t=n.get(t))?.parents.length&&(e=pkt(t.parents),(i=akt.get(e).y-40)<=a&&(a=i),e=ikt.get(t.branch).pos,r=i-10,akt.set(t.id,{x:e,y:r}))})},"setParallelBTPos"),fkt=me(t=>{var e=dkt(t.parents.filter(t=>null!==t));if(!e)throw new Error("Closest parent not found for commit "+t.id);if(void 0===(e=akt.get(e)?.y))throw new Error("Closest parent position not found for commit "+t.id);return e},"findClosestParentPos"),mkt=me(t=>fkt(t)+40,"calculateCommitPosition"),ykt=me((t,e)=>{var r=ikt.get(t.branch);if(r)return r=r.pos,akt.set(t.id,{x:r,y:e+=10}),{x:r,y:e};throw new Error("Branch not found for commit "+t.id)},"setCommitPosition"),vkt=me((t,e,r)=>{var n=ikt.get(t.branch);if(!n)throw new Error("Branch not found for commit "+t.id);n=n.pos,akt.set(t.id,{x:n,y:e+r})},"setRootPosition"),xkt=me((t,e,r,n,i,a)=>{var s;a===b6t.HIGHLIGHT?(t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%8} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%8} ${n}-inner`)):a===b6t.CHERRY_PICK?(t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} `+n),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+n),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+n),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} `+n),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} `+n)):((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===b6t.MERGE?9:10),s.attr("class",`commit ${e.id} commit`+i%8),a===b6t.MERGE&&((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${n} ${e.id} commit`+i%8)),a===b6t.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},`+(r.y-5)).attr("class",`commit ${n} ${e.id} commit`+i%8))},"drawCommitBullet"),bkt=me((t,e,r,n)=>{var i,a;e.type!==b6t.CHERRY_PICK&&(e.customId&&e.type===b6t.MERGE||e.type!==b6t.MERGE)&&nkt?.showCommitLabel&&(a=(t=t.append("g")).insert("rect").attr("class","commit-label-bkg"),i=(e=t.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-i.width/2-2).attr("y",r.y+13.5).attr("width",i.width+4).attr("height",i.height+4),"TB"===ckt||"BT"===ckt?(a.attr("x",r.x-(i.width+16+5)).attr("y",r.y-12),e.attr("x",r.x-(i.width+16)).attr("y",r.y+i.height-12)):e.attr("x",r.posWithOffset-i.width/2),nkt.rotateCommitLabel)&&("TB"===ckt||"BT"===ckt?(e.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(e=-7.5-(i.width+10)/25*9.5,a=10+i.width/25*8.5,t.attr("transform","translate("+e+", "+a+") rotate(-45, "+n+", "+r.y+")")))},"drawCommitLabel"),wkt=me((i,a,s,o)=>{if(0<a.tags.length){let t=0,e=0,r=0,n=[];for(var l of a.tags.reverse()){var c=i.insert("polygon"),h=i.append("circle"),u=(l=i.append("text").attr("y",s.y-16-t).attr("class","tag-label").text(l)).node()?.getBBox();if(!u)throw new Error("Tag bbox not found");e=Math.max(e,u.width),r=Math.max(r,u.height),l.attr("x",s.posWithOffset-u.width/2),n.push({tag:l,hole:h,rect:c,yOffset:t}),t+=20}for(var{tag:d,hole:p,rect:g,yOffset:f}of n){var m=r/2,y=s.y-19.2-f;g.attr("class","tag-label-bkg").attr("points",` + ${o-e/2-2},${2+y} + ${o-e/2-2},${y-2} + ${s.posWithOffset-e/2-4},${y-m-2} + ${s.posWithOffset+e/2+4},${y-m-2} + ${s.posWithOffset+e/2+4},${y+m+2} + ${s.posWithOffset-e/2-4},`+(y+m+2)),p.attr("cy",y).attr("cx",o-e/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"!==ckt&&"BT"!==ckt||(y=o+f,g.attr("class","tag-label-bkg").attr("points",` + ${s.x},${y+2} + ${s.x},${y-2} + ${s.x+10},${y-m-2} + ${s.x+10+e+4},${y-m-2} + ${s.x+10+e+4},${y+m+2} + ${s.x+10},`+(y+m+2)).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),p.attr("cx",s.x+2).attr("cy",y).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),d.attr("x",s.x+5).attr("y",y+3).attr("transform","translate(14,14) rotate(45, "+s.x+","+o+")"))}}},"drawCommitTags"),kkt=me(t=>{switch(t.customType??t.type){case b6t.NORMAL:return"commit-normal";case b6t.REVERSE:return"commit-reverse";case b6t.HIGHLIGHT:return"commit-highlight";case b6t.MERGE:return"commit-merge";case b6t.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Tkt=me((t,e,r,n)=>{var i,a={x:0,y:0};return 0<t.parents.length?(i=dkt(t.parents))?(i=n.get(i)??a,"TB"===e?i.y+40:"BT"===e?(n.get(t.id)??a).y-40:i.x+40):0:"TB"===e?30:"BT"===e?(n.get(t.id)??a).y-40:0},"calculatePosition"),Ekt=me((t,e,r)=>{var r="BT"===ckt&&r?e:e+10,e="TB"===ckt||"BT"===ckt?r:ikt.get(t.branch)?.pos,n="TB"===ckt||"BT"===ckt?ikt.get(t.branch)?.pos:r;if(void 0===n||void 0===e)throw new Error("Position were undefined for commit "+t.id);return{x:n,y:e,posWithOffset:r}},"getCommitPosition"),Ckt=me((t,a,s)=>{if(!nkt)throw new Error("GitGraph config not found");let o=t.append("g").attr("class","commit-bullets"),l=t.append("g").attr("class","commit-labels"),c="TB"===ckt||"BT"===ckt?30:0,e=[...a.keys()],h=nkt?.parallelCommits??!1,r=me((t,e)=>(t=a.get(t)?.seq,e=a.get(e)?.seq,void 0!==t&&void 0!==e?t-e:0),"sortKeys"),n=e.sort(r);"BT"===ckt&&(h&&gkt(n,a,c),n=n.reverse()),n.forEach(t=>{var e=a.get(t);if(!e)throw new Error("Commit not found for key "+t);h&&(c=Tkt(e,ckt,c,akt));var r,n,i,t=Ekt(e,c,h);s&&(r=kkt(e),n=e.customType??e.type,i=ikt.get(e.branch)?.index??0,xkt(o,e,t,r,i,n),bkt(l,e,t,c),wkt(l,e,t,c)),"TB"===ckt||"BT"===ckt?akt.set(e.id,{x:t.x,y:t.posWithOffset}):akt.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===ckt&&h?c+40:c+40+10)>lkt&&(lkt=c)})},"drawCommits"),Skt=me((e,r,t,n,i)=>{let a=(("TB"===ckt||"BT"===ckt?t.x<n.x:t.y<n.y)?r:e).branch,s=me(t=>t.branch===a,"isOnBranchToGetCurve"),o=me(t=>t.seq>e.seq&&t.seq<r.seq,"isBetweenCommits");return[...i.values()].some(t=>o(t)&&s(t))},"shouldRerouteArrow"),_kt=me((t,e,r=0)=>{let n=t+Math.abs(t-e)/2,i;return 5<r?n:okt.every(t=>10<=Math.abs(t-n))?(okt.push(n),n):(i=Math.abs(t-e),_kt(t,e-i/5,r+1))},"findLane"),Akt=me((t,e,r,n)=>{var i,a=akt.get(e.id),s=akt.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${e.id} and `+r.id);let o=Skt(e,r,a,s,n),l="",c="",h=0,u=0,d=ikt.get(r.branch)?.index;r.type===b6t.MERGE&&e.id!==r.parents[0]&&(d=ikt.get(e.branch)?.index);let p;if(o?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,n=a.y<s.y?_kt(a.y,s.y):_kt(s.y,a.y),i=a.x<s.x?_kt(a.x,s.x):_kt(s.x,a.x),p="TB"===ckt?a.x<s.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${c} ${i} ${a.y+u} L ${i} ${s.y-h} ${l} ${i+u} ${s.y} L ${s.x} `+s.y:(d=ikt.get(e.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${l} ${i} ${a.y+u} L ${i} ${s.y-h} ${c} ${i-u} ${s.y} L ${s.x} `+s.y):"BT"===ckt?a.x<s.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${l} ${i} ${a.y-u} L ${i} ${s.y+h} ${c} ${i+u} ${s.y} L ${s.x} `+s.y:(d=ikt.get(e.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${c} ${i} ${a.y-u} L ${i} ${s.y+h} ${l} ${i-u} ${s.y} L ${s.x} `+s.y):a.y<s.y?`M ${a.x} ${a.y} L ${a.x} ${n-h} ${l} ${a.x+u} ${n} L ${s.x-h} ${n} ${c} ${s.x} ${n+u} L ${s.x} `+s.y:(d=ikt.get(e.branch)?.index,`M ${a.x} ${a.y} L ${a.x} ${n+h} ${c} ${a.x+u} ${n} L ${s.x-h} ${n} ${l} ${s.x} ${n-u} L ${s.x} `+s.y)):(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,"TB"===ckt?(a.x<s.x&&(p=r.type===b6t.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${l} ${a.x+u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${c} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x>s.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===b6t.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${c} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x+h} ${a.y} ${l} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):"BT"===ckt?(a.x<s.x&&(p=r.type===b6t.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x>s.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===b6t.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${l} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):(a.y<s.y&&(p=r.type===b6t.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${c} ${s.x} ${a.y+u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${l} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y>s.y&&(p=r.type===b6t.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y===s.y&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y))),void 0===p)throw new Error("Line definition not found");t.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),Lkt=me((t,r)=>{let n=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{let e=r.get(t);e.parents&&0<e.parents.length&&e.parents.forEach(t=>{Akt(n,r.get(t),e,r)})})},"drawArrows"),Nkt=me((t,e)=>{let a=t.append("g");e.forEach((t,e)=>{var e=e%8,r=ikt.get(t.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+t.name);(n=a.append("line")).attr("x1",0),n.attr("y1",r),n.attr("x2",lkt),n.attr("y2",r),n.attr("class","branch branch"+e),"TB"===ckt?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",lkt),n.attr("x2",r)):"BT"===ckt&&(n.attr("y1",lkt),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),okt.push(r);var n=t.name,t=ukt(n),n=a.insert("rect"),i=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e),t=(i.node().appendChild(t),t.getBBox());n.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-t.width-4-(!0===nkt?.rotateCommitLabel?30:0)).attr("y",-t.height/2+8).attr("width",t.width+18).attr("height",t.height+4),i.attr("transform","translate("+(-t.width-14-(!0===nkt?.rotateCommitLabel?30:0))+", "+(r-t.height/2-1)+")"),"TB"===ckt?(n.attr("x",r-t.width/2-10).attr("y",0),i.attr("transform","translate("+(r-t.width/2-5)+", 0)")):"BT"===ckt?(n.attr("x",r-t.width/2-10).attr("y",lkt),i.attr("transform","translate("+(r-t.width/2-5)+", "+lkt+")")):n.attr("transform","translate(-19, "+(r-t.height/2)+")")})},"drawBranches"),Ikt=me(function(t,e,r,n,i){return ikt.set(t,{pos:e,index:r}),e+(50+(i?40:0)+("TB"===ckt||"BT"===ckt?n.width/2:0))},"setBranchPosition"),Rkt=me(function(t,e,r,n){if(hkt(),D.debug("in gitgraph renderer",t+` +`,"id:",e,r),!nkt)throw new Error("GitGraph config not found");let s=nkt.rotateCommitLabel??!1,i=n.db,o=(skt=i.getCommits(),t=i.getBranchesAsObjArray(),ckt=i.getDirection(),H(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=ukt(t.name),n=o.append("g"),i=n.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=Ikt(t.name,l,e,r,s),a.remove(),i.remove(),n.remove()}),Ckt(o,skt,!1),nkt.showBranches&&Nkt(o,t),Lkt(o,skt),Ckt(o,skt,!0),tS.insertTitle(o,"gitTitleText",nkt.titleTopMargin??0,i.getDiagramTitle()),_h(void 0,o,nkt.diagramPadding,nkt.useMaxWidth)},"draw"),Mkt={draw:Rkt}}),Fkt=b(()=>{Dkt=me(e=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(t=>` + .branch-label${t} { fill: ${e["gitBranchLabel"+t]}; } + .commit${t} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; } + .commit-highlight${t} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; } + .label${t} { fill: ${e["git"+t]}; } + .arrow${t} { stroke: ${e["git"+t]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${e.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${e.primaryColor}; + fill: ${e.primaryColor}; + } + .commit-reverse { + stroke: ${e.primaryColor}; + fill: ${e.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${e.primaryColor}; + fill: ${e.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`,"getStyles"),Okt=Dkt}),zkt={};KBt(zkt,{diagram:()=>Gkt});var Gkt,Ukt,qkt,jkt=b(()=>{Bkt(),Pkt(),$kt(),Fkt(),Gkt={parser:rkt,db:V6t,renderer:Mkt,styles:Okt}}),Wkt=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],s=[1,29],o=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],E=[1,23],C=[1,25],S=[1,35],n={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:n.TopAxis(),this.$=a[o].substr(8);break;case 20:n.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:n.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:n.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:n.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:n.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:n.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],n.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],null),n.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],n.setClickEvent(a[o-2],a[o],null),n.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-1],a[o]),n.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],n.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:S},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:S},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:break;case 11:return 10;case 12:case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};n.lexer=i,me(t,"Parser"),(Ukt=new((t.prototype=n).Parser=t)).parser=Ukt,qkt=Ukt}),Ykt=WBt((t,e)=>{function r(){return function(t,e,i){var a=me(function(t){return t.add(4-t.isoWeekday(),"day")},"a"),s=((e=e.prototype).isoWeekYear=function(){return a(this).year()},e.isoWeek=function(t){var e,r,n;return this.$utils().u(t)?(r=a(this),n=this.isoWeekYear(),e=4-(n=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),4<n.isoWeekday()&&(e+=7),n=n.add(e,"day"),r.diff(n,"week")+1):this.add(7*(t-this.isoWeek()),"day")},e.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)},e.startOf);e.startOf=function(t,e){var r=this.$utils(),n=!!r.u(e)||e;return"isoweek"===r.p(t)?n?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(t,e)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=r()}),Hkt=WBt((t,e)=>{function r(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},l=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,t=/\d/,e=/\d\d/,r=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,g={},i=me(function(t){return(t=+t)+(68<t?1900:2e3)},"a"),a=me(function(e){return function(t){this[e]=+t}},"f"),s=[/[+-]\d\d:?(\d\d)?|Z/,function(t){var e;(this.zone||(this.zone={})).offset=t&&"Z"!==t&&0!==(e=60*(t=t.match(/([+-]|\d\d)/g))[1]+(+t[2]||0))?"+"===t[0]?-e:e:0}],c=me(function(t){return(t=g[t])&&(t.indexOf?t:t.s.concat(t.f))},"u"),h=me(function(t,e){var r,n=g.meridiem;if(n){for(var i=1;i<=24;i+=1)if(-1<t.indexOf(n(i,0,e))){r=12<i;break}}else r=t===(e?"pm":"PM");return r},"d"),d={A:[n,function(t){this.afternoon=h(t,!1)}],a:[n,function(t){this.afternoon=h(t,!0)}],Q:[t,function(t){this.month=3*(t-1)+1}],S:[t,function(t){this.milliseconds=100*+t}],SS:[e,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[e,a("day")],Do:[n,function(t){var e=g.ordinal,r=t.match(/\d+/);if(this.day=r[0],e)for(var n=1;n<=31;n+=1)e(n).replace(/\[|\]/g,"")===t&&(this.day=n)}],w:[r,a("week")],ww:[e,a("week")],M:[r,a("month")],MM:[e,a("month")],MMM:[n,function(t){var e=c("months");if((e=(c("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1)<1)throw new Error;this.month=e%12||e}],MMMM:[n,function(t){if((t=c("months").indexOf(t)+1)<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[e,function(t){this.year=i(t)}],YYYY:[/\d{4}/,a("year")],Z:s,ZZ:s};function T(t){for(var e=t,i=g&&g.formats,h=(t=e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,e,r){var n=r&&r.toUpperCase();return e||i[r]||o[r]||i[n].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,r){return e||r.slice(1)})})).match(l),u=h.length,r=0;r<u;r+=1){var n=h[r],a=(s=d[n])&&s[0],s=s&&s[1];h[r]=s?{regex:a,parser:s}:n.replace(/^\[|\]$/g,"")}return function(t){for(var e,r,n,i={},a=0,s=0;a<u;a+=1){var o,l,c=h[a];"string"==typeof c?s+=c.length:(l=c.regex,c=c.parser,o=t.slice(s),l=l.exec(o)[0],c.call(i,l),t=t.replace(l,""))}return void 0!==(n=(e=i).afternoon)&&(r=e.hours,n?r<12&&(e.hours+=12):12===r&&(e.hours=0),delete e.afternoon),i}}return me(T,"l"),function(t,e,d){d.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(i=t.parseTwoDigitYear);var p=(t=e.prototype).parse;t.parse=function(t){var e=t.date,r=t.utc,n=t.args,i=(this.$u=r,n[1]);if("string"==typeof i){var a=!0===n[2],s=!0===n[3],o=a||s,l=n[2];s&&(l=n[2]),g=this.$locale(),!a&&l&&(g=d.Ls[l]),this.$d=((t,e,r,n)=>{try{if(-1<["x","X"].indexOf(e))return new Date(("X"===e?1e3:1)*t);var i=T(e)(t),a=i.year,s=i.month,o=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,p=i.week,g=new Date,f=o||(a||s?1:g.getDate()),m=a||g.getFullYear(),y=0;a&&!s||(y=0<s?s-1:g.getMonth());var v,x=l||0,b=c||0,w=h||0,k=u||0;return d?new Date(Date.UTC(m,y,f,x,b,w,k+60*d.offset*1e3)):r?new Date(Date.UTC(m,y,f,x,b,w,k)):(v=new Date(m,y,f,x,b,w,k),p?n(v).week(p).toDate():v)}catch{return new Date("")}})(e,i,r,d),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),o&&e!=this.format(i)&&(this.$d=new Date("")),g={}}else if(i instanceof Array)for(var c=i.length,h=1;h<=c;h+=1){n[1]=i[h-1];var u=d.apply(this,n);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}h===c&&(this.$d=new Date(""))}else p.call(this,t)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=r()}),Vkt=WBt((t,e)=>{function r(){return function(t,e){var a=(e=e.prototype).format;e.format=function(t){var e,r,n=this,i=this.$locale();return this.isValid()?(e=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((n.$M+1)/3);case"Do":return i.ordinal(n.$D);case"gggg":return n.weekYear();case"GGGG":return n.isoWeekYear();case"wo":return i.ordinal(n.week(),"W");case"w":case"ww":return e.s(n.week(),"w"===t?1:2,"0");case"W":case"WW":return e.s(n.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return e.s(String(0===n.$H?24:n.$H),"k"===t?1:2,"0");case"X":return Math.floor(n.$d.getTime()/1e3);case"x":return n.$d.getTime();case"z":return"["+n.offsetName()+"]";case"zzz":return"["+n.offsetName("long")+"]";default:return t}}),a.bind(this)(r)):a.bind(this)(t)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=r()});function Xkt(r,n,t){let i=!0;for(;i;)i=!1,t.forEach(function(t){var e=new RegExp("^\\s*"+t+"\\s*$");r[0].match(e)&&(n[t]=!0,r.shift(1),i=!0)})}var Kkt,Zkt,Qkt,Jkt,tTt,eTt,rTt,nTt,iTt,aTt,sTt,oTt,lTt,cTt,hTt,uTt,dTt,pTt,gTt,fTt,mTt,yTt,vTt,xTt,bTt,wTt,kTt,TTt,ETt,CTt,STt,_Tt,ATt,LTt,NTt,ITt,RTt,MTt,DTt,OTt,PTt,BTt,$Tt,FTt,zTt,GTt,UTt,qTt,jTt,WTt,YTt,HTt,VTt,XTt,KTt,ZTt,QTt,JTt,t7t,e7t,r7t,n7t,i7t,a7t,s7t,o7t,l7t,c7t,h7t,u7t,d7t,p7t,g7t,f7t,m7t,y7t,v7t,x7t,b7t,w7t,k7t,T7t=b(()=>{Kkt=q(s6(),1),Zkt=q(yr(),1),yTt=q(Ykt(),1),vTt=q(Hkt(),1),xTt=q(Vkt(),1),t(),Tu(),iS(),ku(),Zkt.default.extend(yTt.default),Zkt.default.extend(vTt.default),Zkt.default.extend(xTt.default),Qkt={friday:5,saturday:6},rTt=tTt=Jkt="",nTt=[],iTt=[],aTt=new Map,sTt=[],oTt=[],cTt=lTt="",hTt=["active","done","crit","milestone","vert"],pTt=dTt=!(uTt=[]),gTt="sunday",fTt="saturday",mTt=0,yTt=me(function(){sTt=[],oTt=[],uTt=[],e7t=[],eTt=t7t=JTt=void(XTt=0),rTt=cTt=tTt=Jkt=lTt="",nTt=[],pTt=dTt=!(iTt=[]),mTt=0,aTt=new Map,fh(),gTt="sunday",fTt="saturday"},"clear"),vTt=me(function(t){tTt=t},"setAxisFormat"),xTt=me(function(){return tTt},"getAxisFormat"),bTt=me(function(t){eTt=t},"setTickInterval"),wTt=me(function(){return eTt},"getTickInterval"),kTt=me(function(t){rTt=t},"setTodayMarker"),TTt=me(function(){return rTt},"getTodayMarker"),ETt=me(function(t){Jkt=t},"setDateFormat"),CTt=me(function(){dTt=!0},"enableInclusiveEndDates"),STt=me(function(){return dTt},"endDatesAreInclusive"),_Tt=me(function(){pTt=!0},"enableTopAxis"),ATt=me(function(){return pTt},"topAxisEnabled"),LTt=me(function(t){cTt=t},"setDisplayMode"),NTt=me(function(){return cTt},"getDisplayMode"),ITt=me(function(){return Jkt},"getDateFormat"),RTt=me(function(t){nTt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),MTt=me(function(){return nTt},"getIncludes"),DTt=me(function(t){iTt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),OTt=me(function(){return iTt},"getExcludes"),PTt=me(function(){return aTt},"getLinks"),BTt=me(function(t){lTt=t,sTt.push(t)},"addSection"),$Tt=me(function(){return sTt},"getSections"),FTt=me(function(){let t=s7t(),e=0;for(;!t&&e<10;)t=s7t(),e++;return oTt=e7t},"getTasks"),zTt=me(function(t,e,r,n){var e=t.format(e.trim()),i=t.format("YYYY-MM-DD");return!n.includes(e)&&!n.includes(i)&&(!((!r.includes("weekends")||t.isoWeekday()!==Qkt[fTt]&&t.isoWeekday()!==Qkt[fTt]+1)&&!r.includes(t.format("dddd").toLowerCase()))||r.includes(e)||r.includes(i))},"isInvalidDate"),GTt=me(function(t){gTt=t},"setWeekday"),UTt=me(function(){return gTt},"getWeekday"),qTt=me(function(t){fTt=t},"setWeekend"),jTt=me(function(e,r,n,i){if(n.length&&!e.manualEndTime){let t;t=(t=e.startTime instanceof Date?(0,Zkt.default)(e.startTime):(0,Zkt.default)(e.startTime,r,!0)).add(1,"d");var a=e.endTime instanceof Date?(0,Zkt.default)(e.endTime):(0,Zkt.default)(e.endTime,r,!0),[r,n]=WTt(t,a,r,n,i);e.endTime=r.toDate(),e.renderEndTime=n}},"checkTaskDates"),WTt=me(function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),(a=zTt(t,r,n,i))&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),YTt=me(function(t,e,r){r=r.trim();var n=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(var i of n.groups.ids.split(" "))void 0!==(i=i7t(i))&&(!t||i.endTime>t.endTime)&&(t=i);return t?t.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,Zkt.default)(r,e.trim(),!0)).isValid())return n.toDate();if(D.debug("Invalid date:"+r),D.debug("With date format:"+e.trim()),void 0===(n=new Date(r))||isNaN(n.getTime())||n.getFullYear()<-1e4||1e4<n.getFullYear())throw new Error("Invalid date:"+r);return n},"getStartDate"),HTt=me(function(t){return null!==(t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim()))?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),VTt=me(function(t,e,r,n=!1){r=r.trim();var i=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(var a of i.groups.ids.split(" "))void 0!==(a=i7t(a))&&(!t||a.startTime<t.startTime)&&(t=a);return t?t.startTime:((i=new Date).setHours(0,0,0,0),i)}let s=(0,Zkt.default)(r,e.trim(),!0);if(s.isValid())return(s=n?s.add(1,"d"):s).toDate();let o=(0,Zkt.default)(t),[l,c]=HTt(r);return Number.isNaN(l)||(i=o.add(l,c)).isValid()&&(o=i),o.toDate()},"getEndDate"),XTt=0,KTt=me(function(t){return void 0===t?"task"+(XTt+=1):t},"parseId"),ZTt=me(function(t,e){var r=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),n={};Xkt(r,n,hTt);for(let t=0;t<r.length;t++)r[t]=r[t].trim();let i="";switch(r.length){case 1:n.id=KTt(),n.startTime=t.endTime,i=r[0];break;case 2:n.id=KTt(),n.startTime=YTt(void 0,Jkt,r[0]),i=r[1];break;case 3:n.id=KTt(r[0]),n.startTime=YTt(void 0,Jkt,r[1]),i=r[2]}return i&&(n.endTime=VTt(n.startTime,Jkt,i,dTt),n.manualEndTime=(0,Zkt.default)(i,"YYYY-MM-DD",!0).isValid(),jTt(n,Jkt,iTt,nTt)),n},"compileData"),QTt=me(function(t,e){var r=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),n={};Xkt(r,n,hTt);for(let t=0;t<r.length;t++)r[t]=r[t].trim();switch(r.length){case 1:n.id=KTt(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:r[0]};break;case 2:n.id=KTt(),n.startTime={type:"getStartDate",startData:r[0]},n.endTime={data:r[1]};break;case 3:n.id=KTt(r[0]),n.startTime={type:"getStartDate",startData:r[1]},n.endTime={data:r[2]}}return n},"parseData"),e7t=[],r7t={},n7t=me(function(t,e){t={section:lTt,type:lTt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},e=QTt(t7t,e),t.raw.startTime=e.startTime,t.raw.endTime=e.endTime,t.id=e.id,t.prevTaskId=t7t,t.active=e.active,t.done=e.done,t.crit=e.crit,t.milestone=e.milestone,t.vert=e.vert,t.order=mTt,mTt++,e=e7t.push(t),r7t[t7t=t.id]=e-1},"addTask"),i7t=me(function(t){return e7t[r7t[t]]},"findTaskById"),a7t=me(function(t,e){t={section:lTt,type:lTt,description:t,task:t,classes:[]},e=ZTt(JTt,e),t.startTime=e.startTime,t.endTime=e.endTime,t.id=e.id,t.active=e.active,t.done=e.done,t.crit=e.crit,t.milestone=e.milestone,t.vert=e.vert,JTt=t,oTt.push(t)},"addTaskOrg"),s7t=me(function(){let t=me(function(t){var e=e7t[t];switch(e7t[t].raw.startTime.type){case"prevTaskEnd":var r=i7t(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(r=YTt(void 0,Jkt,e7t[t].raw.startTime.startData))&&(e7t[t].startTime=r)}return e7t[t].startTime&&(e7t[t].endTime=VTt(e7t[t].startTime,Jkt,e7t[t].raw.endTime.data,dTt),e7t[t].endTime)&&(e7t[t].processed=!0,e7t[t].manualEndTime=(0,Zkt.default)(e7t[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),jTt(e7t[t],Jkt,iTt,nTt)),e7t[t].processed},"compileTask"),e=!0;for(var[r,n]of e7t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),o7t=me(function(t,e){let r=e;"loose"!==O().securityLevel&&(r=(0,Kkt.sanitizeUrl)(e)),t.split(",").forEach(function(t){void 0!==i7t(t)&&(h7t(t,()=>{window.open(r,"_self")}),aTt.set(t,r))}),l7t(t,"clickable")},"setLink"),l7t=me(function(t,e){t.split(",").forEach(function(t){void 0!==(t=i7t(t))&&t.classes.push(e)})},"setClass"),c7t=me(function(t,e,n){if("loose"===O().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith('"')&&t.endsWith('"')&&(t=t.substr(1,t.length-2)),r[e]=t}}0===r.length&&r.push(t),void 0!==i7t(t)&&h7t(t,()=>{tS.runFunc(e,...r)})}},"setClickFun"),h7t=me(function(e,r){uTt.push(function(){var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",function(){r()})},function(){var t=document.querySelector(`[id="${e}-text"]`);null!==t&&t.addEventListener("click",function(){r()})})},"pushFun"),u7t=me(function(t,e,r){t.split(",").forEach(function(t){c7t(t,e,r)}),l7t(t,"clickable")},"setClickEvent"),d7t=me(function(e){uTt.forEach(function(t){t(e)})},"bindFunctions"),p7t={getConfig:me(()=>O().gantt,"getConfig"),clear:yTt,setDateFormat:ETt,getDateFormat:ITt,enableInclusiveEndDates:CTt,endDatesAreInclusive:STt,enableTopAxis:_Tt,topAxisEnabled:ATt,setAxisFormat:vTt,getAxisFormat:xTt,setTickInterval:bTt,getTickInterval:wTt,setTodayMarker:kTt,getTodayMarker:TTt,setAccTitle:mh,getAccTitle:yh,setDiagramTitle:bh,getDiagramTitle:wh,setDisplayMode:LTt,getDisplayMode:NTt,setAccDescription:vh,getAccDescription:xh,addSection:BTt,getSections:$Tt,getTasks:FTt,addTask:n7t,findTaskById:i7t,addTaskOrg:a7t,setIncludes:RTt,getIncludes:MTt,setExcludes:DTt,getExcludes:OTt,setClickEvent:u7t,setLink:o7t,getLinks:PTt,bindFunctions:d7t,parseDuration:HTt,isInvalidDate:zTt,setWeekday:GTt,getWeekday:UTt,setWeekend:qTt},me(Xkt,"getTaskTags")}),E7t=b(()=>{g7t=q(yr(),1),t(),i6(),Oc(),Tu(),lh(),f7t=me(function(){D.debug("Something is calling, setConf, remove the call")},"setConf"),m7t={monday:hb,tuesday:ub,wednesday:db,thursday:pb,friday:gb,saturday:fb,sunday:cb},y7t=me((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),i=0;for(var a of n)for(let t=0;t<r.length;t++)if(a.startTime>=r[t]){r[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),x7t=me(function(t,l,e,p){let g=O().gantt,r=O().securityLevel,n,i=("sandbox"===r&&(n=H("#i"+l)),H("sandbox"===r?n.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?n.nodes()[0].contentDocument:document,a=s.getElementById(l),u=(void 0===(v7t=a.parentElement.offsetWidth)&&(v7t=1200),void 0!==g.useWidth&&(v7t=g.useWidth),p.db.getTasks()),d=[];for(var o of u)d.push(o.type);d=A(d);let c={},h=2*g.topPadding;if("compact"===p.db.getDisplayMode()||"compact"===g.displayMode){var f,m,y={};for(f of u)void 0===y[f.section]?y[f.section]=[f]:y[f.section].push(f);let t=0;for(m of Object.keys(y)){var v=y7t(y[m],t)+1;t+=v,h+=v*(g.barHeight+g.barGap),c[m]=v}}else{h+=u.length*(g.barHeight+g.barGap);for(let e of d)c[e]=u.filter(t=>t.type===e).length}a.setAttribute("viewBox","0 0 "+v7t+" "+h);let x=i.select(`[id="${l}"]`),b=p5().domain([Ju(u,function(t){return t.startTime}),Zu(u,function(t){return t.endTime})]).rangeRound([0,v7t-g.leftPadding-g.rightPadding]);function w(t,e){let r=t.startTime,n=e.startTime,i=0;return n<r?i=1:r<n&&(i=-1),i}function k(t,e,r){var n=g.barHeight,i=n+g.barGap,a=g.topPadding,s=g.leftPadding;Fx().domain([0,d.length]).range(["#00B9FA","#F95002"]).interpolate(Tf),E(i,a,s,0,r,t,p.db.getExcludes(),p.db.getIncludes()),C(s,a,0,r),T(t,i,a,s,n,0,e),S(i,a),_(s,0,0,r)}function T(t,r,n,i,c,e,h){t.sort((t,e)=>t.vert===e.vert?0:t.vert?1:-1);var a=[...new Set(t.map(t=>t.order))].map(e=>t.find(t=>t.order===e));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*r+n-2}).attr("width",function(){return h-g.rightPadding/2}).attr("height",r).attr("class",function(t){for(var[e,r]of d.entries())if(t.type===r)return"section section"+e%g.numberSectionStyles;return"section section0"}).enter();let s=x.append("g").selectAll("rect").data(t).enter(),o=p.db.getLinks();if(s.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?b(t.startTime)+i+.5*(b(t.endTime)-b(t.startTime))-.5*c:b(t.startTime)+i}).attr("y",function(t,e){return e=t.order,t.vert?g.gridLineStartPadding:e*r+n}).attr("width",function(t){return t.milestone?c:t.vert?.08*c:b(t.renderEndTime||t.endTime)-b(t.startTime)}).attr("height",function(t){return t.vert?u.length*(g.barHeight+g.barGap)+2*g.barHeight:c}).attr("transform-origin",function(t,e){return e=t.order,(b(t.startTime)+i+.5*(b(t.endTime)-b(t.startTime))).toString()+"px "+(e*r+n+.5*c).toString()+"px"}).attr("class",function(t){let e="",r=(0<t.classes.length&&(e=t.classes.join(" ")),0);for(var[n,i]of d.entries())t.type===i&&(r=n%g.numberSectionStyles);let a="";return t.active?t.crit?a+=" activeCrit":a=" active":t.done?a=t.crit?" doneCrit":" done":t.crit&&(a+=" crit"),0===a.length&&(a=" task"),t.milestone&&(a=" milestone "+a),t.vert&&(a=" vert "+a),"task"+(a=(a+=r)+(" "+e))}),s.append("text").attr("id",function(t){return t.id+"-text"}).text(function(t){return t.task}).attr("font-size",g.fontSize).attr("x",function(t){let e=b(t.startTime),r=b(t.renderEndTime||t.endTime);return t.milestone&&(e+=.5*(b(t.endTime)-b(t.startTime))-.5*c,r=e+c),t.vert?b(t.startTime)+i:(t=this.getBBox().width)>r-e?r+t+1.5*g.leftPadding>h?e+i-5:r+i+5:(r-e)/2+e+i}).attr("y",function(t,e){return t.vert?g.gridLineStartPadding+u.length*(g.barHeight+g.barGap)+60:t.order*r+g.barHeight/2+(g.fontSize/2-2)+n}).attr("text-height",c).attr("class",function(t){let e=b(t.startTime),r=b(t.endTime),n=(t.milestone&&(r=e+c),this.getBBox().width),i="",a=(0<t.classes.length&&(i=t.classes.join(" ")),0);for(var[s,o]of d.entries())t.type===o&&(a=s%g.numberSectionStyles);let l="";return t.active&&(l=t.crit?"activeCritText"+a:"activeText"+a),t.done?l=t.crit?l+" doneCritText"+a:l+" doneText"+a:t.crit&&(l=l+" critText"+a),t.milestone&&(l+=" milestoneText"),t.vert&&(l+=" vertText"),n>r-e?r+n+1.5*g.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+l:i+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+n:i+" taskText taskText"+a+" "+l+" width-"+n}),"sandbox"===O().securityLevel){let a=H("#i"+l).nodes()[0].contentDocument;s.filter(function(t){return o.has(t.id)}).each(function(t){var e=a.querySelector("#"+t.id),r=a.querySelector("#"+t.id+"-text"),n=e.parentNode,i=a.createElement("a");i.setAttribute("xlink:href",o.get(t.id)),i.setAttribute("target","_top"),n.appendChild(i),i.appendChild(e),i.appendChild(r)})}}function E(s,o,l,t,c,e,h,u){if(0!==h.length||0!==u.length){let i,a;for(var{startTime:r,endTime:n}of e)(void 0===i||r<i)&&(i=r),(void 0===a||n>a)&&(a=n);if(i&&a)if(5<(0,g7t.default)(a).diff((0,g7t.default)(i),"year"))D.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");else{let t=p.db.getDateFormat(),e=[],r=null,n=(0,g7t.default)(i);for(;n.valueOf()<=a;)p.db.isInvalidDate(n,t,h,u)?r?r.end=n:r={start:n,end:n}:r&&(e.push(r),r=null),n=n.add(1,"d");x.append("g").selectAll("rect").data(e).enter().append("rect").attr("id",t=>"exclude-"+t.start.format("YYYY-MM-DD")).attr("x",t=>b(t.start.startOf("day"))+l).attr("y",g.gridLineStartPadding).attr("width",t=>b(t.end.endOf("day"))-b(t.start.startOf("day"))).attr("height",c-o-g.gridLineStartPadding).attr("transform-origin",function(t,e){return(b(t.start)+l+.5*(b(t.end)-b(t.start))).toString()+"px "+(e*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function C(t,e,r,n){var i=p.db.getDateFormat(),i=p.db.getAxisFormat()||("D"===i?"%d":g.axisFormat??"%Y-%m-%d"),a=pd(b).tickSize(-n+e+g.gridLineStartPadding).tickFormat(o5(i)),s=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(p.db.getTickInterval()||g.tickInterval);if(null!==s){var o=s[1],l=s[2],c=p.db.getWeekday()||g.weekday;switch(l){case"millisecond":a.ticks(Yx.every(o));break;case"second":a.ticks(Hx.every(o));break;case"minute":a.ticks(Vx.every(o));break;case"hour":a.ticks(Kx.every(o));break;case"day":a.ticks(Qx.every(o));break;case"week":a.ticks(m7t[c].every(o));break;case"month":a.ticks(Tb.every(o))}}if(x.append("g").attr("class","grid").attr("transform","translate("+t+", "+(n-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),p.db.topAxisEnabled()||g.topAxis){var h=dd(b).tickSize(-n+e+g.gridLineStartPadding).tickFormat(o5(i));if(null!==s){var u=s[1],l=s[2],d=p.db.getWeekday()||g.weekday;switch(l){case"millisecond":h.ticks(Yx.every(u));break;case"second":h.ticks(Hx.every(u));break;case"minute":h.ticks(Vx.every(u));break;case"hour":h.ticks(Kx.every(u));break;case"day":h.ticks(Qx.every(u));break;case"week":h.ticks(m7t[d].every(u));break;case"month":h.ticks(Tb.every(u))}}x.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function S(r,n){let i=0,a=Object.keys(c).map(t=>[t,c[t]]);x.append("g").selectAll("text").data(a).enter().append(function(t){var e,r,n=-((t=t[0].split(L.lineBreakRegex)).length-1)/2,i=s.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for([e,r]of t.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0<e&&a.setAttribute("dy","1em"),a.textContent=r,i.appendChild(a)}return i}).attr("x",10).attr("y",function(t,e){return 0<e?(i+=a[e-1][1],t[1]*r/2+i*r+n):t[1]*r/2+n}).attr("font-size",g.sectionFontSize).attr("class",function(t){for(var[e,r]of d.entries())if(t[0]===r)return"sectionTitle sectionTitle"+e%g.numberSectionStyles;return"sectionTitle"})}function _(t,e,r,n){var i,a,s=p.db.getTodayMarker();"off"!==s&&(a=x.append("g").attr("class","today"),i=new Date,(a=a.append("line")).attr("x1",b(i)+t).attr("x2",b(i)+t).attr("y1",g.titleTopMargin).attr("y2",n-g.titleTopMargin).attr("class","today"),""!==s)&&a.attr("style",s.replace(/,/g,";"))}function A(r){var n={},i=[];for(let t=0,e=r.length;t<e;++t)Object.prototype.hasOwnProperty.call(n,r[t])||(n[r[t]]=!0,i.push(r[t]));return i}me(w,"taskCompare"),u.sort(w),k(u,v7t,h),Zc(x,h,v7t,g.useMaxWidth),x.append("text").text(p.db.getDiagramTitle()).attr("x",v7t/2).attr("y",g.titleTopMargin).attr("class","titleText"),me(k,"makeGantt"),me(T,"drawRects"),me(E,"drawExcludeDays"),me(C,"makeGrid"),me(S,"vertLabels"),me(_,"drawToday"),me(A,"checkUnique")},"draw"),b7t={setConf:f7t,draw:x7t}}),C7t=b(()=>{w7t=me(t=>` + .mermaid-main-font { + font-family: ${t.fontFamily}; + } + + .exclude-range { + fill: ${t.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${t.sectionBkgColor}; + } + + .section2 { + fill: ${t.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${t.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${t.titleColor}; + } + + .sectionTitle1 { + fill: ${t.titleColor}; + } + + .sectionTitle2 { + fill: ${t.titleColor}; + } + + .sectionTitle3 { + fill: ${t.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${t.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${t.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${t.fontFamily}; + fill: ${t.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${t.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${t.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${t.taskTextDarkColor}; + text-anchor: start; + font-family: ${t.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${t.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${t.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${t.taskBkgColor}; + stroke: ${t.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${t.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${t.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${t.activeTaskBkgColor}; + stroke: ${t.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${t.doneTaskBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${t.critBorderColor}; + fill: ${t.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .vert { + stroke: ${t.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${t.vertLineColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.titleColor||t.textColor}; + font-family: ${t.fontFamily}; + } +`,"getStyles"),k7t=w7t}),S7t={};KBt(S7t,{diagram:()=>_7t});var _7t,A7t,L7t,N7t,I7t,R7t,M7t,D7t,O7t,P7t=b(()=>{Wkt(),T7t(),E7t(),C7t(),_7t={parser:qkt,db:p7t,renderer:b7t,styles:k7t}}),B7t=b(()=>{v6t(),t(),A7t={parse:me(async t=>{t=await g6t("info",t),D.debug(t)},"parse")}}),$7t=b(()=>{L7t={name:"mermaid",version:"11.11.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.28.9","typedoc-plugin-markdown":"^4.8.0",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}}),F7t=b(()=>{$7t(),N7t={version:L7t.version+""},I7t=me(()=>N7t.version,"getVersion"),R7t={getVersion:I7t}}),z7t=b(()=>{i6(),Tu(),M7t=me(t=>{let e=O().securityLevel,r=H("body"),n;return"sandbox"===e&&(n=H("#i"+t).node()?.contentDocument??document,r=H(n.body)),r.select("#"+t)},"selectSvgElement")}),G7t=b(()=>{t(),z7t(),lh(),D7t=me((t,e,r)=>{D.debug(`rendering info diagram +`+t),t=M7t(e),Zc(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v"+r)},"draw"),O7t={draw:D7t}}),U7t={};KBt(U7t,{diagram:()=>q7t});var q7t,j7t,W7t,Y7t,H7t,V7t,X7t,K7t,Z7t,Q7t,J7t,t8t,e8t,r8t,n8t,i8t,a8t,s8t,o8t,l8t=b(()=>{B7t(),F7t(),G7t(),q7t={parser:A7t,db:R7t,renderer:O7t}}),c8t=b(()=>{t(),ku(),tn(),V7t=We.pie,j7t={sections:new Map,showData:!1,config:V7t},W7t=j7t.sections,Y7t=j7t.showData,H7t=structuredClone(V7t),V7t=me(()=>structuredClone(H7t),"getConfig"),X7t=me(()=>{W7t=new Map,Y7t=j7t.showData,fh()},"clear"),K7t=me(({label:t,value:e})=>{if(e<0)throw new Error(`"${t}" has invalid value: ${e}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);W7t.has(t)||(W7t.set(t,e),D.debug(`added new section: ${t}, with value: `+e))},"addSection"),Z7t=me(()=>W7t,"getSections"),Q7t=me(t=>{Y7t=t},"setShowData"),J7t=me(()=>Y7t,"getShowData"),t8t={getConfig:V7t,clear:X7t,setDiagramTitle:bh,getDiagramTitle:wh,setAccTitle:mh,getAccTitle:yh,setAccDescription:vh,getAccDescription:xh,addSection:K7t,getSections:Z7t,setShowData:Q7t,getShowData:J7t}}),h8t=b(()=>{v6t(),t(),k6t(),c8t(),e8t=me((t,e)=>{x6t(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),r8t={parse:me(async t=>{t=await g6t("pie",t),D.debug(t),e8t(t,t8t)},"parse")}}),u8t=b(()=>{n8t=me(t=>` + .pieCircle{ + stroke: ${t.pieStrokeColor}; + stroke-width : ${t.pieStrokeWidth}; + opacity : ${t.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${t.pieOuterStrokeColor}; + stroke-width: ${t.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${t.pieTitleTextSize}; + fill: ${t.pieTitleTextColor}; + font-family: ${t.fontFamily}; + } + .slice { + font-family: ${t.fontFamily}; + fill: ${t.pieSectionTextColor}; + font-size:${t.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${t.pieLegendTextColor}; + font-family: ${t.fontFamily}; + font-size: ${t.pieLegendTextSize}; + } +`,"getStyles"),i8t=n8t}),d8t=b(()=>{i6(),Tu(),t(),z7t(),lh(),iS(),a8t=me(t=>{let e=[...t.values()].reduce((t,e)=>t+e,0),r=[...t.entries()].map(([t,e])=>({label:t,value:e})).filter(t=>1<=t.value/e*100).sort((t,e)=>e.value-t.value);return l3().value(t=>t.value)(r)},"createPieArcs"),s8t=me((t,e,r,n)=>{D.debug(`rendering pie chart +`+t);let i=n.db,a=O(),s=SC(i.getConfig(),a.pie),o=M7t(e),l=o.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[n]=JC(t.pieOuterStrokeWidth);n??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=Y5().innerRadius(0).outerRadius(h),d=Y5().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+n/2).attr("class","pieOuterCircle"),i.getSections()),g=a8t(p),f=[t.pie1,t.pie2,t.pie3,t.pie4,t.pie5,t.pie6,t.pie7,t.pie8,t.pie9,t.pie10,t.pie11,t.pie12],m=0,y=(p.forEach(t=>{m+=t}),g.filter(t=>"0"!==(t.data.value/m*100).toFixed(0))),v=yx(f),x=(l.selectAll("mySlices").data(y).enter().append("path").attr("d",u).attr("fill",t=>v(t.data.label)).attr("class","pieCircle"),l.selectAll("mySlices").data(y).enter().append("text").text(t=>(t.data.value/m*100).toFixed(0)+"%").attr("transform",t=>"translate("+d.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),[...p.entries()].map(([t,e])=>({label:t,value:e}))),b=l.selectAll(".legend").data(x).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*x.length/2)+")");b.append("rect").attr("width",18).attr("height",18).style("fill",t=>v(t.label)).style("stroke",t=>v(t.label)),b.append("text").attr("x",22).attr("y",14).text(t=>i.getShowData()?t.label+` [${t.value}]`:t.label),e=512+Math.max(...b.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0)),o.attr("viewBox",`0 0 ${e} 450`),Zc(o,450,e,s.useMaxWidth)},"draw"),o8t={draw:s8t}}),p8t={};KBt(p8t,{diagram:()=>g8t});var g8t,f8t,m8t,y8t,v8t,x8t=b(()=>{h8t(),c8t(),u8t(),d8t(),g8t={parser:r8t,db:t8t,renderer:o8t,styles:i8t}}),b8t=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],s=[1,7],P=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[55,56,57],$=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],F=[1,14],z=[1,23],G=[1,18],U=[1,19],q=[1,20],j=[1,21],W=[1,22],Y=[1,24],H=[1,25],V=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],w=[1,62],k=[1,61],T=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],tt=[1,67],et=[1,68],rt=[1,69],nt=[1,70],it=[1,71],at=[1,72],st=[1,73],ot=[1,74],lt=[1,75],ct=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],C=[1,90],S=[1,91],_=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],R=[1,95],M=[1,97],D=[1,98],ht=[1,102],ut=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 23:this.$=a[o];break;case 24:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],n.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:n.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:n.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:n.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:n.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:n.setXAxisLeftText(a[o-2]),n.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",n.setXAxisLeftText(a[o-1]);break;case 53:n.setXAxisLeftText(a[o]);break;case 54:n.setYAxisBottomText(a[o-2]),n.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",n.setYAxisBottomText(a[o-1]);break;case 56:n.setYAxisBottomText(a[o]);break;case 57:n.setQuadrant1Text(a[o]);break;case 58:n.setQuadrant2Text(a[o]);break;case 59:n.setQuadrant3Text(a[o]);break;case 60:n.setQuadrant4Text(a[o]);break;case 64:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 66:this.$={text:a[o],type:"text"};break;case 67:this.$={text:a[o],type:"markdown"};break;case 68:this.$=a[o];break;case 69:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[{18:r,26:1,27:2,28:n,55:i,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:n,55:i,56:a,57:s},{18:r,26:9,27:2,28:n,55:i,56:a,57:s},e(P,[2,33],{29:10}),e(B,[2,61]),e(B,[2,62]),e(B,[2,63]),{1:[2,30]},{1:[2,31]},e(o,$,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(P,[2,34]),{27:45,55:i,56:a,57:s},e(o,[2,37]),e(o,$,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(o,[2,39]),e(o,[2,40]),e(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(o,[2,45]),e(o,[2,46]),{18:[1,50]},{4:l,5:c,10:h,12:u,13:d,14:p,43:51,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:x,67:b},e(T,[2,64]),e(T,[2,66]),e(T,[2,67]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(T,[2,79]),e(T,[2,80]),e(P,[2,35]),e(o,[2,38]),e(o,[2,42]),e(o,[2,43]),e(o,[2,44]),{3:64,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,21:63},e(o,[2,53],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,77],63:m,64:y,65:v,66:x,67:b}),e(o,[2,56],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,78],63:m,64:y,65:v,66:x,67:b}),e(o,[2,57],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,58],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,59],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,60],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),{45:[1,79]},{44:[1,80]},e(T,[2,65]),e(T,[2,81]),e(T,[2,82]),e(T,[2,83]),{3:82,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,18:[1,81]},e(E,[2,23]),e(E,[2,1]),e(E,[2,2]),e(E,[2,3]),e(E,[2,4]),e(E,[2,5]),e(E,[2,6]),e(E,[2,7]),e(E,[2,8]),e(E,[2,9]),e(E,[2,10]),e(E,[2,11]),e(E,[2,12]),e(o,[2,52],{58:31,43:83,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(o,[2,55],{58:31,43:84,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),{46:[1,85]},{45:[1,86]},{4:C,5:S,6:_,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:88,23:87},e(E,[2,24]),e(o,[2,51],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,54],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,47],{22:88,16:89,23:100,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{46:[1,101]},e(o,[2,29],{10:ht}),e(ut,[2,27],{16:103,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),e(O,[2,25]),e(O,[2,13]),e(O,[2,14]),e(O,[2,15]),e(O,[2,16]),e(O,[2,17]),e(O,[2,18]),e(O,[2,19]),e(O,[2,20]),e(O,[2,21]),e(O,[2,22]),e(o,[2,49],{10:ht}),e(o,[2,48],{22:88,16:89,23:104,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{4:C,5:S,6:_,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:105},e(O,[2,26]),e(o,[2,50],{10:ht}),e(ut,[2,28],{16:103,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D})],defaultActions:{8:[2,30],9:[2,31]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=n,me(t,"Parser"),(f8t=new((t.prototype=r).Parser=t)).parser=f8t,m8t=f8t}),w8t=b(()=>{i6(),tn(),t(),Xr(),y8t=Oe(),v8t=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{me(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:We.quadrantChart?.chartWidth||500,chartWidth:We.quadrantChart?.chartHeight||500,titlePadding:We.quadrantChart?.titlePadding||10,titleFontSize:We.quadrantChart?.titleFontSize||20,quadrantPadding:We.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:We.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:We.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:We.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:We.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:We.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:We.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:We.quadrantChart?.pointTextPadding||5,pointLabelFontSize:We.quadrantChart?.pointLabelFontSize||12,pointRadius:We.quadrantChart?.pointRadius||5,xAxisPosition:We.quadrantChart?.xAxisPosition||"top",yAxisPosition:We.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:We.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:We.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:y8t.quadrant1Fill,quadrant2Fill:y8t.quadrant2Fill,quadrant3Fill:y8t.quadrant3Fill,quadrant4Fill:y8t.quadrant4Fill,quadrant1TextFill:y8t.quadrant1TextFill,quadrant2TextFill:y8t.quadrant2TextFill,quadrant3TextFill:y8t.quadrant3TextFill,quadrant4TextFill:y8t.quadrant4TextFill,quadrantPointFill:y8t.quadrantPointFill,quadrantPointTextFill:y8t.quadrantPointTextFill,quadrantXAxisTextFill:y8t.quadrantXAxisTextFill,quadrantYAxisTextFill:y8t.quadrantYAxisTextFill,quadrantTitleFill:y8t.quadrantTitleFill,quadrantInternalBorderStrokeFill:y8t.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:y8t.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,D.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){D.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){D.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){var i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,t={top:"top"===t&&e?i:0,bottom:"bottom"===t&&e?i:0},e=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,i={left:"left"===this.config.yAxisPosition&&r?e:0,right:"right"===this.config.yAxisPosition&&r?e:0},r=this.config.titleFontSize+2*this.config.titlePadding,e={top:n?r:0},n=this.config.quadrantPadding+i.left,r=this.config.quadrantPadding+t.top+e.top,a=this.config.chartWidth-2*this.config.quadrantPadding-i.left-i.right,s=this.config.chartHeight-2*this.config.quadrantPadding-t.top-t.bottom-e.top;return{xAxisSpace:t,yAxisSpace:i,titleSpace:e,quadrantSpace:{quadrantLeft:n,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(t,e,r,n){var{quadrantSpace:n,titleSpace:i}=n,{quadrantHalfHeight:n,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:c}=n,h=!!this.data.xAxisRightText,u=!!this.data.yAxisTopText,d=[];return this.data.xAxisLeftText&&e&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(h?o/2:0),y:"top"===t?this.config.xAxisLabelPadding+i.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===t?this.config.xAxisLabelPadding+i.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&d.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+a-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&d.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+n-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(t){var e,{quadrantHalfHeight:t,quadrantLeft:r,quadrantHalfWidth:n,quadrantTop:i}=t=t.quadrantSpace;for(e of r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+n,y:i,width:n,height:t,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:i,width:n,height:t,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:i+t,width:n,height:t,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+n,y:i+t,width:n,height:t,fill:this.themeConfig.quadrant4Fill}])e.text.x=e.x+e.width/2,0===this.data.points.length?(e.text.y=e.y+e.height/2,e.text.horizontalPos="middle"):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos="top");return r}getQuadrantPoints(t){let e=t.quadrantSpace,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:a}=e,s=Fx().domain([0,1]).range([n,a+n]),o=Fx().domain([0,1]).range([r+i,i]);return this.data.points.map(t=>{var e=this.classes.get(t.className);return e&&(t={...e,...t}),{x:s(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:s(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){var e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:t,quadrantHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a,quadrantWidth:s}=t=t.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a,x2:n+s+e,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+s,y1:a+e,x2:n+s,y2:a+r-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a+r,x2:n+s+e,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:a+e,x2:n,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:a+e,x2:n+i,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+e,y1:a+t,x2:n+s-e,y2:a+t}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){var t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=0<this.data.points.length?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,t,e,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,t,e,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}}});function k8t(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function T8t(t){return!/^\d+$/.test(t)}function E8t(t){return!/^\d+px$/.test(t)}var C8t,S8t=b(()=>{C8t=class extends Error{static{me(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},me(k8t,"validateHexCode"),me(T8t,"validateNumber"),me(E8t,"validateSizeInPixels")});function _8t(t){return lc(t.trim(),U8t)}function A8t(t){q8t.setData({quadrant1Text:_8t(t.text)})}function L8t(t){q8t.setData({quadrant2Text:_8t(t.text)})}function N8t(t){q8t.setData({quadrant3Text:_8t(t.text)})}function I8t(t){q8t.setData({quadrant4Text:_8t(t.text)})}function R8t(t){q8t.setData({xAxisLeftText:_8t(t.text)})}function M8t(t){q8t.setData({xAxisRightText:_8t(t.text)})}function D8t(t){q8t.setData({yAxisTopText:_8t(t.text)})}function O8t(t){q8t.setData({yAxisBottomText:_8t(t.text)})}function P8t(t){var e,r={};for(e of t){var[n,i]=e.trim().split(/\s*:\s*/);if("radius"===n){if(T8t(i))throw new C8t(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(k8t(i))throw new C8t(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(k8t(i))throw new C8t(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if(E8t(i))throw new C8t(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function B8t(t,e,r,n,i){i=P8t(i),q8t.addPoints([{x:r,y:n,text:_8t(t.text),className:e,...i}])}function $8t(t,e){q8t.addClass(t,P8t(e))}function F8t(t){q8t.setConfig({chartWidth:t})}function z8t(t){q8t.setConfig({chartHeight:t})}function G8t(){var{themeVariables:t,quadrantChart:e}=O();return e&&q8t.setConfig(e),q8t.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),q8t.setData({titleText:wh()}),q8t.build()}var U8t,q8t,j8t,W8t,Y8t,H8t,V8t=b(()=>{Tu(),Oc(),ku(),w8t(),S8t(),U8t=O(),me(_8t,"textSanitizer"),q8t=new v8t,me(A8t,"setQuadrant1Text"),me(L8t,"setQuadrant2Text"),me(N8t,"setQuadrant3Text"),me(I8t,"setQuadrant4Text"),me(R8t,"setXAxisLeftText"),me(M8t,"setXAxisRightText"),me(D8t,"setYAxisTopText"),me(O8t,"setYAxisBottomText"),me(P8t,"parseStyles"),me(B8t,"addPoint"),me($8t,"addClass"),me(F8t,"setWidth"),me(z8t,"setHeight"),me(G8t,"getQuadrantData"),j8t=me(function(){q8t.clear(),fh()},"clear"),W8t={setWidth:F8t,setHeight:z8t,setQuadrant1Text:A8t,setQuadrant2Text:L8t,setQuadrant3Text:N8t,setQuadrant4Text:I8t,setXAxisLeftText:R8t,setXAxisRightText:M8t,setYAxisTopText:D8t,setYAxisBottomText:O8t,parseStyles:P8t,addPoint:B8t,addClass:$8t,getQuadrantData:G8t,clear:j8t,setAccTitle:mh,getAccTitle:yh,setDiagramTitle:bh,getDiagramTitle:wh,getAccDescription:xh,setAccDescription:vh}}),X8t=b(()=>{i6(),Tu(),t(),lh(),Y8t=me((t,e,r,n)=>{function i(t){return"top"===t?"hanging":"middle"}function a(t){return"left"===t?"start":"middle"}function s(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(i,"getDominantBaseLine"),me(a,"getTextAnchor"),me(s,"getTransformation");var o=O();D.debug(`Rendering quadrant chart +`+t);let l=o.securityLevel,c;"sandbox"===l&&(c=H("#i"+e));var e=(t=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(Zc(t,u,h,o.quadrantChart?.useMaxWidth??!0),t.attr("viewBox","0 0 "+h+" "+u),n.db.setHeight(u),n.db.setWidth(h),n.db.getQuadrantData()),t=e.append("g").attr("class","quadrants"),u=e.append("g").attr("class","border"),h=e.append("g").attr("class","data-points"),n=e.append("g").attr("class","labels"),e=e.append("g").attr("class","title");o.title&&e.append("text").attr("x",0).attr("y",0).attr("fill",o.title.fill).attr("font-size",o.title.fontSize).attr("dominant-baseline",i(o.title.horizontalPos)).attr("text-anchor",a(o.title.verticalPos)).attr("transform",s(o.title)).text(o.title.text),o.borderLines&&u.selectAll("line").data(o.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth),(e=t.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),e.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text)).text(t=>t.text.text),n.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>i(t.horizontalPos)).attr("text-anchor",t=>a(t.verticalPos)).attr("transform",t=>s(t)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text))},"draw"),H8t={draw:Y8t}}),K8t={};KBt(K8t,{diagram:()=>Z8t});var Z8t,Q8t,J8t,tEt=b(()=>{b8t(),V8t(),X8t(),Z8t={parser:m8t,db:W8t,renderer:H8t,styles:me(()=>"","styles")}}),eEt=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[1,3],a=[1,5],s=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],E=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],n={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 5:n.setOrientation(a[o]);break;case 9:n.setDiagramTitle(a[o].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[o]);break;case 13:n.setLineData(a[o-1],a[o]);break;case 14:n.setBarData({text:"",type:"text"},a[o]);break;case 15:n.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 19:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:n.setXAxisTitle(a[o]);break;case 23:n.setXAxisTitle(a[o-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[o]);break;case 26:n.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 27:this.$=a[o-1];break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:n.setYAxisTitle(a[o]);break;case 31:n.setYAxisTitle(a[o-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[e(r,n,{3:1,4:2,7:4,5:i,34:a,35:s,36:o}),{1:[3]},e(r,n,{4:2,7:4,3:8,5:i,34:a,35:s,36:o}),e(r,n,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:a,35:s,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(l,[2,34]),e(l,[2,35]),e(l,[2,36]),{1:[2,1]},e(r,n,{4:2,7:4,3:21,5:i,34:a,35:s,36:o}),{1:[2,3]},e(l,[2,5]),e(r,[2,7],{4:22,34:a,35:s,36:o}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:39,13:38,24:w,27:k,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:45,15:44,27:T,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:49,17:48,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:52,17:51,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{20:[1,53]},{22:[1,54]},e(C,[2,18]),{1:[2,2]},e(C,[2,8]),e(C,[2,9]),e(S,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),e(S,[2,38]),e(S,[2,39]),e(_,[2,40]),e(_,[2,42]),e(_,[2,43]),e(_,[2,44]),e(_,[2,45]),e(_,[2,46]),e(_,[2,47]),e(_,[2,48]),e(_,[2,49]),e(_,[2,50]),e(_,[2,51]),e(C,[2,10]),e(C,[2,22],{30:41,29:56,24:w,27:k}),e(C,[2,24]),e(C,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},e(C,[2,11]),e(C,[2,30],{33:60,27:T}),e(C,[2,32]),{31:[1,61]},e(C,[2,12]),{17:62,24:E},{25:63,27:A},e(C,[2,14]),{17:65,24:E},e(C,[2,16]),e(C,[2,17]),e(_,[2,41]),e(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(C,[2,31]),{27:[1,69]},e(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(C,[2,15]),e(C,[2,26]),e(C,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},e(C,[2,33]),e(C,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};n.lexer=i,me(t,"Parser"),(Q8t=new((t.prototype=n).Parser=t)).parser=Q8t,J8t=Q8t});function rEt(t){return"bar"===t.type}function nEt(t){return"band"===t.type}function iEt(t){return"linear"===t.type}var aEt,sEt,oEt,lEt,cEt=b(()=>{me(rEt,"isBarPlot"),me(nEt,"isBandAxisData"),me(iEt,"isLinearAxisData")}),hEt=b(()=>{JL(),aEt=class{constructor(t){this.parentGroup=t}static{me(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((t,e)=>Math.max(e.length,t),0)*e,height:e};var r,n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(r of t){var a=(s=VL(i,1,r))?s.width:r.length*e,s=s?s.height:e;n.width=Math.max(n.width,a),n.height=Math.max(n.height,s)}return i.remove(),n}}}),uEt=b(()=>{sEt=class{constructor(t,e,r,n){this.axisConfig=t,this.title=e,this.textDimensionCalculator=r,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{me(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){var t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;var r,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.width,this.outerPadding=Math.min(r.width/2,n),n=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,n<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=e)&&(e-=n,this.showTitle=!0),this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;var r,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.height,this.outerPadding=Math.min(r.height/2,n),(n=r.width+2*this.axisConfig.labelPadding)<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=e)&&(e-=n,this.showTitle=!0),this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},`+this.getScaleValue(t),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),r}getDrawableElementsForBottomAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},`+(e+this.axisConfig.tickLength),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),r}getDrawableElementsForTopAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},`+(e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),r}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}}}),dEt=b(()=>{i6(),t(),uEt(),oEt=class extends sEt{static{me(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=bx().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=bx().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),D.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}}}),pEt=b(()=>{i6(),uEt(),lEt=class extends sEt{static{me(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=Fx().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=Fx().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function gEt(t,e,r,n){return n=new aEt(n),nEt(t)?new oEt(e,r,t.categories,t.title,n):new lEt(e,r,[t.min,t.max],t.title,n)}var fEt=b(()=>{cEt(),hEt(),dEt(),pEt(),me(gEt,"getAxis")});function mEt(t,e,r,n){return n=new aEt(n),new yEt(n,t,e,r)}var yEt,vEt,xEt,bEt=b(()=>{hEt(),yEt=class{constructor(t,e,r,n){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{me(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){var e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),t=Math.max(e.width,t.width),r=e.height+2*this.chartConfig.titlePadding;return e.width<=t&&e.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=t,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},me(mEt,"getChartTitleComponent")}),wEt=b(()=>{i6(),vEt=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{me(this,"LinePlot")}getDrawableElement(){var t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);return(t=("horizontal"===this.orientation?r3().y(t=>t[0]).x(t=>t[1]):r3().x(t=>t[0]).y(t=>t[1]))(t))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),kEt=b(()=>{xEt=class{constructor(t,e,r,n,i,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{me(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-r,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:t[0]-r,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function TEt(t,e,r){return new EEt(t,e,r)}var EEt,CEt,SEt,_Et=b(()=>{wEt(),kEt(),EEt=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{me(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");var t,e,r=[];for([t,e]of this.chartData.plots.entries())switch(e.type){case"line":var n=new vEt(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);r.push(...n.getDrawableElement());break;case"bar":n=new xEt(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t),r.push(...n.getDrawableElement())}return r}},me(TEt,"getPlotComponent")}),AEt=b(()=>{fEt(),bEt(),_Et(),cEt(),CEt=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:mEt(t,e,r,n),plot:TEt(t,e,r),xAxis:gEt(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:gEt(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{me(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,n=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=s.height})).height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),e-=this.componentStore.xAxis.calculateSpace({width:t,height:e}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:t,height:e})).width,0<(t-=s.width)&&(i+=t),0<e&&(a+=e),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([r,r+i]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+a}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(t=>rEt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=o.height})).height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),t-=(o=this.componentStore.xAxis.calculateSpace({width:t,height:e})).width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),e-=(o=this.componentStore.yAxis.calculateSpace({width:t,height:e})).height,i=r+o.height,0<t&&(a+=t),0<e&&(s+=e),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(t=>rEt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var t,e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}}}),LEt=b(()=>{AEt(),SEt=class{static{me(this,"XYChartBuilder")}static build(t,e,r,n){return new CEt(t,e,r,n).getDrawableElement()}}});function NEt(){var t=Oe(),e=ar();return SC(t.xyChart,e.themeVariables.xyChart)}function IEt(){var t=ar();return SC(We.xyChart,t.xyChart)}function REt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function MEt(t){var e=ar();return lc(t.trim(),e)}function DEt(t){ZEt=t}function OEt(t){QEt.chartOrientation="horizontal"===t?"horizontal":"vertical"}function PEt(t){tCt.xAxis.title=MEt(t.text)}function BEt(t,e){tCt.xAxis={type:"linear",title:tCt.xAxis.title,min:t,max:e},rCt=!0}function $Et(t){tCt.xAxis={type:"band",title:tCt.xAxis.title,categories:t.map(t=>MEt(t.text))},rCt=!0}function FEt(t){tCt.yAxis.title=MEt(t.text)}function zEt(t,e){tCt.yAxis={type:"linear",title:tCt.yAxis.title,min:t,max:e},nCt=!0}function GEt(t){var e=Math.min(...t),t=Math.max(...t),r=iEt(tCt.yAxis)?tCt.yAxis.min:1/0,n=iEt(tCt.yAxis)?tCt.yAxis.max:-1/0;tCt.yAxis={type:"linear",title:tCt.yAxis.title,min:Math.min(r,e),max:Math.max(n,t)}}function UEt(r){let t=[],e;if(0!==r.length&&(rCt||(n=iEt(tCt.xAxis)?tCt.xAxis.min:1/0,e=iEt(tCt.xAxis)?tCt.xAxis.max:-1/0,BEt(Math.min(n,1),Math.max(e,r.length))),nCt||GEt(r),nEt(tCt.xAxis)&&(t=tCt.xAxis.categories.map((t,e)=>[t,r[e]])),iEt(tCt.xAxis))){var n=tCt.xAxis.min,i=tCt.xAxis.max,a=(i-n)/(r.length-1),s=[];for(let t=n;t<=i;t+=a)s.push(""+t);t=s.map((t,e)=>[t,r[e]])}return t}function qEt(t){return eCt[0===t?0:t%eCt.length]}function jEt(t,e){e=UEt(e),tCt.plots.push({type:"line",strokeFill:qEt(KEt),strokeWidth:2,data:e}),KEt++}function WEt(t,e){e=UEt(e),tCt.plots.push({type:"bar",fill:qEt(KEt),data:e}),KEt++}function YEt(){if(0===tCt.plots.length)throw Error("No Plot to render, please provide a plot with some data");return tCt.title=wh(),SEt.build(QEt,tCt,JEt,ZEt)}function HEt(){return JEt}function VEt(){return QEt}function XEt(){return tCt}var KEt,ZEt,QEt,JEt,tCt,eCt,rCt,nCt,iCt,aCt,sCt,oCt,lCt=b(()=>{rn(),tn(),Xr(),iS(),Oc(),ku(),LEt(),cEt(),KEt=0,QEt=IEt(),JEt=NEt(),tCt=REt(),eCt=JEt.plotColorPalette.split(",").map(t=>t.trim()),nCt=rCt=!1,me(NEt,"getChartDefaultThemeConfig"),me(IEt,"getChartDefaultConfig"),me(REt,"getChartDefaultData"),me(MEt,"textSanitizer"),me(DEt,"setTmpSVGG"),me(OEt,"setOrientation"),me(PEt,"setXAxisTitle"),me(BEt,"setXAxisRangeData"),me($Et,"setXAxisBand"),me(FEt,"setYAxisTitle"),me(zEt,"setYAxisRangeData"),me(GEt,"setYAxisRangeFromPlotData"),me(UEt,"transformDataWithoutCategory"),me(qEt,"getPlotColorFromPalette"),me(jEt,"setLineData"),me(WEt,"setBarData"),me(YEt,"getDrawableElem"),me(HEt,"getChartThemeConfig"),me(VEt,"getChartConfig"),me(XEt,"getXYChartData"),iCt=me(function(){fh(),KEt=0,QEt=IEt(),tCt=REt(),JEt=NEt(),eCt=JEt.plotColorPalette.split(",").map(t=>t.trim()),nCt=rCt=!1},"clear"),aCt={getDrawableElem:YEt,clear:iCt,setAccTitle:mh,getAccTitle:yh,setDiagramTitle:bh,getDiagramTitle:wh,getAccDescription:xh,setAccDescription:vh,setOrientation:OEt,setXAxisTitle:PEt,setXAxisRangeData:BEt,setXAxisBand:$Et,setYAxisTitle:FEt,setYAxisRangeData:zEt,setLineData:jEt,setBarData:WEt,setTmpSVGG:DEt,getChartThemeConfig:HEt,getChartConfig:VEt,getXYChartData:XEt}}),cCt=b(()=>{t(),z7t(),lh(),sCt=me((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig(),o=i.getXYChartData().plots[0].data.map(t=>t[1]);function l(t){return"top"===t?"text-before-edge":"middle"}function c(t){return"left"===t?"start":"right"===t?"end":"middle"}function h(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(l,"getDominantBaseLine"),me(c,"getTextAnchor"),me(h,"getTextTransformation"),D.debug(`Rendering xychart chart +`+t);let u=M7t(e),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(Zc(u,s.height,s.width,!0),u.attr("viewBox",`0 0 ${s.width} `+s.height),p.attr("fill",a.backgroundColor),i.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group")),i.getDrawableElem()),f={};function m(e){let r=d,n="";for(var[i]of e.entries()){let t=d;0<i&&f[n]&&(t=f[n]),n+=e[i],r=(r=f[n])||(f[n]=t.append("g").attr("class",e[i]))}return r}me(m,"getGroup");for(var y of g)if(0!==y.data.length){var v=m(y.groupTexts);switch(y.type){case"rect":if(v.selectAll("rect").data(y.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),s.showDataLabel)if("horizontal"===s.chartOrientation){let n=function(t,e){var{data:t,label:r}=t;return e*r.length*.7<=t.width-10};n,me(n,"fitsHorizontally");var x=(b=y.data.map((t,e)=>({data:t,label:o[e].toString()})).filter(t=>0<t.data.width&&0<t.data.height)).map(t=>{let e=t.data,r=.7*e.height;for(;!n(t,r)&&0<r;)--r;return r}),x=Math.floor(Math.min(...x));v.selectAll("text").data(b).enter().append("text").attr("x",t=>t.data.x+t.data.width-10).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",x+"px").text(t=>t.label)}else{let i=function(t,e,r){var{data:t,label:n}=t,n=e*n.length*.7,i=t.x+t.width/2;return t.x<=i-n/2&&i+n/2<=t.x+t.width&&t.y+r+e<=t.y+t.height};i,me(i,"fitsInBar");var b,x=(b=y.data.map((t,e)=>({data:t,label:o[e].toString()})).filter(t=>0<t.data.width&&0<t.data.height)).map(t=>{let{data:e,label:r}=t,n=e.width/(.7*r.length);for(;!i(t,n,10)&&0<n;)--n;return n}),w=Math.floor(Math.min(...x));v.selectAll("text").data(b).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",t=>t.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",w+"px").text(t=>t.label)}break;case"text":v.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>l(t.verticalPos)).attr("text-anchor",t=>c(t.horizontalPos)).attr("transform",t=>h(t)).text(t=>t.text);break;case"path":v.selectAll("path").data(y.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill||"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw"),oCt={draw:sCt}}),hCt={};KBt(hCt,{diagram:()=>uCt});var uCt,dCt,pCt,gCt,fCt,mCt,yCt=b(()=>{eEt(),lCt(),cCt(),uCt={parser:J8t,db:aCt,renderer:oCt}}),vCt=b(()=>{function P(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],B=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],s=[2,7],o=[1,26],l=[1,27],c=[1,28],h=[1,29],u=[1,33],d=[1,34],p=[1,35],g=[1,36],f=[1,37],m=[1,38],y=[1,24],v=[1,31],x=[1,32],b=[1,30],w=[1,39],k=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],C=[89,90],$=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],F=[27,29],z=[1,70],G=[1,71],U=[1,72],q=[1,73],j=[1,74],W=[1,75],Y=[1,76],S=[1,83],_=[1,80],H=[1,84],V=[1,85],X=[1,86],K=[1,87],Z=[1,88],Q=[1,89],J=[1,90],tt=[1,91],et=[1,92],rt=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[63,64],nt=[1,101],it=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],L=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],N=[1,110],I=[1,106],R=[1,107],M=[1,108],D=[1,109],O=[1,111],at=[1,116],st=[1,117],ot=[1,114],lt=[1,115],e={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(a[o-3],a[o-4]);break;case 22:n.addRequirement(a[o-5],a[o-6]),n.setClass([a[o-5]],a[o-3]);break;case 23:n.setNewReqId(a[o-2]);break;case 24:n.setNewReqText(a[o-2]);break;case 25:n.setNewReqRisk(a[o-2]);break;case 26:n.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(a[o-3]);break;case 43:n.addElement(a[o-5]),n.setClass([a[o-5]],a[o-3]);break;case 44:n.setNewElementType(a[o-2]);break;case 45:n.setNewElementDocRef(a[o-2]);break;case 48:n.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:n.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 58:n.setClass(a[o-1],a[o]);break;case 59:n.setClass([a[o-2]],a[o]);break;case 60:case 62:this.$=[a[o]];break;case 61:case 63:this.$=a[o-2].concat([a[o]]);break;case 64:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 65:this.$=[a[o]];break;case 66:a[o-2].push(a[o]),this.$=a[o-2];break;case 68:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(B,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:a,7:13,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},t(B,[2,4]),t(B,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:43,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:44,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:45,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:46,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:47,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:48,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:49,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:50,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:w,90:k},{30:63,33:62,75:E,89:w,90:k},{30:64,33:62,75:E,89:w,90:k},t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),t($,[2,81]),t($,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(F,[2,79]),t(F,[2,80]),{27:[1,67],29:[1,68]},t(F,[2,85]),t(F,[2,86]),{62:69,65:z,66:G,67:U,68:q,69:j,70:W,71:Y},{62:77,65:z,66:G,67:U,68:q,69:j,70:W,71:Y},{30:78,33:62,75:E,89:w,90:k},{73:79,75:S,76:_,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,60]),t(rt,[2,62]),{73:93,75:S,76:_,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},{30:94,33:62,75:E,76:_,89:w,90:k},{5:[1,95]},{30:96,33:62,75:E,89:w,90:k},{5:[1,97]},{30:98,33:62,75:E,89:w,90:k},{63:[1,99]},t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),t(A,[2,53]),t(A,[2,54]),t(A,[2,55]),t(A,[2,56]),{64:[1,100]},t(T,[2,59],{76:_}),t(T,[2,64],{76:nt}),{33:103,75:[1,102],89:w,90:k},t(it,[2,65],{79:104,75:S,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),t(L,[2,67]),t(L,[2,69]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(T,[2,57],{76:nt}),t(T,[2,58],{76:_}),{5:N,28:105,31:I,34:R,36:M,38:D,40:O},{27:[1,112],76:_},{5:at,40:st,56:113,57:ot,59:lt},{27:[1,118],76:_},{33:119,89:w,90:k},{33:120,89:w,90:k},{75:S,78:121,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,61]),t(rt,[2,63]),t(L,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:N,28:126,31:I,34:R,36:M,38:D,40:O},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:at,40:st,56:130,57:ot,59:lt},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(it,[2,66],{79:104,75:S,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),{33:132,89:w,90:k},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(T,[2,27]),{5:N,28:145,31:I,34:R,36:M,38:D,40:O},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:at,40:st,56:152,57:ot,59:lt},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:N,28:159,31:I,34:R,36:M,38:D,40:O},{5:N,28:160,31:I,34:R,36:M,38:D,40:O},{5:N,28:161,31:I,34:R,36:M,38:D,40:O},{5:N,28:162,31:I,34:R,36:M,38:D,40:O},{5:at,40:st,56:163,57:ot,59:lt},{5:at,40:st,56:164,57:ot,59:lt},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},B={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return e.yytext=e.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};e.lexer=B,me(P,"Parser"),(dCt=new((P.prototype=e).Parser=P)).parser=dCt,pCt=dCt}),xCt=b(()=>{Tu(),t(),ku(),gCt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=mh,this.getAccTitle=yh,this.setAccDescription=vh,this.getAccDescription=xh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getConfig=me(()=>O().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{me(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),D.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,r){this.relations.push({type:t,src:e,dst:r})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,fh()}setCssStyle(t,e){for(var r of t){var n,i=this.requirements.get(r)??this.elements.get(r);if(!e||!i)return;for(n of e)n.includes(",")?i.cssStyles.push(...n.split(",")):i.cssStyles.push(n)}}setClass(t,e){for(var r of t){var n=this.requirements.get(r)??this.elements.get(r);if(n)for(var i of e)n.classes.push(i),(i=this.classes.get(i)?.styles)&&n.cssStyles.push(...i)}}defineClass(t,n){for(let e of t){let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),n&&n.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.requirements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...n.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...n.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){var t,e,r,n=O(),i=[],a=[];for(t of this.requirements.values()){var s=t;s.id=t.name,s.cssStyles=t.cssStyles,s.cssClasses=t.classes.join(" "),s.shape="requirementBox",s.look=n.look,i.push(s)}for(e of this.elements.values()){var o=e;o.shape="requirementBox",o.look=n.look,o.id=e.name,o.cssStyles=e.cssStyles,o.cssClasses=e.classes.join(" "),i.push(o)}for(r of this.relations){var l=r.type===this.Relationships.CONTAINS,l={id:r.src+`-${r.dst}-0`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`<<${r.type}>>`,classes:"relationshipLine",style:["fill:none",l?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:l?"normal":"dashed",arrowTypeStart:l?"requirement_contains":"",arrowTypeEnd:l?"":"requirement_arrow",look:n.look};a.push(l)}return{nodes:i,edges:a,other:{},config:n,direction:this.getDirection()}}}}),bCt=b(()=>{fCt=me(t=>` + + marker { + fill: ${t.relationColor}; + stroke: ${t.relationColor}; + } + + marker.cross { + stroke: ${t.lineColor}; + } + + svg { + font-family: ${t.fontFamily}; + font-size: ${t.fontSize}; + } + + .reqBox { + fill: ${t.requirementBackground}; + fill-opacity: 1.0; + stroke: ${t.requirementBorderColor}; + stroke-width: ${t.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${t.requirementTextColor}; + } + .reqLabelBox { + fill: ${t.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${t.requirementBorderColor}; + stroke-width: ${t.requirementBorderSize}; + } + .relationshipLine { + stroke: ${t.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${t.relationLabelColor}; + } + .divider { + stroke: ${t.nodeBorder}; + stroke-width: 1; + } + .label { + font-family: ${t.fontFamily}; + color: ${t.nodeTextColor||t.textColor}; + } + .label text,span { + fill: ${t.nodeTextColor||t.textColor}; + color: ${t.nodeTextColor||t.textColor}; + } + .labelBkg { + background-color: ${t.edgeLabelBackground}; + } + +`,"getStyles"),mCt=fCt}),wCt={};KBt(wCt,{draw:()=>kCt});var kCt,TCt=b(()=>{Tu(),t(),iO(),cct(),hct(),iS(),kCt=me(async function(t,e,r,n){D.info("REF0:"),D.info("Drawing requirement diagram (unified)",e);var{securityLevel:i,state:a,layout:s}=O(),o=n.db.getData(),i=WD(e,i);o.type=n.type,o.layoutAlgorithm=Hlt(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=e,await Ylt(o,i),tS.insertTitle(i,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Vlt(i,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),ECt={};KBt(ECt,{diagram:()=>CCt});var CCt,SCt,_Ct,ACt,LCt,NCt,ICt,RCt,MCt,DCt,OCt,PCt,BCt,$Ct,FCt,zCt,GCt,UCt,qCt,jCt,WCt,YCt,HCt,VCt,XCt,KCt,ZCt,QCt,JCt,tSt,eSt,rSt,nSt,iSt,aSt,sSt,oSt,lSt,cSt,hSt,uSt,dSt,pSt,gSt,fSt,mSt,ySt,vSt,xSt,bSt,wSt=b(()=>{vCt(),xCt(),bCt(),TCt(),CCt={parser:pCt,get db(){return new gCt},renderer:wCt,styles:mCt}}),kSt=b(()=>{function P(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,2],B=[1,3],$=[1,4],r=[2,4],n=[1,9],i=[1,11],a=[1,13],s=[1,14],o=[1,16],l=[1,17],c=[1,18],h=[1,24],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],k=[1,36],T=[1,37],E=[1,38],C=[1,39],S=[1,41],_=[1,42],A=[1,43],L=[1,44],N=[1,45],I=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],F=[2,71],M=[4,5,16,50,52,53],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],G=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],q=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],D=[69,70,71],O=[1,127],e={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.apply(a[o]),a[o];case 4:case 9:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:this.$=a[o];break;case 8:case 13:this.$=[];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16:a[o-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:n.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:n.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:n.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 49:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 53:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 54:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 55:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 59:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 62:this.$=[a[o-2],a[o]];break;case 63:this.$=a[o];break;case 64:this.$=n.PLACEMENT.LEFTOF;break;case 65:this.$=n.PLACEMENT.RIGHTOF;break;case 66:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 67:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 68:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 69:this.$={type:"addParticipant",actor:a[o-1],config:a[o]};break;case 70:this.$=a[o-1].trim();break;case 71:this.$={type:"addParticipant",actor:a[o]};break;case 72:this.$=n.LINETYPE.SOLID_OPEN;break;case 73:this.$=n.LINETYPE.DOTTED_OPEN;break;case 74:this.$=n.LINETYPE.SOLID;break;case 75:this.$=n.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=n.LINETYPE.DOTTED;break;case 77:this.$=n.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=n.LINETYPE.SOLID_CROSS;break;case 79:this.$=n.LINETYPE.DOTTED_CROSS;break;case 80:this.$=n.LINETYPE.SOLID_POINT;break;case 81:this.$=n.LINETYPE.DOTTED_POINT;break;case 82:this.$=n.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:B,6:$},{1:[3]},{3:5,4:e,5:B,6:$},{3:6,4:e,5:B,6:$},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:i,8:8,9:10,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:S,60:_,61:A,62:L,63:N,71:I},t(R,[2,5]),{9:47,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:S,60:_,61:A,62:L,63:N,71:I},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:T,52:E,53:C},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:I},{22:55,71:I},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:I},{22:75,71:I},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:I},{22:92,71:I},{22:93,71:I},{22:94,71:I},t([5,51,65,76,77,78,79,80,81,82,83,84,85,86],F),t(R,[2,6]),t(R,[2,15]),t(M,[2,9],{10:95}),t(R,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},t(R,[2,21]),{5:[1,99]},{5:[1,100]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t(z,r,{7:101}),t(z,r,{7:102}),t(z,r,{7:103}),t(G,r,{40:104,7:105}),t(U,r,{42:106,7:107}),t(U,r,{7:107,42:108}),t(q,r,{45:109,7:110}),t(z,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},t([5,51],F,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:I},t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),t(D,[2,79]),t(D,[2,80]),t(D,[2,81]),{22:123,71:I},{22:125,59:124,71:I},{71:[2,64]},{71:[2,65]},{57:126,86:O},{57:128,86:O},{57:129,86:O},{57:130,86:O},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:T,52:E,53:C},{5:[1,136]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,137],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:S,60:_,61:A,62:L,63:N,71:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,138],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:S,60:_,61:A,62:L,63:N,71:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,139],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:S,60:_,61:A,62:L,63:N,71:I},{16:[1,140]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,46],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,49:[1,141],50:T,52:E,53:C,55:S,60:_,61:A,62:L,63:N,71:I},{16:[1,142]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,44],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,48:[1,143],50:T,52:E,53:C,55:S,60:_,61:A,62:L,63:N,71:I},{16:[1,144]},{16:[1,145]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,42],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,47:[1,146],50:T,52:E,53:C,55:S,60:_,61:A,62:L,63:N,71:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,147],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:S,60:_,61:A,62:L,63:N,71:I},{15:[1,148]},t(R,[2,49]),t(R,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},t(R,[2,51]),t(R,[2,52]),{22:151,71:I},{22:152,71:I},{57:153,86:O},{57:154,86:O},{57:155,86:O},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},t(R,[2,16]),t(M,[2,10]),{12:157,50:T,52:E,53:C},t(M,[2,12]),t(M,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,158]},t(R,[2,38]),{15:[1,159]},t(R,[2,39]),t(R,[2,40]),{15:[1,160]},t(R,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:O},{57:165,86:O},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:I},t(M,[2,11]),t(G,r,{7:105,40:167}),t(U,r,{7:107,42:168}),t(q,r,{7:110,45:169}),t(R,[2,48]),{5:[2,70]},t(R,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},B={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:return e.yytext=e.yytext.trim(),71;case 11:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 17:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),71;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 56:return 5;case 57:return e.yytext=e.yytext.trim(),71;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:case 69:return 86;case 70:return 69;case 71:return 70;case 72:return 5;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}};e.lexer=B,me(P,"Parser"),(SCt=new((P.prototype=e).Parser=P)).parser=SCt,_Ct=SCt}),TSt=b(()=>{Tu(),F9(),t(),E6t(),Oc(),ku(),ACt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},LCt={FILLED:0,OPEN:1},NCt={LEFTOF:0,RIGHTOF:1,OVER:2},ICt={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},RCt=class{constructor(){this.state=new w6t(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=mh,this.setAccDescription=vh,this.setDiagramTitle=bh,this.getAccTitle=yh,this.getAccDescription=xh,this.getDiagramTitle=wh,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(O().wrap),this.LINETYPE=ACt,this.ARROWTYPE=LCt,this.PLACEMENT=NCt}static{me(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,r,n,i){let a=this.state.records.currentBox,s,o;if(void 0!==i&&(o=i.includes(` +`)?i+` +`:`{ +`+i+` +}`,s=$9(o,{schema:B9})),n=s?.type??n,i=this.state.records.actors.get(t)){if(this.state.records.currentBox&&i.box&&this.state.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=i.box||this.state.records.currentBox,i.box=a,i&&e===i.name&&null==r)return}null==r?.text&&(r={text:e,type:n}),null!=n&&null!=r.text||(r={text:e,type:n}),this.state.records.actors.set(t,{box:a,name:e,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor&&(i=this.state.records.actors.get(this.state.records.prevActor))&&(i.nextActor=t),this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,r=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&r++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&r--;return r}addMessage(t,e,r,n){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:r.text,wrap:r.wrap??this.autoWrap(),answer:n})}addSignal(t,e,r,n,i=!1){var a;if(n===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1)throw(a=new Error("Trying to inactivate an inactive participant ("+t+")")).hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a;return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:n,activate:i}),!0}hasAtLeastOneBox(){return 0<this.state.records.boxes.length}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();var e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:O().sequence?.wrap??!1}clear(){this.state.reset(),fh()}parseMessage(t){var t=t.trim(),{wrap:t,cleanedText:e}=this.extractWrap(t),e={text:e,wrap:t};return D.debug("parseMessage: "+JSON.stringify(e)),e}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",n=t.trim()):((i=(new Option).style).color=r,i.color!==r&&(r="transparent",n=t.trim()));var{wrap:i,cleanedText:t}=this.extractWrap(n);return{text:t?lc(t,O()):void 0,color:r,wrap:i}}addNote(t,e,r){var n={actor:t,placement:e,message:r.text,wrap:r.wrap??this.autoWrap()},t=[].concat(t,t);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t[0],to:t[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(e,r){e=this.getActor(e);try{let t=lc(r.text,O());t=(t=t.replace(/=/g,"=")).replace(/&/g,"&");var n=JSON.parse(t);this.insertLinks(e,n)}catch(t){D.error("error while parsing actor link text",t)}}addALink(a,s){a=this.getActor(a);try{let t={},e=lc(s.text,O()),r=e.indexOf("@"),n=(e=(e=e.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),i=e.slice(r+1).trim();t[n]=i,this.insertLinks(a,t)}catch(t){D.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(var r in e)t.links[r]=e[r]}addProperties(t,e){t=this.getActor(t);try{var r=lc(e.text,O()),n=JSON.parse(r);this.insertProperties(t,n)}catch(t){D.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(var r in e)t.properties[r]=e[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){t=this.getActor(t),e=document.getElementById(e.text);try{var r=e.innerHTML,n=JSON.parse(r);n.properties&&this.insertProperties(t,n.properties),n.links&&this.insertLinks(t,n.links)}catch(t){D.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":mh(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType)}}getConfig(){return O().sequence}}}),ESt=b(()=>{MCt=me(t=>`.actor { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + + text.actor > tspan { + fill: ${t.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${t.actorLineColor}; + } + + .innerArc { + stroke-width: 1.5; + stroke-dasharray: none; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${t.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${t.signalColor}; + } + + #arrowhead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .sequenceNumber { + fill: ${t.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${t.signalColor}; + } + + #crosshead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .messageText { + fill: ${t.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${t.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${t.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${t.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation1 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation2 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${t.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + .actor-man circle, line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + stroke-width: 2px; + } + +`,"getStyles"),DCt=MCt}),CSt=b(()=>{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(t),s)}function l(t,e,r,n,i,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;t<u.length;t++){var d=t*l-l*(u.length-1)/2,p=e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").style("font-size",l).style("font-weight",h).style("font-family",c);p.append("tspan").attr("x",r).attr("dy",d).text(u[t]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(t,e,r,n,i,a,s,o){(i=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),l(t,e,r,n,0,a,s,o),g(i,s)}function g(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}function n(t,e,r,n,i,a,s){f(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o){var{actorFontSize:o,actorFontFamily:l,actorFontWeight:c}=o,[h,u]=JC(o),d=t.split(L.lineBreakRegex);for(let t=0;t<d.length;t++){var p=t*h-h*(d.length-1)/2,g=e.append("text").attr("x",r+i/2).attr("y",n).style("text-anchor","middle").style("font-size",u).style("font-weight",c).style("font-family",l);g.append("tspan").attr("x",r+i/2).attr("dy",p).text(d[t]),g.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(g,s)}}function i(t,e,r,n,i,a,s,o){var l=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),c(t,e,r,n,i,a,s,o),f(l,s)}async function a(t,e,r,n,i,a,s,o){var l=await Cc(t,ar());(l=(e=e.append("switch")).append("foreignObject").attr("x",r+i/2-l.width/2).attr("y",n+a/2-l.height/2).attr("width",l.width).attr("height",l.height).append("xhtml:div").style("height","100%").style("width","100%")).append("div").style("text-align","center").style("vertical-align","middle").html(await _c(t,ar())),c(t,e,r,n,i,a,s,o),f(l,s)}function f(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}OCt=q(s6(),1),rn(),iS(),Oc(),o6(),PCt=36,BCt="actor-top",$Ct="actor-bottom",FCt="actor-box",zCt="actor-man",GCt=me(function(t,e){return Ew(t,e)},"drawRect"),UCt=me(function(t,e,r,n,i){if(null==e.links||0===Object.keys(e.links).length)return{height:0,width:0};var a=e.links,s=e.actorCnt,o=e.rectData,e="none",l=(i&&(e="block !important"),t.append("g")),i=(l.attr("id","actor"+s+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",e),""),c=(void 0!==o.class&&(i=" "+o.class),o.width>r?o.width:r);if((t=l.append("rect")).attr("class","actorPopupMenuPanel"+i),t.attr("x",o.x),t.attr("y",o.height),t.attr("fill",o.fill),t.attr("stroke",o.stroke),t.attr("width",c),t.attr("height",o.height),t.attr("rx",o.rx),t.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,OCt.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),xSt(n)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},n),u+=30}}return t.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),qCt=me(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),jCt=me(async function(n,i,a=null){var s=n.append("foreignObject"),o=await _c(i.text,ar()),o=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(o).node().getBoundingClientRect();if(s.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),"noteText"===i.class)(n=n.node().firstChild).setAttribute("height",o.height+2*i.textMargin),n=n.getBBox(),s.attr("x",Math.round(n.x+n.width/2-o.width/2)).attr("y",Math.round(n.y+n.height/2-o.height/2));else if(a){let{startx:t,stopx:e,starty:r}=a;t>e&&(n=t,t=e,e=n),s.attr("x",Math.round(t+Math.abs(t-e)/2-o.width/2)),"loopText"===i.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),WCt=me(function(t,e){let r=0,n=0,i=e.text.split(L.lineBreakRegex),[a,s]=JC(e.fontSize),o=[],l=0,c=me(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0<e.textMargin)switch(e.valign){case"top":case"start":c=me(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":c=me(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":c=me(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(var[h,u]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(l=h*a),(h=t.append("text")).attr("x",e.x),h.attr("y",c()),void 0!==e.anchor&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&h.style("font-family",e.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==e.fontWeight&&h.style("font-weight",e.fontWeight),void 0!==e.fill&&h.attr("fill",e.fill),void 0!==e.class&&h.attr("class",e.class),void 0!==e.dy?h.attr("dy",e.dy):0!==l&&h.attr("dy",l);var d,u=u||NC;(e.tspan?((d=h.append("tspan")).attr("x",e.x),void 0!==e.fill&&d.attr("fill",e.fill),d):h).text(u),void 0!==e.valign&&void 0!==e.textMargin&&0<e.textMargin&&(n+=(h._groups||h)[0][0].getBBox().height,r=n),o.push(h)}return o},"drawText"),YCt=me(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}me(r,"genPoints");var n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,WCt(t,e),n},"drawLabel"),HCt=-1,VCt=me((r,n,t,i)=>{r.select&&t.forEach(t=>{var t=n.get(t),e=r.select("#actor"+t.actorCnt);!i.mirrorActors&&t.stopy?e.attr("y2",t.stopy+t.height/2):i.mirrorActors&&e.attr("y2",t.stopy)})},"fixLifeLineHeights"),XCt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t=t.append("g").lower(),s=(n||(HCt++,Object.keys(e.links||{}).length&&!r.forceMenus&&o.attr("onclick",qCt(`actor${HCt}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+HCt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),o=t.append("g"),e.actorCnt=HCt,null!=e.links&&o.attr("id","root-"+HCt)),Lw()),a="actor",t=(e.properties?.class?a=e.properties.class:s.fill="#eaeaea",a+=n?" "+$Ct:" "+BCt,s.x=e.x,s.y=i,s.width=e.width,s.height=e.height,s.class=a,s.rx=3,s.ry=3,s.name=e.name,GCt(o,s));e.rectData=s,e.properties?.icon&&("@"===(n=e.properties.icon.trim()).charAt(0)?Aw(o,s.x+s.width-20,s.y+10,n.substr(1)):_w(o,s.x+s.width-20,s.y+10,n)),vSt(r,Ec(e.description))(e.description,o,s.x,s.y,s.width,s.height,{class:"actor "+FCt},r);let l=e.height;return t.node&&(i=t.node().getBBox(),e.height=i.height,l=i.height),l},"drawActorTypeParticipant"),KCt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t=t.append("g").lower(),s=(n||(HCt++,Object.keys(e.links||{}).length&&!r.forceMenus&&o.attr("onclick",qCt(`actor${HCt}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+HCt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),o=t.append("g"),e.actorCnt=HCt,null!=e.links&&o.attr("id","root-"+HCt)),Lw()),a="actor",t=(e.properties?.class?a=e.properties.class:s.fill="#eaeaea",a+=n?" "+$Ct:" "+BCt,s.x=e.x,s.y=i,s.width=e.width,s.height=e.height,s.class=a,s.name=e.name,{...s,x:s.x+-6,y:s.y+6,class:"actor"}),n=GCt(o,s);GCt(o,t),e.rectData=s,e.properties?.icon&&("@"===(i=e.properties.icon.trim()).charAt(0)?Aw(o,s.x+s.width-20,s.y+10,i.substr(1)):_w(o,s.x+s.width-20,s.y+10,i)),vSt(r,Ec(e.description))(e.description,o,s.x-6,s.y+6,s.width,s.height,{class:"actor "+FCt},r);let l=e.height;return n.node&&(a=n.node().getBBox(),e.height=a.height,l=a.height),l},"drawActorTypeCollections"),ZCt=me(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t.append("g").lower(),l=o,c=(n||(HCt++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",qCt(`actor${HCt}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+HCt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),l=o.append("g"),e.actorCnt=HCt,null!=e.links&&l.attr("id","root-"+HCt)),Lw()),h="actor";e.properties?.class?h=e.properties.class:c.fill="#eaeaea",h+=n?" "+$Ct:" "+BCt,c.x=e.x,c.y=i,c.width=e.width,c.height=e.height,c.class=h,c.name=e.name;var n=(t=c.height/2)/(2.5+c.height/50),u=l.append("g"),d=l.append("g");u.append("path").attr("d",`M ${c.x},${c.y+t} + a ${n},${t} 0 0 0 0,${c.height} + h ${c.width-2*n} + a ${n},${t} 0 0 0 0,-${c.height} + Z + `).attr("class",h),d.append("path").attr("d",`M ${c.x},${c.y+t} + a ${n},${t} 0 0 0 0,`+c.height).attr("stroke","#666").attr("stroke-width","1px").attr("class",h),u.attr("transform",`translate(${n}, ${-c.height/2})`),d.attr("transform",`translate(${c.width-n}, ${-c.height/2})`),e.rectData=c,e.properties?.icon&&(t=e.properties.icon.trim(),d=c.x+c.width-20,n=c.y+10,"@"===t.charAt(0)?Aw(l,d,n,t.substr(1)):_w(l,d,n,t)),vSt(r,Ec(e.description))(e.description,l,c.x,c.y,c.width,c.height,{class:"actor "+FCt},r);let p=e.height,g=u.select("path:last-child");return g.node()&&(d=g.node().getBBox(),e.height=d.height,p=d.height),p},"drawActorTypeQueue"),QCt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+75,o=t.append("g").lower(),l=(n||(HCt++,o.append("line").attr("id","actor"+HCt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=HCt),t.append("g")),c=zCt;return l.attr("class",c+=n?" "+$Ct:" "+BCt),l.attr("name",e.name),(o=Lw()).x=e.x,o.y=i,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",s=e.x+e.width/2,a=i+30,l.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),l.append("circle").attr("cx",s).attr("cy",a).attr("r",18).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),l.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${s}, ${a-18})`),t=l.node().getBBox(),e.height=t.height+2*(r?.sequence?.labelBoxHeight??0),vSt(r,Ec(e.description))(e.description,l,o.x,o.y+18+(n?5:10),o.width,o.height,{class:"actor "+zCt},r),e.height},"drawActorTypeControl"),JCt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+75,o=t.append("g").lower(),l=t.append("g"),c=zCt,c=(l.attr("class",c+=n?" "+$Ct:" "+BCt),l.attr("name",e.name),(t=Lw()).x=e.x,t.y=i,t.fill="#eaeaea",t.width=e.width,t.height=e.height,t.class="actor",e.x+e.width/2),h=i+(n?10:25),c=(l.append("circle").attr("cx",c).attr("cy",h).attr("r",18).attr("width",e.width).attr("height",e.height),l.append("line").attr("x1",c-18).attr("x2",c+18).attr("y1",h+18).attr("y2",h+18).attr("stroke","#333").attr("stroke-width",2),l.node().getBBox());return e.height=c.height+(r?.sequence?.labelBoxHeight??0),n||(HCt++,o.append("line").attr("id","actor"+HCt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=HCt),vSt(r,Ec(e.description))(e.description,l,t.x,t.y+(n?(h-i+18-5)/2:(h+18-i)/2),t.width,t.height,{class:"actor "+zCt},r),l.attr("transform","translate(0, 9)"),e.height},"drawActorTypeEntity"),tSt=me(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height+2*r.boxTextMargin,o=t.append("g").lower(),l=o,c=(n||(HCt++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",qCt(`actor${HCt}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+HCt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),l=o.append("g"),e.actorCnt=HCt,null!=e.links&&l.attr("id","root-"+HCt)),Lw()),h="actor";e.properties?.class?h=e.properties.class:c.fill="#eaeaea",h+=n?" "+$Ct:" "+BCt,c.x=e.x,c.y=i,c.width=e.width,c.height=e.height,c.class=h,c.name=e.name,c.x=e.x,c.y=i;var t=c.width/4,u=c.width/4,d=(g=t/2)/(2.5+t/50),p=l.append("g"),g=` + M ${c.x},${c.y+d} + a ${g},${d} 0 0 0 ${t},0 + a ${g},${d} 0 0 0 -${t},0 + l 0,${u-2*d} + a ${g},${d} 0 0 0 ${t},0 + l 0,-${u-2*d} +`;return p.append("path").attr("d",g).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",h),n?p.attr("transform",`translate(${1.5*t}, ${c.height/4-2*d})`):p.attr("transform",`translate(${1.5*t}, ${(c.height+d)/4})`),e.rectData=c,vSt(r,Ec(e.description))(e.description,l,c.x,c.y+(n?(c.height+u)/4:(c.height+d)/2),c.width,c.height,{class:"actor "+FCt},r),(g=p.select("path:last-child")).node()&&(t=g.node().getBBox(),e.height=t.height+(r.sequence.labelBoxHeight??0)),e.height},"drawActorTypeDatabase"),eSt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower(),a=(n||(HCt++,o.append("line").attr("id","actor"+HCt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=HCt),t.append("g")),t=zCt;return a.attr("class",t+=n?" "+$Ct:" "+BCt),a.attr("name",e.name),(o=Lw()).x=e.x,o.y=i,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",a.append("line").attr("id","actor-man-torso"+HCt).attr("x1",e.x+e.width/2-75).attr("y1",i+10).attr("x2",e.x+e.width/2-15).attr("y2",i+10),a.append("line").attr("id","actor-man-arms"+HCt).attr("x1",e.x+e.width/2-75).attr("y1",i+0).attr("x2",e.x+e.width/2-75).attr("y2",i+20),a.append("circle").attr("cx",e.x+e.width/2).attr("cy",i+10).attr("r",30),s=a.node().getBBox(),e.height=s.height+(r.sequence.labelBoxHeight??0),vSt(r,Ec(e.description))(e.description,a,o.x,o.y+(n?11:18),o.width,o.height,{class:"actor "+zCt},r),a.attr("transform","translate(0,22)"),e.height},"drawActorTypeBoundary"),rSt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower(),l=(n||(HCt++,o.append("line").attr("id","actor"+HCt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=HCt),t.append("g")),c=zCt;return l.attr("class",c+=n?" "+$Ct:" "+BCt),l.attr("name",e.name),(o=Lw()).x=e.x,o.y=i,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+HCt).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+HCt).attr("x1",a-PCt/2).attr("y1",i+33).attr("x2",a+PCt/2).attr("y2",i+33),l.append("line").attr("x1",a-PCt/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+PCt/2-2).attr("y2",i+60),(s=l.append("circle")).attr("cx",e.x+e.width/2),s.attr("cy",i+10),s.attr("r",15),s.attr("width",e.width),s.attr("height",e.height),t=l.node().getBBox(),e.height=t.height,vSt(r,Ec(e.description))(e.description,l,o.x,o.y+35,o.width,o.height,{class:"actor "+zCt},r),e.height},"drawActorTypeActor"),nSt=me(async function(t,e,r,n){switch(e.type){case"actor":return rSt(t,e,r,n);case"participant":return XCt(t,e,r,n);case"boundary":return eSt(t,e,r,n);case"control":return QCt(t,e,r,n);case"entity":return JCt(t,e,r,n);case"database":return tSt(t,e,r,n);case"collections":return KCt(t,e,r,n);case"queue":return ZCt(t,e,r,n)}},"drawActor"),iSt=me(function(t,e,r){t=t.append("g"),lSt(t,e),e.name&&vSt(r)(e.name,t,e.x,e.y+r.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),t.lower()},"drawBox"),aSt=me(function(t){return t.append("g")},"anchorElement"),sSt=me(function(t,e,r,n,i){var a=Lw(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,GCt(s,a)},"drawActivation"),oSt=me(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=n,u=t.append("g"),d=me(function(t,e,r,n){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).attr("class","loopLine")},"drawLoopLine"),p=(d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){d(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}),Nw());p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",YCt(u,p),(p=mSt()).text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=!0;var g=Ec(p.text)?await jCt(u,p,e):WCt(u,p);if(void 0!==e.sectionTitles)for(var[f,m]of Object.entries(e.sectionTitles))m.message&&(p.text=m.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[f].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=e.wrap,Ec(p.text)?(e.starty=e.sections[f].y,await jCt(u,p,e)):WCt(u,p),m=Math.round(g.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e)),e.sections[f].height+=m-(i+a));return e.height=Math.round(e.stopy-e.starty),u},"drawLoop"),lSt=me(function(t,e){Cw(t,e)},"drawBackgroundRect"),cSt=me(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),hSt=me(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),uSt=me(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),dSt=me(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),pSt=me(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),gSt=me(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),fSt=me(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),mSt=me(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),ySt=me(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(n,"byText"),me(c,"byTspan"),me(i,"byFo"),me(a,"byKatex"),me(f,"_setTextAttrs"),vSt=function(t,e=!1){return e?a:"fo"===t.textPlacement?i:"old"===t.textPlacement?n:c},me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),xSt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},bSt={drawRect:GCt,drawText:WCt,drawLabel:YCt,drawActor:nSt,drawBox:iSt,drawPopup:UCt,anchorElement:aSt,drawActivation:sSt,drawLoop:oSt,drawBackgroundRect:lSt,insertArrowHead:dSt,insertArrowFilledHead:pSt,insertSequenceNumber:gSt,insertArrowCrossHead:fSt,insertDatabaseIcon:cSt,insertComputerIcon:hSt,insertClockIcon:uSt,getTextObj:mSt,getNoteRect:ySt,fixLifeLineHeights:VCt,sanitizeUrl:OCt.sanitizeUrl}});async function SSt(t,e){B.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=e,a=L.splitBreaks(i).length,s=Ec(i),i=s?await Cc(i,O()):tS.calculateTextDimensions(i,RSt(P));s||(s=i.height/a,e.height+=s,B.bumpVerticalPos(s));let o,l=i.height-10,c=i.width;return r===n?(o=B.getVerticalPos()+l,P.rightAngles||(l+=P.boxMargin,o=B.getVerticalPos()+l),l+=30,a=L.getMax(c/2,P.width/2),B.insert(r-a,B.getVerticalPos()-10+l,n+a,B.getVerticalPos()+30+l)):(l+=P.boxMargin,o=B.getVerticalPos()+l,B.insert(r,o-10,n,o)),B.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,B.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),o}function _St(t,e,r,n,i){B.bumpVerticalPos(r);let a=n;e.id&&e.message&&t[e.id]&&(r=t[e.id].width,t=RSt(P),e.message=tS.wrapLabel(`[${e.message}]`,r-2*P.wrapPadding,t),e.width=r,e.wrap=!0,r=tS.calculateTextDimensions(e.message,t),t=L.getMax(r.height,P.labelBoxHeight),a=n+t,D.debug(t+" - "+e.message)),i(e),B.bumpVerticalPos(a)}function ASt(r,n,t,e,i,a,s){function o(t,e){t.x<i.get(r.from).x?(B.insert(n.stopx-e,n.starty,n.startx,n.stopy+t.height/2+P.noteMargin),n.stopx=n.stopx+e):(B.insert(n.startx,n.starty,n.stopx+e,n.stopy+t.height/2+P.noteMargin),n.stopx=n.stopx-e)}function l(t,e){t.x<i.get(r.to).x?(B.insert(n.startx-e,n.starty,n.stopx,n.stopy+t.height/2+P.noteMargin),n.startx=n.startx+e):(B.insert(n.stopx,n.starty,n.startx+e,n.stopy+t.height/2+P.noteMargin),n.startx=n.startx-e)}me(o,"receiverAdjustment"),me(l,"senderAdjustment");var c=[ICt.ACTOR,ICt.CONTROL,ICt.ENTITY,ICt.DATABASE];a.get(r.to)==e?(o(a=i.get(r.to),c.includes(a.type)?PCt/2+3:a.width/2+3),a.starty=t-a.height/2,B.bumpVerticalPos(a.height/2)):s.get(r.from)==e?(a=i.get(r.from),P.mirrorActors&&l(a,c.includes(a.type)?PCt/2:a.width/2),a.stopy=t-a.height/2,B.bumpVerticalPos(a.height/2)):s.get(r.to)==e&&(a=i.get(r.to),P.mirrorActors&&o(a,c.includes(a.type)?PCt/2+3:a.width/2+3),a.stopy=t-a.height/2,B.bumpVerticalPos(a.height/2))}async function LSt(t,e,r){var n,i={};for(n of e)if(t.get(n.to)&&t.get(n.from)){var a=t.get(n.to);if(n.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||n.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;var s=!(o=void 0!==n.placement),o=(o?MSt:RSt)(P),l=n.wrap?tS.wrapLabel(n.message,P.width-2*P.wrapPadding,o):n.message,l=(Ec(l)?await Cc(n.message,O()):tS.calculateTextDimensions(l,o)).width+2*P.wrapPadding;s&&n.from===a.nextActor?i[n.to]=L.getMax(i[n.to]||0,l):s&&n.from===a.prevActor?i[n.from]=L.getMax(i[n.from]||0,l):s&&n.from===n.to?(i[n.from]=L.getMax(i[n.from]||0,l/2),i[n.to]=L.getMax(i[n.to]||0,l/2)):n.placement===r.db.PLACEMENT.RIGHTOF?i[n.from]=L.getMax(i[n.from]||0,l):n.placement===r.db.PLACEMENT.LEFTOF?i[a.prevActor]=L.getMax(i[a.prevActor]||0,l):n.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(i[a.prevActor]=L.getMax(i[a.prevActor]||0,l/2)),a.nextActor)&&(i[n.from]=L.getMax(i[n.from]||0,l/2))}return D.debug("maxMessageWidthPerActor:",i),i}async function NSt(n,t,e){let r=0;for(var i of n.keys()){(i=n.get(i)).wrap&&(i.description=tS.wrapLabel(i.description,P.width-2*P.wrapPadding,DSt(P)));var a=Ec(i.description)?await Cc(i.description,O()):tS.calculateTextDimensions(i.description,DSt(P));i.width=i.wrap?P.width:L.getMax(P.width,a.width+2*P.wrapPadding),i.height=i.wrap?L.getMax(a.height,P.height):P.height,r=L.getMax(r,i.height)}for(var s in t){var o,l=n.get(s);l&&(o=(o=n.get(l.nextActor))?t[s]+P.actorMargin-l.width/2-o.width/2:t[s]+P.actorMargin-l.width/2,l.margin=L.getMax(o,P.actorMargin))}let c=0;return e.forEach(t=>{var e,r=RSt(P),r=(e=t.actorKeys.reduce((t,e)=>t+(n.get(e).width+(n.get(e).margin||0)),0)+8*P.boxMargin-2*P.boxTextMargin,t.wrap&&(t.name=tS.wrapLabel(t.name,e-2*P.wrapPadding,r)),tS.calculateTextDimensions(t.name,r)),r=(c=L.getMax(r.height,c),L.getMax(e,r.width+2*P.wrapPadding));t.margin=P.boxTextMargin,e<r&&(t.margin+=(r-e)/2)}),e.forEach(t=>t.textMaxHeight=c),L.getMax(r,P.height)}var P,B,ISt,RSt,MSt,DSt,OSt,PSt,BSt,$St,FSt,zSt,GSt,USt,qSt,jSt,WSt,YSt,HSt,VSt=b(()=>{i6(),CSt(),t(),Oc(),Oc(),o6(),Tu(),mr(),iS(),lh(),TSt(),P={},B={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:me(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:me(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:me(function(t){this.boxes.push(t)},"addBox"),addActor:me(function(t){this.actors.push(t)},"addActor"),addLoop:me(function(t){this.loops.push(t)},"addLoop"),addMessage:me(function(t){this.messages.push(t)},"addMessage"),addNote:me(function(t){this.notes.push(t)},"addNote"),lastActor:me(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:me(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:me(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:me(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:me(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,FSt(O())},"init"),updateVal:me(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:me(function(n,i,a,s){let o=this,l=0;function t(r){return me(function(t){l++;var e=o.sequenceItems.length-l+1;o.updateVal(t,"starty",i-e*P.boxMargin,Math.min),o.updateVal(t,"stopy",s+e*P.boxMargin,Math.max),o.updateVal(B.data,"startx",n-e*P.boxMargin,Math.min),o.updateVal(B.data,"stopx",a+e*P.boxMargin,Math.max),"activation"!==r&&(o.updateVal(t,"startx",n-e*P.boxMargin,Math.min),o.updateVal(t,"stopx",a+e*P.boxMargin,Math.max),o.updateVal(B.data,"starty",i-e*P.boxMargin,Math.min),o.updateVal(B.data,"stopy",s+e*P.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t()),this.activations.forEach(t("activation"))},"updateBounds"),insert:me(function(t,e,r,n){var i=L.getMin(t,r),t=L.getMax(t,r),r=L.getMin(e,n),e=L.getMax(e,n);this.updateVal(B.data,"startx",i,Math.min),this.updateVal(B.data,"starty",r,Math.min),this.updateVal(B.data,"stopx",t,Math.max),this.updateVal(B.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),newActivation:me(function(t,e,r){var r=r.get(t.from),n=zSt(t.from).length||0,r=r.x+r.width/2+(n-1)*P.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+P.activationWidth,stopy:void 0,actor:t.from,anchored:bSt.anchorElement(e)})},"newActivation"),endActivation:me(function(t){return t=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from),this.activations.splice(t,1)[0]},"endActivation"),createLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:me(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:me(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:me(function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:B.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:me(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:me(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return{bounds:this.data,models:this.models}},"getBounds")},ISt=me(async function(t,e){B.bumpVerticalPos(P.boxMargin),e.height=P.boxMargin,e.starty=B.getVerticalPos();var r=Lw(),t=(r.x=e.startx,r.y=e.starty,r.width=e.width||P.width,r.class="note",t.append("g")),n=bSt.drawRect(t,r),t=((i=Nw()).x=e.startx,i.y=e.starty,i.width=r.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=P.noteFontFamily,i.fontSize=P.noteFontSize,i.fontWeight=P.noteFontWeight,i.anchor=P.noteAlign,i.textMargin=P.noteMargin,i.valign="center",Ec(i.text)?await jCt(t,i):WCt(t,i)),i=Math.round(t.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",i+2*P.noteMargin),e.height+=i+2*P.noteMargin,B.bumpVerticalPos(i+2*P.noteMargin),e.stopy=e.starty+i+2*P.noteMargin,e.stopx=e.startx+r.width,B.insert(e.startx,e.starty,e.stopx,e.stopy),B.models.addNote(e)},"drawNote"),RSt=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),MSt=me(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),DSt=me(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont"),me(SSt,"boundMessage"),OSt=me(async function(t,e,r,n){var{startx:e,stopx:i,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=e,h=tS.calculateTextDimensions(s,RSt(P)),u=Nw();u.x=e,u.y=a+10,u.width=i-e,u.class="messageText",u.dy="1em",u.text=s,u.fontFamily=P.messageFontFamily,u.fontSize=P.messageFontSize,u.fontWeight=P.messageFontWeight,u.anchor=P.messageAlign,u.valign="center",u.textMargin=P.wrapPadding,u.tspan=!1,Ec(u.text)?await jCt(t,u,{startx:e,stopx:i,starty:r}):WCt(t,u);let d=h.width,p,g=(e===i?p=P.rightAngles?t.append("path").attr("d",`M ${e},${r} H ${e+L.getMax(P.width/2,d/2)} V ${r+25} H `+e):t.append("path").attr("d","M "+e+","+r+" C "+(e+60)+","+(r-10)+" "+(e+60)+","+(r+30)+" "+e+","+(r+20)):((p=t.append("line")).attr("x1",e),p.attr("y1",r),p.attr("x2",i),p.attr("y2",r)),o===n.db.LINETYPE.DOTTED||o===n.db.LINETYPE.DOTTED_CROSS||o===n.db.LINETYPE.DOTTED_POINT||o===n.db.LINETYPE.DOTTED_OPEN||o===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0"),"");P.arrowMarkerAbsolute&&(g=gc(!0)),p.attr("stroke-width",2),p.attr("stroke","none"),p.style("fill","none"),o!==n.db.LINETYPE.SOLID&&o!==n.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),o!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),o!==n.db.LINETYPE.SOLID_POINT&&o!==n.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),o!==n.db.LINETYPE.SOLID_CROSS&&o!==n.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(c||P.showSequenceNumbers)&&(o!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(e<i?p.attr("x1",e+12):p.attr("x1",e+6)),t.append("line").attr("x1",e).attr("y1",r).attr("x2",e).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",e).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),PSt=me(function(t,e,r,n,i,a,s){let o=0,l=0,c,h=0;for(var u of n){var d=(u=e.get(u)).box;c&&c!=d&&(s||B.models.addBox(c),l+=P.boxMargin+c.margin),d&&d!=c&&(s||(d.x=o+l,d.y=i),l+=d.margin),u.width=u.width||P.width,u.height=L.getMax(u.height||P.height,P.height),u.margin=u.margin||P.actorMargin,h=L.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=B.getVerticalPos(),B.insert(u.x,i,u.x+u.width,u.height),o+=u.width+l,u.box&&(u.box.width=o+d.margin-u.box.x),l=u.margin,c=u.box,B.models.addActor(u)}c&&!s&&B.models.addBox(c),B.bumpVerticalPos(h)},"addActorRenderingData"),BSt=me(async function(e,r,n,t){if(t){let t=0;B.bumpVerticalPos(2*P.boxMargin);for(var i of n)(i=r.get(i)).stopy||(i.stopy=B.getVerticalPos()),i=await bSt.drawActor(e,i,P,!0),t=L.getMax(t,i);B.bumpVerticalPos(t+P.boxMargin)}else for(var a of n)a=r.get(a),await bSt.drawActor(e,a,P,!1)},"drawActors"),$St=me(function(t,e,r,n){let i=0,a=0;for(var s of r){var s=e.get(s),o=qSt(s);(o=bSt.drawPopup(t,s,o,P,P.forceMenus,n)).height>i&&(i=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),FSt=me(function(t){At(P,t),t.fontFamily&&(P.actorFontFamily=P.noteFontFamily=P.messageFontFamily=t.fontFamily),t.fontSize&&(P.actorFontSize=P.noteFontSize=P.messageFontSize=t.fontSize),t.fontWeight&&(P.actorFontWeight=P.noteFontWeight=P.messageFontWeight=t.fontWeight)},"setConf"),zSt=me(function(e){return B.activations.filter(function(t){return t.actor===e})},"actorActivations"),GSt=me(function(t,e){return e=e.get(t),[(t=zSt(t)).reduce(function(t,e){return L.getMin(t,e.startx)},e.x+e.width/2-1),t.reduce(function(t,e){return L.getMax(t,e.stopx)},e.x+e.width/2+1)]},"activationBounds"),me(_St,"adjustLoopHeightForWrap"),me(ASt,"adjustCreatedDestroyedData"),USt=me(async function(n,t,e,i){var{securityLevel:r,sequence:a}=O();P=a;let s;"sandbox"===r&&(s=H("#i"+t));var a=H("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.nodes()[0].contentDocument:document;B.init(),D.debug(i.db);let l="sandbox"===r?a.select(`[id="${t}"]`):H(`[id="${t}"]`),c=i.db.getActors(),h=i.db.getCreatedActors(),u=i.db.getDestroyedActors(),d=i.db.getBoxes(),p=i.db.getActorKeys(),g=i.db.getMessages(),f=i.db.getDiagramTitle(),m=i.db.hasAtLeastOneBox(),y=i.db.hasAtLeastOneBoxWithTitle(),v=await LSt(c,g,i);if(P.height=await NSt(c,v,d),bSt.insertComputerIcon(l),bSt.insertDatabaseIcon(l),bSt.insertClockIcon(l),m&&(B.bumpVerticalPos(P.boxMargin),y)&&B.bumpVerticalPos(d[0].textMaxHeight),!0===P.hideUnusedParticipants){let e=new Set;g.forEach(t=>{e.add(t.from),e.add(t.to)}),p=p.filter(t=>e.has(t))}PSt(l,c,h,p,0,g,!1);var x,b,w,k=await YSt(g,c,v,i);function T(t,e){var r=B.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),bSt.drawActivation(l,r,e,P,zSt(t.from).length),B.insert(r.startx,e-10,r.stopx,e)}bSt.insertArrowHead(l),bSt.insertArrowCrossHead(l),bSt.insertArrowFilledHead(l),bSt.insertSequenceNumber(l),me(T,"activeEnd");let E=1,C=1,S=[],_=[],A=0;for(x of g){let t,e,r;switch(x.type){case i.db.LINETYPE.NOTE:B.resetVerticalPos(),e=x.noteModel,await ISt(l,e);break;case i.db.LINETYPE.ACTIVE_START:B.newActivation(x,l,c);break;case i.db.LINETYPE.ACTIVE_END:T(x,B.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:_St(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.LOOP_END:t=B.endLoop(),await bSt.drawLoop(l,t,"loop",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:_St(k,x,P.boxMargin,P.boxMargin,t=>B.newLoop(void 0,t.message));break;case i.db.LINETYPE.RECT_END:t=B.endLoop(),_.push(t),B.models.addLoop(t),B.bumpVerticalPos(t.stopy-B.getVerticalPos());break;case i.db.LINETYPE.OPT_START:_St(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.OPT_END:t=B.endLoop(),await bSt.drawLoop(l,t,"opt",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:_St(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.ALT_ELSE:_St(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.ALT_END:t=B.endLoop(),await bSt.drawLoop(l,t,"alt",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:_St(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t)),B.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:_St(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.PAR_END:t=B.endLoop(),await bSt.drawLoop(l,t,"par",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.AUTONUMBER:E=x.message.start||E,C=x.message.step||C,x.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:_St(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.CRITICAL_OPTION:_St(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.CRITICAL_END:t=B.endLoop(),await bSt.drawLoop(l,t,"critical",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:_St(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.BREAK_END:t=B.endLoop(),await bSt.drawLoop(l,t,"break",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;default:try{(r=x.msgModel).starty=B.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=i.db.showSequenceNumbers();var L=await SSt(l,r);ASt(x,r,L,A,c,h,u),S.push({messageModel:r,lineStartY:L}),B.models.addMessage(r)}catch(n){D.error("error while drawing message",n)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(x.type)&&(E+=C),A++}D.debug("createdActors",h),D.debug("destroyedActors",u),await BSt(l,c,p,!1);for(b of S)await OSt(l,b.messageModel,b.lineStartY,i);P.mirrorActors&&await BSt(l,c,p,!0),_.forEach(t=>bSt.drawBackgroundRect(l,t)),VCt(l,c,p,P);for(w of B.models.boxes){w.height=B.getVerticalPos()-w.y,B.insert(w.x,w.y,w.x+w.width,w.height);var N=2*P.boxMargin;w.startx=w.x-N,w.starty=w.y-.25*N,w.stopx=w.startx+w.width+2*N,w.stopy=w.starty+w.height+.75*N,w.stroke="rgb(0,0,0, 0.5)",bSt.drawBox(l,w,P)}m&&B.bumpVerticalPos(P.boxMargin),r=$St(l,c,p,o),void 0===(a=B.getBounds().bounds).startx&&(a.startx=0),void 0===a.starty&&(a.starty=0),void 0===a.stopx&&(a.stopx=0),void 0===a.stopy&&(a.stopy=0);let I=a.stopy-a.starty,R=(I<r.maxHeight?r.maxHeight:I)+2*P.diagramMarginY,M=(P.mirrorActors&&(R=R-P.boxMargin+P.bottomMarginAdj),a.stopx-a.startx);t=(M<r.maxWidth?r.maxWidth:M)+2*P.diagramMarginX,f&&l.append("text").text(f).attr("x",(a.stopx-a.startx)/2-2*P.diagramMarginX).attr("y",-25),Zc(l,R,t,P.useMaxWidth),o=f?40:0,l.attr("viewBox",a.startx-P.diagramMarginX+" -"+(P.diagramMarginY+o)+" "+t+" "+(R+o)),D.debug("models:",B.models)},"draw"),me(LSt,"getMaxMessageWidthPerActor"),qSt=me(function(t){let e=0,r=DSt(P);for(var n in t.links)n=tS.calculateTextDimensions(n,r).width+2*P.wrapPadding+2*P.boxMargin,e<n&&(e=n);return e},"getRequiredPopupWidth"),me(NSt,"calculateActorMargins"),jSt=me(async function(t,e,r){var n=e.get(t.from),e=e.get(t.to),i=n.x,a=e.x,s=t.wrap&&t.message,o=Ec(t.message)?await Cc(t.message,O()):tS.calculateTextDimensions(s?tS.wrapLabel(t.message,P.width,MSt(P)):t.message,MSt(P)),l={width:s?P.width:L.getMax(P.width,o.width+2*P.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(l.width=s?L.getMax(P.width,o.width):L.getMax(n.width/2+e.width/2,o.width+2*P.noteMargin),l.startx=i+(n.width+P.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(l.width=s?L.getMax(P.width,o.width+2*P.noteMargin):L.getMax(n.width/2+e.width/2,o.width+2*P.noteMargin),l.startx=i-l.width+(n.width-P.actorMargin)/2):t.to===t.from?(o=tS.calculateTextDimensions(s?tS.wrapLabel(t.message,L.getMax(P.width,n.width),MSt(P)):t.message,MSt(P)),l.width=s?L.getMax(P.width,n.width):L.getMax(n.width,P.width,o.width+2*P.noteMargin),l.startx=i+(n.width-l.width)/2):(l.width=Math.abs(i+n.width/2-(a+e.width/2))+P.actorMargin,l.startx=i<a?i+n.width/2-P.actorMargin/2:a+e.width/2-P.actorMargin/2),s&&(l.message=tS.wrapLabel(t.message,l.width-2*P.wrapPadding,MSt(P))),D.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`),l},"buildNoteModel"),WSt=me(function(t,e,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};let[n,i]=GSt(t.from,e),[a,s]=GSt(t.to,e),o=n<=a,l=o?i:n,c=o?a:s,h=2<Math.abs(a-s),u=me(t=>o?-t:t,"adjustValue");t.from===t.to?c=l:(t.activate&&!h&&(c+=u(P.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=u(3)));var e=[n,i,a,s],r=Math.abs(l-c),d=(t.wrap&&t.message&&(t.message=tS.wrapLabel(t.message,L.getMax(r+2*P.wrapPadding,P.width),RSt(P))),tS.calculateTextDimensions(t.message,RSt(P)));return{width:L.getMax(t.wrap?0:d.width+2*P.wrapPadding,r+2*P.wrapPadding,P.width),height:0,startx:l,stopx:c,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,e),toBounds:Math.max.apply(null,e)}},"buildMessageModel"),YSt=me(async function(t,n,e,i){let a={},s=[],o,l,c;for(let r of t){switch(r.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:s.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:o=s.pop(),a[o.id]=o;break;case i.db.LINETYPE.ACTIVE_START:var h=n.get(r.from||r.to.actor),u=zSt(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*P.activationWidth/2,stopx:h+P.activationWidth,actor:r.from,enabled:!0};B.activations.push(u);break;case i.db.LINETYPE.ACTIVE_END:h=B.activations.map(t=>t.actor).lastIndexOf(r.from),B.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await jSt(r,n,i),r.noteModel=l,s.forEach(t=>{(o=t).from=L.getMin(o.from,l.startx),o.to=L.getMax(o.to,l.startx+l.width),o.width=L.getMax(o.width,Math.abs(o.from-o.to))-P.labelBoxWidth})):(c=WSt(r,n,i),(r.msgModel=c).startx&&c.stopx&&0<s.length&&s.forEach(t=>{var e;o=t,c.startx===c.stopx?(t=n.get(r.from),e=n.get(r.to),o.from=L.getMin(t.x-c.width/2,t.x-t.width/2,o.from),o.to=L.getMax(e.x+c.width/2,e.x+t.width/2,o.to),o.width=L.getMax(o.width,Math.abs(o.to-o.from))-P.labelBoxWidth):(o.from=L.getMin(c.startx,o.from),o.to=L.getMax(c.stopx,o.to),o.width=L.getMax(o.width,c.width)-P.labelBoxWidth)}))}return B.activations=[],D.debug("Loop type widths:",a),a},"calculateLoopBounds"),HSt={bounds:B,drawActors:BSt,drawActorsPopup:$St,setConf:FSt,draw:USt}}),XSt={};KBt(XSt,{diagram:()=>KSt});var KSt,ZSt,QSt,JSt,t_t,e_t,r_t,n_t,i_t,a_t,s_t,o_t,l_t,c_t,h_t,u_t=b(()=>{kSt(),TSt(),ESt(),Tu(),VSt(),KSt={parser:_Ct,get db(){return new RCt},renderer:HSt,styles:DCt,init:me(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,Eh({sequence:{wrap:t.wrap}}))},"init")}}),d_t=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,18],n=[1,19],i=[1,20],a=[1,41],s=[1,42],o=[1,26],l=[1,24],P=[1,25],B=[1,32],$=[1,33],F=[1,34],c=[1,45],z=[1,35],G=[1,36],U=[1,37],q=[1,38],j=[1,27],W=[1,28],Y=[1,29],H=[1,30],V=[1,31],h=[1,44],u=[1,46],d=[1,43],p=[1,47],X=[1,9],g=[1,8,9],f=[1,58],m=[1,59],y=[1,60],v=[1,61],x=[1,62],K=[1,63],Z=[1,64],b=[1,8,9,41],Q=[1,76],w=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],k=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],T=[13,60,86,100,102,103],E=[13,60,73,74,86,100,102,103],J=[13,60,68,69,70,71,72,86,100,102,103],tt=[1,100],C=[1,117],S=[1,113],_=[1,109],A=[1,115],L=[1,110],N=[1,111],I=[1,112],R=[1,114],M=[1,116],et=[22,48,60,61,82,86,87,88,89,90],rt=[1,8,9,39,41,44],D=[1,8,9,22],nt=[1,145],it=[1,8,9,61],O=[1,8,9,22,48,60,61,82,86,87,88,89,90],k={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 10:case 13:case 15:this.$=a[o];break;case 11:case 14:this.$=a[o-2]+"."+a[o];break;case 12:case 16:this.$=a[o-1]+a[o];break;case 17:case 18:this.$=a[o-1]+"~"+a[o]+"~";break;case 19:n.addRelation(a[o]);break;case 20:a[o-1].title=n.cleanupLabel(a[o]),n.addRelation(a[o-1]);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:n.addClassesToNamespace(a[o-3],a[o-1]);break;case 35:n.addClassesToNamespace(a[o-4],a[o-1]);break;case 36:this.$=a[o],n.addNamespace(a[o]);break;case 37:this.$=[a[o]];break;case 38:this.$=[a[o-1]];break;case 39:a[o].unshift(a[o-2]),this.$=a[o];break;case 41:n.setCssClass(a[o-2],a[o]);break;case 42:n.addMembers(a[o-3],a[o-1]);break;case 44:n.setCssClass(a[o-5],a[o-3]),n.addMembers(a[o-5],a[o-1]);break;case 45:this.$=a[o],n.addClass(a[o]);break;case 46:this.$=a[o-1],n.addClass(a[o-1]),n.setClassLabel(a[o-1],a[o]);break;case 50:n.addAnnotation(a[o],a[o-2]);break;case 51:case 64:this.$=[a[o]];break;case 52:a[o].push(a[o-1]),this.$=a[o];break;case 53:break;case 54:n.addMember(a[o-1],n.cleanupLabel(a[o]));break;case 55:case 56:break;case 57:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 59:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 60:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 61:n.addNote(a[o],a[o-1]);break;case 62:n.addNote(a[o]);break;case 63:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 65:this.$=a[o-2].concat([a[o]]);break;case 66:n.setDirection("TB");break;case 67:n.setDirection("BT");break;case 68:n.setDirection("RL");break;case 69:n.setDirection("LR");break;case 70:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 71:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 72:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 73:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 74:this.$=n.relationType.AGGREGATION;break;case 75:this.$=n.relationType.EXTENSION;break;case 76:this.$=n.relationType.COMPOSITION;break;case 77:this.$=n.relationType.DEPENDENCY;break;case 78:this.$=n.relationType.LOLLIPOP;break;case 79:this.$=n.lineType.LINE;break;case 80:this.$=n.lineType.DOTTED_LINE;break;case 81:case 87:this.$=a[o-2],n.setClickEvent(a[o-1],a[o]);break;case 82:case 88:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 83:this.$=a[o-2],n.setLink(a[o-1],a[o]);break;case 84:this.$=a[o-3],n.setLink(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-3],n.setLink(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 86:this.$=a[o-4],n.setLink(a[o-3],a[o-2],a[o]),n.setTooltip(a[o-3],a[o-1]);break;case 89:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 90:this.$=a[o-4],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 91:this.$=a[o-3],n.setLink(a[o-2],a[o]);break;case 92:this.$=a[o-4],n.setLink(a[o-3],a[o-1],a[o]);break;case 93:this.$=a[o-4],n.setLink(a[o-3],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 94:this.$=a[o-5],n.setLink(a[o-4],a[o-2],a[o]),n.setTooltip(a[o-4],a[o-1]);break;case 95:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 96:n.setCssClass(a[o-1],a[o]);break;case 97:this.$=[a[o]];break;case 98:a[o-2].push(a[o]),this.$=a[o-2];break;case 100:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:r,35:n,37:i,38:22,42:a,43:23,46:s,49:o,51:l,52:P,54:B,56:$,57:F,60:c,62:z,63:G,64:U,65:q,75:j,76:W,78:Y,82:H,83:V,86:h,100:u,102:d,103:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(X,[2,5],{8:[1,48]}),{8:[1,49]},e(g,[2,19],{22:[1,50]}),e(g,[2,21]),e(g,[2,22]),e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,27]),e(g,[2,28]),e(g,[2,29]),e(g,[2,30]),{34:[1,51]},{36:[1,52]},e(g,[2,33]),e(g,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:f,69:m,70:y,71:v,72:x,73:K,74:Z}),{39:[1,65]},e(b,[2,40],{39:[1,67],44:[1,66]}),e(g,[2,55]),e(g,[2,56]),{16:68,60:c,86:h,100:u,102:d},{16:39,17:40,19:69,60:c,86:h,100:u,102:d,103:p},{16:39,17:40,19:70,60:c,86:h,100:u,102:d,103:p},{16:39,17:40,19:71,60:c,86:h,100:u,102:d,103:p},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:c,86:h,100:u,102:d,103:p},{13:Q,55:75},{58:77,60:[1,78]},e(g,[2,66]),e(g,[2,67]),e(g,[2,68]),e(g,[2,69]),e(w,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:c,86:h,100:u,102:d,103:p}),e(w,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:c,86:h,100:u,102:d,103:p},{16:39,17:40,19:86,60:c,86:h,100:u,102:d,103:p},e(k,[2,123]),e(k,[2,124]),e(k,[2,125]),e(k,[2,126]),e([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),e(X,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:r,35:n,37:i,42:a,46:s,49:o,51:l,52:P,54:B,56:$,57:F,60:c,62:z,63:G,64:U,65:q,75:j,76:W,78:Y,82:H,83:V,86:h,100:u,102:d,103:p}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:r,35:n,37:i,38:22,42:a,43:23,46:s,49:o,51:l,52:P,54:B,56:$,57:F,60:c,62:z,63:G,64:U,65:q,75:j,76:W,78:Y,82:H,83:V,86:h,100:u,102:d,103:p},e(g,[2,20]),e(g,[2,31]),e(g,[2,32]),{13:[1,90],16:39,17:40,19:89,60:c,86:h,100:u,102:d,103:p},{53:91,66:56,67:57,68:f,69:m,70:y,71:v,72:x,73:K,74:Z},e(g,[2,54]),{67:92,73:K,74:Z},e(T,[2,73],{66:93,68:f,69:m,70:y,71:v,72:x}),e(E,[2,74]),e(E,[2,75]),e(E,[2,76]),e(E,[2,77]),e(E,[2,78]),e(J,[2,79]),e(J,[2,80]),{8:[1,95],24:96,40:94,43:23,46:s},{16:97,60:c,86:h,100:u,102:d},{41:[1,99],45:98,51:tt},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:C,48:S,59:106,60:_,82:A,84:107,85:108,86:L,87:N,88:I,89:R,90:M},{60:[1,118]},{13:Q,55:119},e(g,[2,62]),e(g,[2,128]),{22:C,48:S,59:120,60:_,61:[1,121],82:A,84:107,85:108,86:L,87:N,88:I,89:R,90:M},e(et,[2,64]),{16:39,17:40,19:122,60:c,86:h,100:u,102:d,103:p},e(w,[2,16]),e(w,[2,17]),e(w,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:c,86:h,100:u,102:d,103:p},{39:[2,10]},e(rt,[2,45],{11:125,12:[1,126]}),e(X,[2,7]),{9:[1,127]},e(D,[2,57]),{16:39,17:40,19:128,60:c,86:h,100:u,102:d,103:p},{13:[1,130],16:39,17:40,19:129,60:c,86:h,100:u,102:d,103:p},e(T,[2,72],{66:131,68:f,69:m,70:y,71:v,72:x}),e(T,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:s},{8:[1,134],41:[2,37]},e(b,[2,41],{39:[1,135]}),{41:[1,136]},e(b,[2,43]),{41:[2,51],45:137,51:tt},{16:39,17:40,19:138,60:c,86:h,100:u,102:d,103:p},e(g,[2,81],{13:[1,139]}),e(g,[2,83],{13:[1,141],77:[1,140]}),e(g,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},e(g,[2,95],{61:nt}),e(it,[2,97],{85:146,22:C,48:S,60:_,82:A,86:L,87:N,88:I,89:R,90:M}),e(O,[2,99]),e(O,[2,101]),e(O,[2,102]),e(O,[2,103]),e(O,[2,104]),e(O,[2,105]),e(O,[2,106]),e(O,[2,107]),e(O,[2,108]),e(O,[2,109]),e(g,[2,96]),e(g,[2,61]),e(g,[2,63],{61:nt}),{60:[1,147]},e(w,[2,14]),{15:148,16:84,17:85,60:c,86:h,100:u,102:d,103:p},{39:[2,12]},e(rt,[2,46]),{13:[1,149]},{1:[2,4]},e(D,[2,59]),e(D,[2,58]),{16:39,17:40,19:150,60:c,86:h,100:u,102:d,103:p},e(T,[2,70]),e(g,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:s},{45:153,51:tt},e(b,[2,42]),{41:[2,52]},e(g,[2,50]),e(g,[2,82]),e(g,[2,84]),e(g,[2,85],{77:[1,154]}),e(g,[2,88]),e(g,[2,89],{13:[1,155]}),e(g,[2,91],{13:[1,157],77:[1,156]}),{22:C,48:S,60:_,82:A,84:158,85:108,86:L,87:N,88:I,89:R,90:M},e(O,[2,100]),e(et,[2,65]),{39:[2,11]},{14:[1,159]},e(D,[2,60]),e(g,[2,35]),{41:[2,39]},{41:[1,160]},e(g,[2,86]),e(g,[2,90]),e(g,[2,92]),e(g,[2,93],{77:[1,161]}),e(it,[2,98],{85:146,22:C,48:S,60:_,82:A,86:L,87:N,88:I,89:R,90:M}),e(rt,[2,8]),e(b,[2,44]),e(g,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:me(function(t,e,r,n){switch(r){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 77;case 68:case 69:return 69;case 70:case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:case 85:return 89;case 86:return 90;case 87:case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};k.lexer=r,me(t,"Parser"),(ZSt=new((t.prototype=k).Parser=t)).parser=ZSt,QSt=ZSt}),p_t=b(()=>{Tu(),Oc(),JSt=["#","+","~","-",""],t_t=class{static{me(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="",e=lc(t,O()),this.parseMember(e)}getDisplayDetails(){let t=this.visibility+vc(this.id);"method"===this.memberType&&(t+=`(${vc(this.parameters.trim())})`,this.returnType)&&(t+=" : "+vc(this.returnType)),t=t.trim();var e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t))&&(i=r[1]?r[1].trim():"",JSt.includes(i)&&(this.visibility=i),this.id=r[2],this.parameters=r[3]?r[3].trim():"",e=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===e)&&(i=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(i))&&(e=i,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=t.length,i=t.substring(0,1),n=t.substring(r-1),JSt.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)),this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,n,i=(this.visibility?"\\"+this.visibility:"")+vc(this.id)+("method"===this.memberType?`(${vc(this.parameters)})`+(this.returnType?" : "+vc(this.returnType):""):"");this.text=i.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}}),g_t=b(()=>{i6(),t(),Tu(),Oc(),iS(),ku(),p_t(),e_t="classId-",r_t=0,n_t=me(t=>L.sanitizeText(t,O()),"sanitizeText"),i_t=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=me(t=>{let r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e;null!==(t=H(t.currentTarget)).attr("title")&&(e=this.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(t.attr("title")).style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),t.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),H(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=mh,this.getAccTitle=yh,this.setAccDescription=vh,this.getAccDescription=xh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getConfig=me(()=>O().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{me(this,"ClassDB")}splitClassNameAndType(t){let e=L.sanitizeText(t,O()),r="",n=e;return 0<e.indexOf("~")&&(t=e.split("~"),n=n_t(t[0]),r=n_t(t[1])),{className:n,type:r}}setClassLabel(t,e){t=L.sanitizeText(t,O()),e=e&&n_t(e),t=this.splitClassNameAndType(t).className,this.classes.get(t).label=e,this.classes.get(t).text=""+e+(this.classes.get(t).type?`<${this.classes.get(t).type}>`:"")}addClass(t){var t=L.sanitizeText(t,O()),{className:t,type:e}=this.splitClassNameAndType(t);this.classes.has(t)||(t=L.sanitizeText(t,O()),this.classes.set(t,{id:t,type:e,label:t,text:t+(e?`<${e}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:e_t+t+"-"+r_t}),r_t++)}addInterface(t,e){t={id:"interface"+this.interfaces.length,label:t,classId:e},this.interfaces.push(t)}lookUpDomId(t){if(t=L.sanitizeText(t,O()),this.classes.has(t))return this.classes.get(t).domId;throw new Error("Class not found: "+t)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",fh()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){D.debug("Adding relation: "+JSON.stringify(t));var e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=L.sanitizeText(t.relationTitle1.trim(),O()),t.relationTitle2=L.sanitizeText(t.relationTitle2.trim(),O()),this.relations.push(t)}addAnnotation(t,e){t=this.splitClassNameAndType(t).className,this.classes.get(t).annotations.push(e)}addMember(t,e){this.addClass(t),t=this.splitClassNameAndType(t).className,t=this.classes.get(t),"string"==typeof e&&((e=e.trim()).startsWith("<<")&&e.endsWith(">>")?t.annotations.push(n_t(e.substring(2,e.length-2))):0<e.indexOf(")")?t.methods.push(new t_t(e,"method")):e&&t.members.push(new t_t(e,"attribute")))}addMembers(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>this.addMember(e,t)))}addNote(t,e){e={id:"note"+this.notes.length,class:e,text:t},this.notes.push(e)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),n_t(t.trim())}setCssClass(t,r){t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=e_t+e),(t=this.classes.get(e))&&(t.cssClasses+=" "+r)})}defineClass(t,n){for(let e of t){let r=this.styleClasses.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.styleClasses.set(e,r)),n&&n.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.classes.forEach(t=>{t.cssClasses.includes(e)&&t.styles.push(...n.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=n_t(e))})}getTooltip(t,e){return(e&&this.namespaces.has(e)?this.namespaces.get(e):this).classes.get(t).tooltip}setLink(t,r,n){let i=O();t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=e_t+e),(t=this.classes.get(e))&&(t.link=tS.formatUrl(r,i),"sandbox"===i.securityLevel?t.linkTarget="_top":t.linkTarget="string"==typeof n?n_t(n):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFunc(t,e,r),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,n,i){if(t=L.sanitizeText(t,O()),"loose"===O().securityLevel&&void 0!==n&&this.classes.has(t)){let e=this.lookUpDomId(t),r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith('"')&&t.endsWith('"')&&(t=t.substr(1,t.length-2)),r[e]=t}}0===r.length&&r.push(e),this.functions.push(()=>{var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",()=>{tS.runFunc(n,...r)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:e_t+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e){if(this.namespaces.has(t))for(var r of e)r=this.splitClassNameAndType(r).className,this.classes.get(r).parent=t,this.namespaces.get(t).classes.set(r,this.classes.get(r))}setCssStyle(t,e){var r=this.classes.get(t);if(e&&r)for(var n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){var t,e,r,n,i,a=[],s=[],o=O();for(t of this.namespaces.keys()){var l=this.namespaces.get(t);l&&(l={id:l.id,label:l.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:o.look},a.push(l))}for(e of this.classes.keys()){var c,h=this.classes.get(e);h&&((c=h).parentId=h.parent,c.look=o.look,a.push(c))}let u=0;for(r of this.notes){u++;var d={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:o.class.padding??6,cssStyles:["text-align: left","white-space: nowrap","fill: "+o.themeVariables.noteBkgColor,"stroke: "+o.themeVariables.noteBorderColor],look:o.look};a.push(d),(d=this.classes.get(r.class)?.id??"")&&(d={id:"edgeNote"+u,start:r.id,end:d,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look},s.push(d))}for(n of this.interfaces){var p={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(p)}u=0;for(i of this.relations){u++;var g={id:nS(i.id1,i.id2,{prefix:"id",counter:u}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(i.relation.type1),arrowTypeEnd:this.getArrowMarker(i.relation.type2),startLabelRight:"none"===i.relationTitle1?"":i.relationTitle1,endLabelLeft:"none"===i.relationTitle2?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:1==i.relation.lineType?"dashed":"solid",look:o.look};s.push(g)}return{nodes:a,edges:s,other:{},config:o,direction:this.getDirection()}}}}),f_t=b(()=>{gct(),a_t=me(t=>`g.classGroup text { + fill: ${t.nodeBorder||t.classText}; + stroke: none; + font-family: ${t.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${t.classText}; +} +.edgeLabel .label rect { + fill: ${t.mainBkg}; +} +.label text { + fill: ${t.classText}; +} + +.labelBkg { + background: ${t.mainBkg}; +} +.edgeLabel .label span { + background: ${t.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.classGroup line { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${t.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${t.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} + ${ict()} +`,"getStyles"),s_t=a_t}),m_t=b(()=>{Tu(),t(),iO(),cct(),hct(),iS(),o_t=me((t,e="TB")=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),l_t=me(function(t,e){return e.db.getClasses()},"getClasses"),c_t=me(async function(t,e,r,n){D.info("REF0:"),D.info("Drawing class diagram (v3)",e);var{securityLevel:i,state:a,layout:s}=O(),o=n.db.getData(),i=WD(e,i);o.type=n.type,o.layoutAlgorithm=Hlt(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await Ylt(o,i),tS.insertTitle(i,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Vlt(i,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),h_t={getClasses:l_t,draw:c_t,getDir:o_t}}),y_t={};KBt(y_t,{diagram:()=>v_t});var v_t,x_t=b(()=>{d_t(),g_t(),f_t(),m_t(),v_t={parser:QSt,get db(){return new i_t},renderer:h_t,styles:s_t,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),b_t={};KBt(b_t,{diagram:()=>w_t});var w_t,k_t,T_t,E_t,C_t,S_t,__t,A_t,L_t,N_t,I_t,R_t,M_t,D_t,O_t,P_t,B_t,$_t,F_t,z_t,G_t,U_t,q_t,j_t,W_t,Y_t,H_t,V_t,X_t,K_t,Z_t,Q_t,J_t,tAt,eAt,rAt,nAt,iAt,aAt,sAt,oAt=b(()=>{d_t(),g_t(),f_t(),m_t(),w_t={parser:QSt,get db(){return new i_t},renderer:h_t,styles:s_t,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),lAt=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,2],n=[1,3],i=[1,4],a=[2,4],s=[1,9],o=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,33],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],E=[1,32],C=[1,35],S=[1,36],_=[1,37],A=[1,38],L=[1,34],N=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],R=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:this.$=a[o];break;case 8:this.$="nl";break;case 12:this.$=a[o];break;case 13:(c=a[o-1]).description=n.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=n.trimColon(a[o]),this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l,c=a[o],h=a[o-2].trim();a[o].match(":")&&(c=(l=a[o].split(":"))[0],h=[h,l[1]]),this.$={stmt:"state",id:c,type:"default",description:h};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:n.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:n.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:n.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:n.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:n.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:r,5:n,6:i},{1:[3]},{3:5,4:r,5:n,6:i},{3:6,4:r,5:n,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},e(N,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},e(N,[2,7]),e(N,[2,8]),e(N,[2,9]),e(N,[2,10]),e(N,[2,11]),e(N,[2,12],{14:[1,40],15:[1,41]}),e(N,[2,16]),{18:[1,42]},e(N,[2,18],{20:[1,43]}),{23:[1,44]},e(N,[2,22]),e(N,[2,23]),e(N,[2,24]),e(N,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(N,[2,28]),{34:[1,49]},{36:[1,50]},e(N,[2,31]),{13:51,24:d,57:L},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(I,[2,44],{58:[1,56]}),e(I,[2,45],{58:[1,57]}),e(N,[2,38]),e(N,[2,39]),e(N,[2,40]),e(N,[2,41]),e(N,[2,6]),e(N,[2,13]),{13:58,24:d,57:L},e(N,[2,17]),e(R,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(N,[2,29]),e(N,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(N,[2,14],{14:[1,71]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,72],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},e(N,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(N,[2,34]),e(N,[2,35]),e(N,[2,36]),e(N,[2,37]),e(I,[2,46]),e(I,[2,47]),e(N,[2,15]),e(N,[2,19]),e(R,a,{7:78}),e(N,[2,26]),e(N,[2,27]),{5:[1,79]},{5:[1,80]},{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,81],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},e(N,[2,32]),e(N,[2,33]),e(N,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:case 9:break;case 10:return 5;case 11:case 12:case 13:case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 70:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return e.yytext=e.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};r.lexer=n,me(t,"Parser"),(k_t=new((t.prototype=r).Parser=t)).parser=k_t,T_t=k_t}),cAt=b(()=>{C_t=E_t="TB",S_t="dir",A_t="root",L_t="relation",N_t="classDef",I_t="style",R_t="applyClass",M_t="default",O_t="fill:none",P_t="fill: #333",B_t="c",$_t="text",F_t="normal",z_t="rect",G_t="rectWithTitle",U_t="stateStart",q_t="stateEnd",j_t=D_t="divider",W_t="roundedWithTitle",H_t="noteGroup",X_t=(V_t="statediagram")+"-state",Z_t=(K_t="transition")+" note-edge",Q_t=V_t+"-note",J_t=V_t+"-cluster",tAt=V_t+"-cluster-alt",nAt=__t="state",aAt=(iAt="----")+(rAt=Y_t="note"),sAt=""+iAt+(eAt="parent")});function hAt(t="",e=0,r="",n=iAt){return n=null!==r&&0<r.length?""+n+r:"",nAt+`-${t}${n}-`+e}function uAt(t,e,r){var n;e.id&&"</join></fork>"!==e.id&&"</choice>"!==e.id&&(e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{(t=r.get(t))&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...t.styles])})),(n=t.find(t=>t.id===e.id))?Object.assign(n,e):t.push(e))}function dAt(t){return t?.classes?.join(" ")??""}function pAt(t){return t?.styles??[]}var gAt,fAt,mAt,yAt,vAt,xAt,bAt,wAt,kAt,TAt,EAt,CAt,SAt,_At,AAt,LAt,NAt,IAt,RAt,MAt,DAt,OAt,PAt,BAt,$At,FAt,zAt,GAt,UAt,qAt,jAt,WAt,YAt,HAt,VAt,XAt,KAt,ZAt=b(()=>{Tu(),t(),Oc(),cAt(),gAt=new Map,fAt=0,me(hAt,"stateDomId"),mAt=me((r,t,n,i,a,s,o,l)=>{D.trace("items",t),t.forEach(t=>{switch(t.stmt){case __t:case M_t:vAt(r,t,n,i,a,s,o,l);break;case L_t:vAt(r,t.state1,n,i,a,s,o,l),vAt(r,t.state2,n,i,a,s,o,l);var e={id:"edge"+fAt,start:t.state1.id,end:t.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:O_t,labelStyle:"",label:L.sanitizeText(t.description??"",O()),arrowheadStyle:P_t,labelpos:B_t,labelType:$_t,thickness:F_t,classes:K_t,look:o};a.push(e),fAt++}})},"setupDoc"),yAt=me((t,e=C_t)=>{let r=e;if(t.doc)for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),me(uAt,"insertOrUpdateNode"),me(dAt,"getClassesFromDbInfo"),me(pAt,"getStylesFromDbInfo"),vAt=me((r,n,t,i,a,e,s,o)=>{var l=n.id,c=t.get(l),h=dAt(c),u=pAt(c),d=O();if(D.info("dataFetcher parsedItem",n,c,u),"root"!==l){let t=z_t;if(!0===n.start?t=U_t:!1===n.start&&(t=q_t),n.type!==M_t&&(t=n.type),gAt.get(l)||gAt.set(l,{id:l,shape:t,description:L.sanitizeText(l,d),cssClasses:h+" "+X_t,cssStyles:u}),c=gAt.get(l),n.description&&(Array.isArray(c.description)?(c.shape=G_t,c.description.push(n.description)):c.description?.length&&0<c.description.length?(c.shape=G_t,c.description===l?c.description=[n.description]:c.description=[c.description,n.description]):(c.shape=z_t,c.description=n.description),c.description=L.sanitizeTextOrArray(c.description,d)),1===c.description?.length&&c.shape===G_t&&("group"===c.type?c.shape=W_t:c.shape=z_t),!c.type&&n.doc&&(D.info("Setting cluster for XCX",l,yAt(n)),c.type="group",c.isGroup=!0,c.dir=yAt(n),c.shape=n.type===D_t?j_t:W_t,c.cssClasses=c.cssClasses+` ${J_t} `+(e?tAt:"")),(h={labelStyle:"",shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:l,dir:c.dir,domId:hAt(l,fAt),type:c.type,isGroup:"group"===c.type,padding:8,rx:10,ry:10,look:s}).shape===j_t&&(h.label=""),r&&"root"!==r.id&&(D.trace("Setting node ",l," to be child of its parent ",r.id),h.parentId=r.id),h.centerLabel=!0,n.note){u={labelStyle:"",shape:Y_t,label:n.note.text,cssClasses:Q_t,cssStyles:[],cssCompiledStyles:[],id:l+aAt+"-"+fAt,domId:hAt(l,fAt,rAt),type:c.type,isGroup:"group"===c.type,padding:d.flowchart?.padding,look:s,position:n.note.position},r=l+sAt,d={labelStyle:"",shape:H_t,label:n.note.text,cssClasses:c.cssClasses,cssStyles:[],id:l+sAt,domId:hAt(l,fAt,eAt),type:"group",isGroup:!0,padding:16,look:s,position:n.note.position},fAt++,u.parentId=d.id=r,uAt(i,d,o),uAt(i,u,o),uAt(i,h,o);let t=l,e=u.id;"left of"===n.note.position&&(t=u.id,e=l),a.push({id:t+"-"+e,start:t,end:e,arrowhead:"none",arrowTypeEnd:"",style:O_t,labelStyle:"",classes:Z_t,arrowheadStyle:P_t,labelpos:B_t,labelType:$_t,thickness:F_t,look:s})}else uAt(i,h,o)}n.doc&&(D.trace("Adding nodes children "),mAt(n,n.doc,t,i,a,!e,s,o))},"dataFetcher"),xAt=me(()=>{gAt.clear(),fAt=0},"reset")}),QAt=b(()=>{Tu(),t(),iO(),cct(),hct(),iS(),cAt(),bAt=me((t,e=C_t)=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),wAt=me(function(t,e){return e.db.getClasses()},"getClasses"),kAt=me(async function(t,e,r,n){D.info("REF0:"),D.info("Drawing state diagram (v2)",e);var{securityLevel:i,state:a,layout:s}=O();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=WD(e,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await Ylt(o,l);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((a,t)=>{let s="string"==typeof t?t:"string"==typeof t?.id?t.id:"";if(s){let t=l.node()?.querySelectorAll("g"),e,r,n,i;t?.forEach(t=>{t.textContent?.trim()===s&&(e=t)}),e?(r=e.parentNode)?(n=document.createElementNS("http://www.w3.org/2000/svg","a"),i=a.url.replace(/^"+|"+$/g,""),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i),n.setAttribute("target","_blank"),a.tooltip&&(i=a.tooltip.replace(/^"+|"+$/g,""),n.setAttribute("title",i)),r.replaceChild(n,e),n.appendChild(e),D.info("🔗 Wrapped node in <a> tag for:",s,a.url)):D.warn("⚠️ Node has no parent, cannot wrap:",s):D.warn("⚠️ Could not find node matching text:",s)}else D.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(t))})}catch(t){D.error("❌ Error injecting clickable links:",t)}tS.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Vlt(l,8,V_t,a?.useMaxWidth??!0)},"draw"),TAt={getClasses:wAt,draw:kAt,getDir:bAt}}),JAt=b(()=>{Tu(),t(),iS(),Oc(),ku(),ZAt(),QAt(),cAt(),EAt={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},CAt=me(()=>new Map,"newClassesList"),SAt=me(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),_At=me(t=>JSON.parse(JSON.stringify(t)),"clone"),AAt=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=CAt(),this.documents={root:SAt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=yh,this.setAccTitle=mh,this.getAccDescription=xh,this.setAccDescription=vh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{me(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(var e of Array.isArray(t)?t:t.doc)switch(e.stmt){case __t:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case L_t:this.addRelation(e.state1,e.state2,e.description);break;case N_t:this.addStyleClass(e.id.trim(),e.classes);break;case I_t:this.handleStyleDef(e);break;case R_t:this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}var r,t=this.getStates(),n=O();xAt(),vAt(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&0<r.description.length)throw new Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(t){var e,r,n=t.id.trim().split(","),i=t.styleClass.split(",");for(e of n){let t=this.getState(e);t||(r=e.trim(),this.addState(r),t=this.getState(r)),t&&(t.styles=i.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){D.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(r,n,t){if(n.stmt===L_t)this.docTranslator(r,n.state1,!0),this.docTranslator(r,n.state2,!1);else if(n.stmt===__t&&(n.id===EAt.START_NODE?(n.id=r.id+(t?"_start":"_end"),n.start=t):n.id=n.id.trim()),(n.stmt===A_t||n.stmt===__t)&&n.doc){let t=[],e=[];for(var i of n.doc){var a;i.type===D_t?((a=_At(i)).doc=_At(e),t.push(a),e=[]):e.push(i)}0<t.length&&0<e.length&&(r={stmt:__t,id:UC(),type:"divider",doc:_At(e)},t.push(_At(r)),n.doc=t),n.doc.forEach(t=>this.docTranslator(n,t,!0))}}getRootDocV2(){return this.docTranslator({id:A_t,stmt:A_t},{id:A_t,stmt:A_t,doc:this.rootDoc},!0),{id:A_t,doc:this.rootDoc}}addState(t,e=M_t,r=void 0,n=void 0,i=void 0,a=void 0,s=void 0,o=void 0){let l=t?.trim();if(this.currentDocument.states.has(l)){if(!(t=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);t.doc||(t.doc=r),t.type||(t.type=e)}else D.info("Adding state ",l,n),this.currentDocument.states.set(l,{stmt:__t,id:l,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]});if(n&&(D.info("Setting state description",l,n),(Array.isArray(n)?n:[n]).forEach(t=>this.addDescription(l,t.trim()))),i){if(!(t=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);t.note=i,t.note.text=L.sanitizeText(t.note.text,O())}a&&(D.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(l,t.trim()))),s&&(D.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(t=>this.setStyle(l,t.trim()))),o&&(D.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(t=>this.setTextStyle(l,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:SAt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=CAt(),t||(this.links=new Map,fh())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){D.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,r){this.links.set(t,{url:e,tooltip:r}),D.warn("Adding link",t,e,r)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===EAt.START_NODE?(this.startEndCount++,""+EAt.START_TYPE+this.startEndCount):t}startTypeIfNeeded(t="",e=M_t){return t===EAt.START_NODE?EAt.START_TYPE:e}endIdIfNeeded(t=""){return t===EAt.END_NODE?(this.startEndCount++,""+EAt.END_TYPE+this.startEndCount):t}endTypeIfNeeded(t="",e=M_t){return t===EAt.END_NODE?EAt.END_TYPE:e}addRelationObjs(t,e,r=""){var n=this.startIdIfNeeded(t.id.trim()),i=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),s=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:L.sanitizeText(r,O())})}addRelation(t,e,r){var n,i;"object"==typeof t&&"object"==typeof e?this.addRelationObjs(t,e,r):"string"==typeof t&&"string"==typeof e&&(n=this.startIdIfNeeded(t.trim()),t=this.startTypeIfNeeded(t),i=this.endIdIfNeeded(e.trim()),e=this.endTypeIfNeeded(e),this.addState(n,t),this.addState(i,e),this.currentDocument.relations.push({id1:n,id2:i,relationTitle:r?L.sanitizeText(r,O()):void 0}))}addDescription(t,e){t=this.currentDocument.states.get(t),e=e.startsWith(":")?e.replace(":","").trim():e,t?.descriptions?.push(L.sanitizeText(e,O()))}cleanupLabel(t){return(t.startsWith(":")?t.slice(2):t).trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let r=this.classes.get(t);e&&r&&e.split(EAt.STYLECLASS_SEP).forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp(EAt.COLOR_KEYWORD).exec(t)&&(t=e.replace(EAt.FILL_KEYWORD,EAt.BG_FILL).replace(EAt.COLOR_KEYWORD,EAt.FILL_KEYWORD),r.textStyles.push(t)),r.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,r){t.split(",").forEach(t=>{let e=this.getState(t);e||(t=t.trim(),this.addState(t),e=this.getState(t)),e?.classes?.push(r)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===S_t)}getDirection(){return this.getDirectionStatement()?.value??E_t}setDirection(t){var e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:S_t,value:t})}trimColon(t){return(t.startsWith(":")?t.slice(1):t).trim()}getData(){var t=O();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:bAt(this.getRootDocV2())}}getConfig(){return O().state}}}),t9t=b(()=>{LAt=me(t=>` +defs #statediagram-barbEnd { + fill: ${t.transitionColor}; + stroke: ${t.transitionColor}; + } +g.stateGroup text { + fill: ${t.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${t.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${t.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.stateGroup line { + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${t.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${t.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + + text { + fill: ${t.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${t.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${t.transitionLabelColor||t.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${t.transitionLabelColor||t.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${t.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node .fork-join { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node circle.state-end { + fill: ${t.innerEndBackground}; + stroke: ${t.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${t.compositeBackground||t.background}; + // stroke: ${t.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${t.stateBkg||t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${t.lineColor}; +} + +.statediagram-cluster rect { + fill: ${t.compositeTitleBackground}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${t.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${t.stateBorder||t.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${t.compositeBackground||t.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${t.altBackground||"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${t.altBackground||"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${t.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${t.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${t.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${t.lineColor}; + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} +`,"getStyles"),NAt=LAt}),e9t=b(()=>{i6(),JAt(),iS(),Oc(),Tu(),t(),IAt=me(t=>t.append("circle").attr("class","start-state").attr("r",O().state.sizeUnit).attr("cx",O().state.padding+O().state.sizeUnit).attr("cy",O().state.padding+O().state.sizeUnit),"drawStartState"),RAt=me(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",O().state.textHeight).attr("class","divider").attr("x2",2*O().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),MAt=me((t,e)=>{var r=(e=t.append("text").attr("x",2*O().state.padding).attr("y",O().state.textHeight+2*O().state.padding).attr("font-size",O().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",O().state.padding).attr("y",O().state.padding).attr("width",r.width+2*O().state.padding).attr("height",r.height+2*O().state.padding).attr("rx",O().state.radius),e},"drawSimpleState"),DAt=me((t,e)=>{let r=me(function(t,e,r){t=t.append("tspan").attr("x",2*O().state.padding).text(e),r||t.attr("dy",O().state.textHeight)},"addTspan"),n=t.append("text").attr("x",2*O().state.padding).attr("y",O().state.textHeight+1.3*O().state.padding).attr("font-size",O().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,a=t.append("text").attr("x",O().state.padding).attr("y",i+.4*O().state.padding+O().state.dividerMargin+O().state.textHeight).attr("class","state-description"),s=!0,o=!0;e.descriptions.forEach(function(t){s||(r(a,t,o),o=!1),s=!1});var e=t.append("line").attr("x1",O().state.padding).attr("y1",O().state.padding+i+O().state.dividerMargin/2).attr("y2",O().state.padding+i+O().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,n.width);return e.attr("x2",c+3*O().state.padding),t.insert("rect",":first-child").attr("x",O().state.padding).attr("y",O().state.padding).attr("width",c+2*O().state.padding).attr("height",l.height+i+2*O().state.padding).attr("rx",O().state.radius),t},"drawDescrState"),OAt=me((t,e,r)=>{let n=O().state.padding,i=2*O().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",O().state.titleShift).attr("font-size",O().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+i,h=Math.max(c,s);h===s&&(h+=i);let u,d=t.node().getBBox();return e.doc,u=o-n,s<c&&(u=(s-h)/2+n),Math.abs(o-d.x)<n&&s<c&&(u=o-(c-s)/2),e=1-O().state.textHeight,t.insert("rect",":first-child").attr("x",u).attr("y",e).attr("class",r?"alt-composit":"composit").attr("width",h).attr("height",d.height+O().state.textHeight+O().state.titleShift+1).attr("rx","0"),l.attr("x",u+n),c<=s&&l.attr("x",o+(h-i)/2-c/2+n),t.insert("rect",":first-child").attr("x",u).attr("y",O().state.titleShift-O().state.textHeight-O().state.padding).attr("width",h).attr("height",3*O().state.textHeight).attr("rx",O().state.radius),t.insert("rect",":first-child").attr("x",u).attr("y",O().state.titleShift-O().state.textHeight-O().state.padding).attr("width",h).attr("height",d.height+3+2*O().state.textHeight).attr("rx",O().state.radius),t},"addTitleAndBox"),PAt=me(t=>(t.append("circle").attr("class","end-state-outer").attr("r",O().state.sizeUnit+O().state.miniPadding).attr("cx",O().state.padding+O().state.sizeUnit+O().state.miniPadding).attr("cy",O().state.padding+O().state.sizeUnit+O().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",O().state.sizeUnit).attr("cx",O().state.padding+O().state.sizeUnit+2).attr("cy",O().state.padding+O().state.sizeUnit+2)),"drawEndState"),BAt=me((t,e)=>{let r=O().state.forkWidth,n=O().state.forkHeight;return e.parentId&&(e=r,r=n,n=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",O().state.padding).attr("y",O().state.padding)},"drawForkJoinState"),$At=me((t,e,r,n)=>{let i=0,a=n.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),t.replace(/\r\n/g,"<br/>")),o=(s=s.replace(/\n/g,"<br/>")).split(L.lineBreakRegex),l=1.25*O().state.noteMargin;for(var c of o){var h;0<(c=c.trim()).length&&((h=a.append("tspan")).text(c),0===l&&(c=h.node().getBBox(),l+=c.height),i+=l,h.attr("x",e+O().state.noteMargin),h.attr("y",r+i+1.25*O().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),FAt=me((t,e)=>{e.attr("class","state-note");var r=e.append("rect").attr("x",0).attr("y",O().state.padding),e=e.append("g"),{textWidth:t,textHeight:e}=$At(t,0,0,e);return r.attr("height",e+2*O().state.noteMargin),r.attr("width",t+2*O().state.noteMargin),r},"drawNote"),zAt=me(function(t,e){var r={id:n=e.id,label:e.id,width:0,height:0},t=t.append("g").attr("id",n).attr("class","stateGroup"),n=("start"===e.type&&IAt(t),"end"===e.type&&PAt(t),"fork"!==e.type&&"join"!==e.type||BAt(t,e),"note"===e.type&&FAt(e.note.text,t),"divider"===e.type&&RAt(t),"default"===e.type&&0===e.descriptions.length&&MAt(t,e),"default"===e.type&&0<e.descriptions.length&&DAt(t,e),t.node().getBBox());return r.width=n.width+2*O().state.padding,r.height=n.height+2*O().state.padding,r},"drawState"),GAt=0,UAt=me(function(c,h,u){var d=me(function(t){switch(t){case AAt.relationType.AGGREGATION:return"aggregation";case AAt.relationType.EXTENSION:return"extension";case AAt.relationType.COMPOSITION:return"composition";case AAt.relationType.DEPENDENCY:return"dependency"}},"getRelationType");h.points=h.points.filter(t=>!Number.isNaN(t.y));let t=h.points,e=r3().x(function(t){return t.x}).y(function(t){return t.y}).curve(v3),r=c.append("path").attr("d",e(t)).attr("id","edge"+GAt).attr("class","transition"),n="";if(O().state.arrowMarkerAbsolute&&(n=gc(!0)),r.attr("marker-end","url("+n+"#"+d(AAt.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let e=c.append("g").attr("class","stateLabel"),{x:r,y:n}=tS.calcLabelPosition(h.points),i=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let t=0;t<=i.length;t++){var p=e.append("text").attr("text-anchor","middle").text(i[t]).attr("x",r).attr("y",n+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),D.info(g.x,r,n+a),0===a&&(a=p.node().getBBox().height,D.info("Title height",a,n)),s.push(p)}let t=a*i.length;if(1<i.length){let r=(i.length-1)*a*.5;s.forEach((t,e)=>t.attr("y",n+e*a-r)),t=a*i.length}d=e.node().getBBox(),e.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-O().state.padding/2).attr("y",n-t/2-O().state.padding/2-3.5).attr("width",o+O().state.padding).attr("height",t+O().state.padding),D.info(d)}GAt++},"drawEdge")}),r9t=b(()=>{i6(),pK(),tH(),t(),Oc(),e9t(),Tu(),lh(),jAt={},WAt=me(function(){},"setConf"),YAt=me(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),HAt=me(function(t,e,r,n){qAt=O().state;let i=O().securityLevel,a;"sandbox"===i&&(a=H("#i"+e));var s=H("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===i?a.nodes()[0].contentDocument:document,t=(D.debug("Rendering diagram "+t),s.select(`[id='${e}']`)),e=(YAt(t),n.db.getRootDoc()),e=(XAt(e,t,void 0,!1,s,o,n),qAt.padding),o=(s=t.node().getBBox()).width+2*e;Zc(t,n=s.height+2*e,1.75*o,qAt.useMaxWidth),t.attr("viewBox",`${s.x-qAt.padding} ${s.y-qAt.padding} `+o+" "+n)},"draw"),VAt=me(t=>t?t.length*qAt.fontSizeFactor:1,"getLabelWidth"),XAt=me((t,e,r,n,i,a,s)=>{let o=new QY({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l<t.length;l++)if("relation"===t[l].stmt){c=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:c?1:qAt.edgeLengthFactor,nodeSep:c?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:c?1:qAt.edgeLengthFactor,nodeSep:c?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}});var h,u=s.db.getStates(),d=s.db.getRelations();for(h of Object.keys(u)){var p,g,f=u[h];r&&(f.parentId=r);let t;f.doc?(g=e.append("g").attr("id",f.id).attr("class","stateGroup"),t=XAt(f.doc,g,f.id,!n,i,a,s),g=(g=OAt(g,f,n)).node().getBBox(),t.width=g.width,t.height=g.height+qAt.padding/2,jAt[f.id]={y:qAt.compositTitleSize}):t=zAt(e,f,o),f.note?(g={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},p=zAt(e,g,o),"left of"===f.note.position?(o.setNode(t.id+"-note",p),o.setNode(t.id,t)):(o.setNode(t.id,t),o.setNode(t.id+"-note",p)),o.setParent(t.id,t.id+"-group"),o.setParent(t.id+"-note",t.id+"-group")):o.setNode(t.id,t)}D.debug("Count=",o.nodeCount(),o);let m=0,y=(d.forEach(function(t){m++,D.debug("Setting edge",t),o.setEdge(t.id1,t.id2,{relation:t,width:VAt(t.title),height:qAt.labelHeight*L.getRows(t.title).length,labelpos:"c"},"id"+m)}),zX(o),D.debug("Graph after layout",o.nodes()),e.node());o.nodes().forEach(function(t){void 0!==t&&void 0!==o.node(t)?(D.warn("Node "+t+": "+JSON.stringify(o.node(t))),i.select("#"+y.id+" #"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y+(jAt[t]?jAt[t].y:0)-o.node(t).height/2)+" )"),i.select("#"+y.id+" #"+t).attr("data-x-shift",o.node(t).x-o.node(t).width/2),a.querySelectorAll("#"+y.id+" #"+t+" .divider").forEach(t=>{let e=t.parentElement,r=0,n=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),n=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(n))&&(n=0),t.setAttribute("x1",0-n+8),t.setAttribute("x2",r-n-8)})):D.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}),y.getBBox(),o.edges().forEach(function(t){void 0!==t&&void 0!==o.edge(t)&&(D.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),UAt(e,o.edge(t),o.edge(t).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*qAt.padding,v.height=d.height+2*qAt.padding,D.debug("Doc rendered",v,o),v},"renderDoc"),KAt={setConf:WAt,draw:HAt}}),n9t={};KBt(n9t,{diagram:()=>i9t});var i9t,a9t=b(()=>{lAt(),JAt(),t9t(),r9t(),i9t={parser:T_t,get db(){return new AAt(1)},renderer:KAt,styles:NAt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),s9t={};KBt(s9t,{diagram:()=>o9t});var o9t,l9t,c9t,h9t,u9t,d9t,p9t,g9t,f9t,m9t,y9t,v9t,x9t,b9t,w9t,k9t,T9t,E9t,C9t,S9t,_9t,A9t,L9t,N9t,I9t,R9t,M9t,D9t,O9t,P9t,B9t,$9t=b(()=>{lAt(),JAt(),t9t(),QAt(),o9t={parser:T_t,get db(){return new AAt(2)},renderer:TAt,styles:NAt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),F9t=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],n={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:n.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:l},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:15,11:n,12:i,14:a,16:s,17:o,18:l},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,16]},{15:[1,17]},e(r,[2,11]),e(r,[2,12]),{19:[1,18]},e(r,[2,4]),e(r,[2,9]),e(r,[2,10]),e(r,[2,13])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};n.lexer=i,me(t,"Parser"),(l9t=new((t.prototype=n).Parser=t)).parser=l9t,c9t=l9t}),z9t=b(()=>{Tu(),ku(),h9t="",u9t=[],d9t=[],p9t=[],g9t=me(function(){u9t.length=0,d9t.length=0,h9t="",p9t.length=0,fh()},"clear"),f9t=me(function(t){h9t=t,u9t.push(t)},"addSection"),m9t=me(function(){return u9t},"getSections"),y9t=me(function(){let t=w9t(),e=0;for(;!t&&e<100;)t=w9t(),e++;return d9t.push(...p9t),d9t},"getTasks"),v9t=me(function(){let e=[];return d9t.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),x9t=me(function(t,e){let r=e.substr(1).split(":"),n=0;e=(1===r.length?(n=Number(r[0]),[]):(n=Number(r[0]),r[1].split(","))).map(t=>t.trim()),e={section:h9t,type:h9t,people:e,task:t,score:n},p9t.push(e)},"addTask"),b9t=me(function(t){t={section:h9t,type:h9t,description:t,task:t,classes:[]},d9t.push(t)},"addTaskOrg"),w9t=me(function(){let t=me(function(t){return p9t[t].processed},"compileTask"),e=!0;for(var[r,n]of p9t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),k9t=me(function(){return v9t()},"getActors"),T9t={getConfig:me(()=>O().journey,"getConfig"),clear:g9t,setDiagramTitle:bh,getDiagramTitle:wh,setAccTitle:mh,getAccTitle:yh,setAccDescription:vh,getAccDescription:xh,addSection:f9t,getSections:m9t,getTasks:y9t,addTask:x9t,addTaskOrg:b9t,getActors:k9t}}),G9t=b(()=>{gct(),E9t=me(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + font-family: ${t.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor?"fill: "+t.faceColor:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0?"fill: "+t.fillType0:""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0?"fill: "+t.fillType1:""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0?"fill: "+t.fillType2:""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0?"fill: "+t.fillType3:""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0?"fill: "+t.fillType4:""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0?"fill: "+t.fillType5:""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0?"fill: "+t.fillType6:""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0?"fill: "+t.fillType7:""}; + } + + .actor-0 { + ${t.actor0?"fill: "+t.actor0:""}; + } + .actor-1 { + ${t.actor1?"fill: "+t.actor1:""}; + } + .actor-2 { + ${t.actor2?"fill: "+t.actor2:""}; + } + .actor-3 { + ${t.actor3?"fill: "+t.actor3:""}; + } + .actor-4 { + ${t.actor4?"fill: "+t.actor4:""}; + } + .actor-5 { + ${t.actor5?"fill: "+t.actor5:""}; + } + ${ict()} +`,"getStyles"),C9t=E9t}),U9t=b(()=>{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var d=t*c-c*(u.length-1)/2,p=e.append("text").attr("x",r+i/2).attr("y",n).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+i/2).attr("dy",d).text(u[t]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(t,e,r,n,i,a,s,o){var l=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),c(t,e,r,n,i,a,s,o),g(l,s)}function g(t,e){for(var r in e)r in e&&t.attr(r,e[r])}i6(),o6(),S9t=me(function(t,e){return Ew(t,e)},"drawRect"),_9t=me(function(t,r){var e=t.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function n(t){var e=Y5().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function i(t){var e=Y5().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(t=t.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),me(n,"smile"),me(i,"sad"),me(a,"ambivalent"),(3<r.score?n:r.score<3?i:a)(t),e},"drawFace"),A9t=me(function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t},"drawCircle"),L9t=me(function(t,e){return Sw(t,e)},"drawText"),N9t=me(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}me(r,"genPoints");var n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,L9t(t,e)},"drawLabel"),I9t=me(function(t,e,r){var t=t.append("g"),n=Lw();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,S9t(t,n),O9t(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),R9t=-1,M9t=me(function(t,r,e){let n=r.x+e.width/2,i=t.append("g"),a=(R9t++,i.append("line").attr("id","task"+R9t).attr("x1",n).attr("y1",r.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),_9t(i,{cx:n,cy:300+30*(5-r.score),score:r.score}),(t=Lw()).x=r.x,t.y=r.y,t.fill=r.fill,t.width=e.width,t.height=e.height,t.class="task task-type-"+r.num,t.rx=3,t.ry=3,S9t(i,t),r.x+14);r.people.forEach(t=>{var e=r.actors[t].color,e={cx:a,cy:r.y,r:7,fill:e,stroke:"#000",title:t,pos:r.actors[t].position};A9t(i,e),a+=10}),O9t(e)(r.task,i,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),D9t=me(function(t,e){Cw(t,e)},"drawBackgroundRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),O9t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},P9t=me(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),B9t={drawRect:S9t,drawCircle:A9t,drawSection:I9t,drawText:L9t,drawLabel:N9t,drawTask:M9t,drawBackgroundRect:D9t,initGraphics:P9t}});function q9t(s){let n=O().journey,o=n.maxLabelWidth,l=(Y9t=0,60);Object.keys(W9t).forEach(e=>{var t=W9t[e].color,t={cx:20,cy:l,r:7,fill:t,stroke:"#000",pos:W9t[e].position};B9t.drawCircle(s,t);let i=s.append("text").attr("visibility","hidden").text(e),r=i.node().getBoundingClientRect().width,a=(i.remove(),[]);if(r<=o)a=[e];else{let t=e.split(" "),n="";i=s.append("text").attr("visibility","hidden"),t.forEach(e=>{var t=n?n+" "+e:e;if(i.text(t),i.node().getBoundingClientRect().width>o){if(n&&a.push(n),n=e,i.text(e),i.node().getBoundingClientRect().width>o){let t="";for(var r of e)t+=r,i.text(t+"-"),i.node().getBoundingClientRect().width>o&&(a.push(t.slice(0,-1)+"-"),t=r);n=t}}else n=t}),n&&a.push(n),i.remove()}a.forEach((t,e)=>{e={x:40,y:l+7+20*e,fill:"#666",text:t,textMargin:n.boxTextMargin??5},t=B9t.drawText(s,e).node().getBoundingClientRect().width,Y9t<t&&t>n.leftMargin-t&&(Y9t=t)}),l+=Math.max(20,20*a.length)})}var j9t,W9t,Y9t,H9t,V9t,X9t,K9t,Z9t,Q9t,J9t,tLt,eLt=b(()=>{i6(),U9t(),Tu(),lh(),j9t=me(function(e){Object.keys(e).forEach(function(t){H9t[t]=e[t]})},"setConf"),W9t={},Y9t=0,me(q9t,"drawActorLegend"),H9t=O().journey,V9t=0,X9t=me(function(t,e,r,n){let i=O(),a=i.journey.titleColor,s=i.journey.titleFontSize,o=i.journey.titleFontFamily,l=i.securityLevel,c;"sandbox"===l&&(c=H("#i"+e));var h,u=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body"),u=(K9t.init(),u.select("#"+e)),e=(B9t.initGraphics(u),n.db.getTasks()),d=n.db.getDiagramTitle(),n=n.db.getActors();for(h in W9t)delete W9t[h];let p=0;n.forEach(t=>{W9t[t]={color:H9t.actorColours[p%H9t.actorColours.length],position:p},p++}),q9t(u),V9t=H9t.leftMargin+Y9t,K9t.insert(0,0,V9t,50*Object.keys(W9t).length),J9t(u,e,0);var n=K9t.getBounds(),e=(d&&u.append("text").text(d).attr("x",V9t).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),n.stopy-n.starty+2*H9t.diagramMarginY),g=V9t+n.stopx+2*H9t.diagramMarginX,d=(Zc(u,e,g,H9t.useMaxWidth),u.append("line").attr("x1",V9t).attr("y1",4*H9t.height).attr("x2",g-V9t-4).attr("y2",4*H9t.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),d?70:0);u.attr("viewBox",n.startx+` -25 ${g} `+(e+d)),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",e+d+25)},"draw"),K9t={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:me(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:me(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:me(function(n,i,a,s){let o=O().journey,l=this,c=0;function t(r){return me(function(t){c++;var e=l.sequenceItems.length-c+1;l.updateVal(t,"starty",i-e*o.boxMargin,Math.min),l.updateVal(t,"stopy",s+e*o.boxMargin,Math.max),l.updateVal(K9t.data,"startx",n-e*o.boxMargin,Math.min),l.updateVal(K9t.data,"stopx",a+e*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(t,"startx",n-e*o.boxMargin,Math.min),l.updateVal(t,"stopx",a+e*o.boxMargin,Math.max),l.updateVal(K9t.data,"starty",i-e*o.boxMargin,Math.min),l.updateVal(K9t.data,"stopy",s+e*o.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t())},"updateBounds"),insert:me(function(t,e,r,n){var i=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,n),e=Math.max(e,n);this.updateVal(K9t.data,"startx",i,Math.min),this.updateVal(K9t.data,"starty",r,Math.min),this.updateVal(K9t.data,"stopx",t,Math.max),this.updateVal(K9t.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return this.data},"getBounds")},Z9t=H9t.sectionFills,Q9t=H9t.sectionColours,J9t=me(function(t,n,e){let i=O().journey,a="",r=2*i.height+i.diagramMarginY,s=e+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of n.entries()){if(a!==d.section){l=Z9t[o%Z9t.length],h=o%Z9t.length,c=Q9t[o%Q9t.length];let e=0,r=d.section;for(let t=u;t<n.length&&n[t].section==r;t++)e+=1;var p={x:u*i.taskMargin+u*i.width+V9t,y:50,text:d.section,fill:l,num:h,colour:c,taskCount:e};B9t.drawSection(t,p,i),a=d.section,o++}p=d.people.reduce((t,e)=>(W9t[e]&&(t[e]=W9t[e]),t),{}),d.x=u*i.taskMargin+u*i.width+V9t,d.y=s,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,B9t.drawTask(t,d,i),K9t.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),tLt={setConf:j9t,draw:X9t}}),rLt={};KBt(rLt,{diagram:()=>nLt});var nLt,iLt,aLt,sLt=b(()=>{F9t(),z9t(),G9t(),eLt(),nLt={parser:c9t,db:T9t,renderer:tLt,styles:C9t,init:me(t=>{tLt.setConf(t.journey),T9t.clear()},"init")}}),oLt=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],n={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:n.addTask(a[o],0,""),this.$=a[o];break;case 16:n.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:18,11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,19]},{15:[1,20]},e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),e(r,[2,4]),e(r,[2,9]),e(r,[2,10])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};n.lexer=i,me(t,"Parser"),(iLt=new((t.prototype=n).Parser=t)).parser=iLt,aLt=iLt}),lLt={};KBt(lLt,{addEvent:()=>bLt,addSection:()=>mLt,addTask:()=>xLt,addTaskOrg:()=>wLt,clear:()=>fLt,default:()=>TLt,getCommonDb:()=>gLt,getSections:()=>yLt,getTasks:()=>vLt});var cLt,hLt,uLt,dLt,pLt,gLt,fLt,mLt,yLt,vLt,xLt,bLt,wLt,kLt,TLt,ELt=b(()=>{ku(),cLt="",hLt=0,uLt=[],dLt=[],pLt=[],gLt=me(()=>hh,"getCommonDb"),fLt=me(function(){uLt.length=0,dLt.length=0,cLt="",pLt.length=0,fh()},"clear"),mLt=me(function(t){cLt=t,uLt.push(t)},"addSection"),yLt=me(function(){return uLt},"getSections"),vLt=me(function(){let t=kLt(),e=0;for(;!t&&e<100;)t=kLt(),e++;return dLt.push(...pLt),dLt},"getTasks"),xLt=me(function(t,e,r){t={id:hLt++,section:cLt,type:cLt,task:t,score:e||0,events:r?[r]:[]},pLt.push(t)},"addTask"),bLt=me(function(t){pLt.find(t=>t.id===hLt-1).events.push(t)},"addEvent"),wLt=me(function(t){t={section:cLt,type:cLt,description:t,task:t,classes:[]},dLt.push(t)},"addTaskOrg"),kLt=me(function(){let t=me(function(t){return pLt[t].processed},"compileTask"),e=!0;for(var[r,n]of pLt.entries())t(r),e=e&&n.processed;return e},"compileTasks"),TLt={clear:fLt,getCommonDb:gLt,addSection:mLt,getSections:yLt,getTasks:vLt,addTask:xLt,addTaskOrg:wLt,addEvent:bLt}});function CLt(t,o){t.each(function(){var e,r=H(this),n=r.text().split(/(\s+|<br>)/).reverse(),i=[],a=r.attr("y"),t=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",t+"em");for(let t=0;t<n.length;t++)e=n[n.length-1-t],i.push(e),s.text(i.join(" ").trim()),(s.node().getComputedTextLength()>o||"<br>"===e)&&(i.pop(),s.text(i.join(" ").trim()),i="<br>"===e?[""]:[e],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var SLt,_Lt,ALt,LLt,NLt,ILt,RLt,MLt,DLt,OLt,PLt,BLt,$Lt,FLt,zLt,GLt,ULt,qLt,jLt,WLt,YLt,HLt,VLt,XLt,KLt=b(()=>{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var d=t*c-c*(u.length-1)/2,p=e.append("text").attr("x",r+i/2).attr("y",n).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+i/2).attr("dy",d).text(u[t]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(t,e,r,n,i,a,s,o){var l=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),c(t,e,r,n,i,a,s,o),g(l,s)}function g(t,e){for(var r in e)r in e&&t.attr(r,e[r])}i6(),SLt=me(function(t,e){return(t=t.append("rect")).attr("x",e.x),t.attr("y",e.y),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("width",e.width),t.attr("height",e.height),t.attr("rx",e.rx),t.attr("ry",e.ry),void 0!==e.class&&t.attr("class",e.class),t},"drawRect"),_Lt=me(function(t,r){var e=t.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function n(t){var e=Y5().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function i(t){var e=Y5().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(t=t.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),me(n,"smile"),me(i,"sad"),me(a,"ambivalent"),(3<r.score?n:r.score<3?i:a)(t),e},"drawFace"),ALt=me(function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t},"drawCircle"),LLt=me(function(t,e){var r=e.text.replace(/<br\s*\/?>/gi," "),n=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),NLt=me(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}me(r,"genPoints");var n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,LLt(t,e)},"drawLabel"),ILt=me(function(t,e,r){var t=t.append("g"),n=PLt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,SLt(t,n),BLt(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),RLt=-1,MLt=me(function(t,e,r){var n=e.x+r.width/2,t=t.append("g");RLt++,t.append("line").attr("id","task"+RLt).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),_Lt(t,{cx:n,cy:300+30*(5-e.score),score:e.score}),(n=PLt()).x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="task task-type-"+e.num,n.rx=3,n.ry=3,SLt(t,n),BLt(r)(e.task,t,n.x,n.y,n.width,n.height,{class:"task"},r,e.colour)},"drawTask"),DLt=me(function(t,e){SLt(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),OLt=me(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),PLt=me(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),BLt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},$Lt=me(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),me(CLt,"wrap"),FLt=me(function(t,e,r,n){var r=r%12-1,t=t.append("g"),i=(e.section=r,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+r),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(CLt,e.width).node().getBBox(),s=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),GLt(i,e,r,n),e},"drawNode"),zLt=me(function(t,e,r){var n=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(CLt,e.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return t.remove(),n.height+1.1*r*.5+e.padding},"getVirtualNodeHeight"),GLt=me(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),ULt={drawRect:SLt,drawCircle:ALt,drawSection:ILt,drawText:LLt,drawLabel:NLt,drawTask:MLt,drawBackgroundRect:DLt,getTextObj:OLt,getNoteRect:PLt,initGraphics:$Lt,drawNode:FLt,getVirtualNodeHeight:zLt}}),ZLt=b(()=>{i6(),KLt(),t(),Tu(),lh(),qLt=me(function(t,e,r,n){let i=O(),a=i.timeline?.leftMargin??50,s=(D.debug("timeline",n.db),i.securityLevel),o,l=("sandbox"===s&&(o=H("#i"+e)),H("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+e)),c=(l.append("g"),n.db.getTasks()),h=n.db.getCommonDb().getDiagramTitle();D.debug("task",c),ULt.initGraphics(l);var u,d,e=n.db.getSections();D.debug("sections",e);let p=0,g=0,f,m=50+a,y=50,v=0,x=!0,b=(e.forEach(function(t){t={number:v,descr:t,section:v,width:150,padding:20,maxHeight:p},t=ULt.getVirtualNodeHeight(l,t,i),D.debug("sectionHeight before draw",t),p=Math.max(p,t+20)}),0),w=0;D.debug("tasks.length",c.length);for([u,d]of c.entries()){var k,T={number:u,descr:d,section:d.section,width:150,padding:20,maxHeight:g},T=ULt.getVirtualNodeHeight(l,T,i);D.debug("taskHeight before draw",T),g=Math.max(g,T+20),b=Math.max(b,d.events.length);let t=0;for(k of d.events){var E={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};t+=ULt.getVirtualNodeHeight(l,E,i)}0<d.events.length&&(t+=10*(d.events.length-1)),w=Math.max(w,t)}D.debug("maxSectionHeight before draw",p),D.debug("maxTaskHeight before draw",g),e&&0<e.length?e.forEach(e=>{var t=c.filter(t=>t.section===e),r={number:v,descr:e,section:v,width:200*Math.max(t.length,1)-50,padding:20,maxHeight:p},n=(D.debug("sectionNode",r),l.append("g")),r=ULt.drawNode(n,r,v,i);D.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0<t.length&&jLt(l,t,v,m,y,g,i,b,w,p,!1),m+=200*Math.max(t.length,1),y=50,v++}):(x=!1,jLt(l,c,v,m,y,g,i,b,w,p,!0)),n=l.node().getBBox(),D.debug("bounds",n),h&&l.append("text").text(h).attr("x",n.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=x?p+g+150:g+100,l.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",f).attr("x2",n.width+3*a).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Qc(void 0,l,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),jLt=me(function(t,e,r,n,i,a,s,o,l,c,h){for(var u of e){var d={descr:u.task,section:r,number:r,width:150,padding:20,maxHeight:a},p=(D.debug("taskNode",d),t.append("g").attr("class","taskWrapper")),d=ULt.drawNode(p,d,r,s).height;D.debug("taskHeight after draw",d),p.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,d),u.events&&(p=t.append("g").attr("class","lineWrapper"),i+=100,WLt(t,u.events,r,n,i,s),i-=100,p.append("line").attr("x1",n+95).attr("y1",i+a).attr("x2",n+95).attr("y2",i+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")),n+=200,h&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),WLt=me(function(t,e,r,n,i,a){let s=0,o=i;i+=100;for(var l of e){var l={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50},c=(D.debug("eventNode",l),t.append("g").attr("class","eventWrapper")),l=ULt.drawNode(c,l,r,a).height;s+=l,c.attr("transform",`translate(${n}, ${i})`),i=i+10+l}return i=o,s},"drawEvents"),YLt={setConf:me(()=>{},"setConf"),draw:qLt}}),QLt=b(()=>{jr(),HLt=me(e=>{let r="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],fe(e["lineColor"+t])?e["lineColor"+t]=a(e["lineColor"+t],20):e["lineColor"+t]=ke(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var n=""+(17-3*t);r+=` + .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} path { + fill: ${e["cScale"+t]}; + } + .section-${t-1} text { + fill: ${e["cScaleLabel"+t]}; + } + .node-icon-${t-1} { + font-size: 40px; + color: ${e["cScaleLabel"+t]}; + } + .section-edge-${t-1}{ + stroke: ${e["cScale"+t]}; + } + .edge-depth-${t-1}{ + stroke-width: ${n}; + } + .section-${t-1} line { + stroke: ${e["cScaleInv"+t]} ; + stroke-width: 3; + } + + .lineWrapper line{ + stroke: ${e["cScaleLabel"+t]} ; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `}return r},"genSections"),VLt=me(t=>` + .edge { + stroke-width: 3; + } + ${HLt(t)} + .section-root rect, .section-root path, .section-root circle { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`,"getStyles"),XLt=VLt}),JLt={};KBt(JLt,{diagram:()=>tNt});var tNt,eNt,rNt,nNt=b(()=>{oLt(),ELt(),ZLt(),QLt(),tNt={db:lLt,renderer:YLt,parser:aLt,styles:XLt}}),iNt=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,4],n=[1,13],i=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],r={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 17:case 21:n.decorateNode({class:a[o]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:n.decorateNode({icon:a[o]});break;case 25:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.getType(a[o-2],a[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:n,9:22,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:h,7:u,10:23,11:d},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(g,[2,14],{7:f,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:f,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};r.lexer=c,me(t,"Parser"),(eNt=new((t.prototype=r).Parser=t)).parser=eNt,rNt=eNt});function aNt(t,e=0){return(sNt[t[e+0]]+sNt[t[e+1]]+sNt[t[e+2]]+sNt[t[e+3]]+"-"+sNt[t[e+4]]+sNt[t[e+5]]+"-"+sNt[t[e+6]]+sNt[t[e+7]]+"-"+sNt[t[e+8]]+sNt[t[e+9]]+"-"+sNt[t[e+10]]+sNt[t[e+11]]+sNt[t[e+12]]+sNt[t[e+13]]+sNt[t[e+14]]+sNt[t[e+15]]).toLowerCase()}var sNt,oNt=b(()=>{sNt=[];for(let t=0;t<256;++t)sNt.push((t+256).toString(16).slice(1));me(aNt,"unsafeStringify")});function lNt(){if(!cNt){if("u"<typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");cNt=crypto.getRandomValues.bind(crypto)}return cNt(hNt)}var cNt,hNt,uNt,dNt,pNt=b(()=>{hNt=new Uint8Array(16),me(lNt,"rng")}),gNt=b(()=>{uNt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),dNt={randomUUID:uNt}});function fNt(t,e,r){if(dNt.randomUUID&&!e&&!t)return dNt.randomUUID();var n=(t=t||{}).random??t.rng?.()??lNt();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){if((r=r||0)<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[r+t]=n[t];return e}return aNt(n)}var mNt,yNt,vNt,xNt,bNt,wNt,kNt,TNt,ENt=b(()=>{gNt(),pNt(),oNt(),me(fNt,"v4"),mNt=fNt}),CNt=b(()=>{ENt()}),SNt=b(()=>{Tu(),CNt(),Oc(),t(),tn(),rn(),yNt={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},vNt=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=yNt,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{me(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={}}getParent(e){for(let t=this.nodes.length-1;0<=t;t--)if(this.nodes[t].level<e)return this.nodes[t];return null}getMindmap(){return 0<this.nodes.length?this.nodes[0]:null}addNode(t,e,r,n){D.info("addNode",t,e,r,n);let i=O(),a=i.mindmap?.padding??We.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:a*=2}if(e={id:this.count++,nodeId:lc(e,i),level:t,descr:lc(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??We.mindmap.maxNodeWidth,padding:a},r=this.getParent(t))r.children.push(e);else if(0!==this.nodes.length)throw new Error(`There can be only one root. No parent could be found for ("${e.descr}")`);this.nodes.push(e)}getType(t,e){switch(D.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){var e,r;t&&(e=O(),r=this.nodes[this.nodes.length-1],t.icon&&(r.icon=lc(t.icon,e)),t.class)&&(r.class=lc(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(var[r,n]of t.children.entries())r=0===t.level?r:e,this.assignSections(n,r)}flattenNodes(t,e){var r=["mindmap-node"],r=(0===t.level?r.push("section-root","section--1"):void 0!==t.section&&r.push("section-"+t.section),t.class&&r.push(t.class),r.join(" ")),n=me(t=>{switch(t){case yNt.CIRCLE:return"mindmapCircle";case yNt.RECT:return"rect";case yNt.ROUNDED_RECT:return"rounded";case yNt.CLOUD:return"cloud";case yNt.BANG:return"bang";case yNt.HEXAGON:return"hexagon";case yNt.DEFAULT:return"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),n={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:n(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:r,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(n),t.children)for(var i of t.children)this.flattenNodes(i,e)}generateEdges(e,r){if(e.children)for(var n of e.children){let t="edge";void 0!==n.section&&(t+=" section-edge-"+n.section);var i=e.level+1,i=(t+=" edge-depth-"+i,{id:`edge_${e.id}_`+n.id,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:t,depth:e.level,section:n.section});r.push(i),this.generateEdges(n,r)}}getData(){var t=this.getMindmap(),e=O(),r=e;if(void 0===pr().layout&&(r.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:r};D.debug("getData: mindmapRoot",t,e),this.assignSections(t);var n,i=[],a=(this.flattenNodes(t,e=[]),this.generateEdges(t,i),D.debug(`getData: processed ${e.length} nodes and ${i.length} edges`),new Map);for(n of e)a.set(n.id,{shape:n.shape,width:n.width,height:n.height,padding:n.padding});return{nodes:e,edges:i,config:r,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(a),type:"mindmap",diagramId:"mindmap-"+mNt()}}getLogger(){return D}}}),_Nt=b(()=>{t(),iO(),cct(),hct(),tn(),xNt=me(async(t,e,r,n)=>{D.debug(`Rendering mindmap diagram +`+t);var i=(t=n.db).getData(),a=WD(e,i.config.securityLevel);i.type=n.type,i.layoutAlgorithm=Hlt(i.config.layout,{fallback:"cose-bilkent"}),i.diagramId=e,t.getMindmap()&&(i.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape&&(t.width=0,t.padding=10)}),await Ylt(i,a),Vlt(a,i.config.mindmap?.padding??We.mindmap.padding,"mindmapDiagram",i.config.mindmap?.useMaxWidth??We.mindmap.useMaxWidth))},"draw"),bNt={draw:xNt}}),ANt=b(()=>{jr(),wNt=me(e=>{let r="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],fe(e["lineColor"+t])?e["lineColor"+t]=a(e["lineColor"+t],20):e["lineColor"+t]=ke(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var n=""+(17-3*t);r+=` + .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path { + fill: ${e["cScale"+t]}; + } + .section-${t-1} text { + fill: ${e["cScaleLabel"+t]}; + } + .node-icon-${t-1} { + font-size: 40px; + color: ${e["cScaleLabel"+t]}; + } + .section-edge-${t-1}{ + stroke: ${e["cScale"+t]}; + } + .edge-depth-${t-1}{ + stroke-width: ${n}; + } + .section-${t-1} line { + stroke: ${e["cScaleInv"+t]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `}return r},"genSections"),kNt=me(t=>` + .edge { + stroke-width: 3; + } + ${wNt(t)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .section-root span { + color: ${t.gitBranchLabel0}; + } + .section-2 span { + color: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),TNt=kNt}),LNt={};KBt(LNt,{diagram:()=>NNt});var NNt,INt,RNt,MNt,DNt,ONt,PNt,BNt,$Nt,FNt,zNt,GNt,UNt,qNt,jNt,WNt,YNt,HNt,VNt,XNt,KNt,ZNt,QNt,JNt,tIt,eIt=b(()=>{iNt(),SNt(),_Nt(),ANt(),NNt={get db(){return new vNt},renderer:bNt,parser:rNt,styles:TNt}}),rIt=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,4],n=[1,13],i=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,31],f=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],x=[1,6,7,11,13,16,17,20,23],b=[1,38],r={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o-1].id),n.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 18:case 23:n.decorateNode({class:a[o]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",a[o-1].id),n.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:n.decorateNode({icon:a[o]});break;case 27:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:n,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:n,9:22,12:11,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:h,7:u,10:23,11:d},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),e(p,[2,19]),e(p,[2,21],{15:30,24:g}),e(p,[2,22]),e(p,[2,23]),e(f,[2,25]),e(f,[2,26]),e(f,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},e(m,[2,14],{7:y,11:v}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(p,[2,16],{15:37,24:g}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(f,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:y,11:v}),e(x,[2,11]),e(x,[2,12]),e(p,[2,15],{24:b}),e(f,[2,30]),{22:[1,41]},e(f,[2,27]),e(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return e.yytext=e.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};r.lexer=c,me(t,"Parser"),(INt=new((t.prototype=r).Parser=t)).parser=INt,RNt=INt}),nIt=b(()=>{Tu(),Oc(),t(),tn(),F9(),MNt=[],DNt=[],ONt=0,PNt={},BNt=me(()=>{MNt=[],DNt=[],ONt=0,PNt={}},"clear"),$Nt=me(t=>{if(0===MNt.length)return null;let e=MNt[0].level,r=null;for(let t=MNt.length-1;0<=t;t--)if(MNt[t].level===e&&(r=r||MNt[t]),MNt[t].level<e)throw new Error('Items without section detected, found section ("'+MNt[t].label+'")');return t===r?.level?null:r},"getSection"),FNt=me(function(){return DNt},"getSections"),zNt=me(function(){var t=[],r=FNt(),n=O();for(let e of r){var i,a={id:e.id,label:lc(e.label??"",n),isGroup:!0,ticket:e.ticket,shape:"kanbanSection",level:e.level,look:n.look};t.push(a);for(i of MNt.filter(t=>t.parentId===e.id)){var s={id:i.id,parentId:e.id,label:lc(i.label??"",n),isGroup:!1,ticket:i?.ticket,priority:i?.priority,assigned:i?.assigned,icon:i?.icon,shape:"kanbanItem",level:i.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:O()}},"getData"),GNt=me((t,e,r,n,i)=>{let a=O(),s=a.mindmap?.padding??We.mindmap.padding;switch(n){case UNt.ROUNDED_RECT:case UNt.RECT:case UNt.HEXAGON:s*=2}if(n={id:lc(e,a)||"kbn"+ONt++,level:t,label:lc(r,a),width:a.mindmap?.maxNodeWidth??We.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==i){if(i=i.includes(` +`)?i+` +`:`{ +`+i+` +}`,(e=$9(i,{schema:B9})).shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(n.shape=e?.shape),e?.label&&(n.label=e?.label),e?.icon&&(n.icon=e?.icon.toString()),e?.assigned&&(n.assigned=e?.assigned.toString()),e?.ticket&&(n.ticket=e?.ticket.toString()),e?.priority&&(n.priority=e?.priority)}(r=$Nt(t))?n.parentId=r.id||"kbn"+ONt++:DNt.push(n),MNt.push(n)},"addNode"),UNt={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},qNt=me((t,e)=>{switch(D.debug("In get type",t,e),t){case"[":return UNt.RECT;case"(":return")"===e?UNt.ROUNDED_RECT:UNt.CLOUD;case"((":return UNt.CIRCLE;case")":return UNt.CLOUD;case"))":return UNt.BANG;case"{{":return UNt.HEXAGON;default:return UNt.DEFAULT}},"getType"),jNt=me((t,e)=>{PNt[t]=e},"setElementForId"),WNt=me(t=>{var e,r;t&&(e=O(),r=MNt[MNt.length-1],t.icon&&(r.icon=lc(t.icon,e)),t.class)&&(r.cssClasses=lc(t.class,e))},"decorateNode"),YNt=me(t=>{switch(t){case UNt.DEFAULT:return"no-border";case UNt.RECT:return"rect";case UNt.ROUNDED_RECT:return"rounded-rect";case UNt.CIRCLE:return"circle";case UNt.CLOUD:return"cloud";case UNt.BANG:return"bang";case UNt.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),HNt=me(()=>D,"getLogger"),VNt=me(t=>PNt[t],"getElementById"),XNt={clear:BNt,addNode:GNt,getSections:FNt,getData:zNt,nodeType:UNt,getType:qNt,setElementForId:jNt,decorateNode:WNt,type2Str:YNt,getLogger:HNt,getElementById:VNt}}),iIt=b(()=>{Tu(),t(),z7t(),lh(),tn(),sO(),rP(),KNt=me(async(t,e,r,n)=>{D.debug(`Rendering kanban diagram +`+t);var i,a=n.db.getData(),s=O(),o=(s.htmlLabels=!1,(t=M7t(e)).append("g")),l=(o.attr("class","sections"),t.append("g"));l.attr("class","items");let c=a.nodes.filter(t=>t.isGroup),h=0,u=[],d=25;for(i of c){var p=s?.kanban?.sectionWidth||200,p=(h+=1,i.x=p*h+10*(h-1)/2,i.width=p,i.y=0,i.height=3*p,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+h,await tO(o,i));d=Math.max(d,p?.labelBBox?.height),u.push(p)}let g=0;for(let i of c){var f,m=u[g];g+=1;let t=s?.kanban?.sectionWidth||200,e=3*-t/2+d,r=e,n=a.nodes.filter(t=>t.parentId===i.id);for(f of n){if(f.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");f.x=i.x,f.width=t-15;var y=(await KO(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await tP(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-e+30,50)+(d-25);m.attr("height",v)}Qc(void 0,t,s.mindmap?.padding??We.kanban.padding,s.mindmap?.useMaxWidth??We.kanban.useMaxWidth)},"draw"),ZNt={draw:KNt}}),aIt=b(()=>{jr(),gct(),QNt=me(r=>{let e="";for(let t=0;t<r.THEME_COLOR_LIMIT;t++)r["lineColor"+t]=r["lineColor"+t]||r["cScaleInv"+t],fe(r["lineColor"+t])?r["lineColor"+t]=a(r["lineColor"+t],20):r["lineColor"+t]=ke(r["lineColor"+t],20);var n=me((t,e)=>(r.darkMode?ke:a)(t,e),"adjuster");for(let t=0;t<r.THEME_COLOR_LIMIT;t++){var i=""+(17-3*t);e+=` + .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path { + fill: ${n(r["cScale"+t],10)}; + stroke: ${n(r["cScale"+t],10)}; + + } + .section-${t-1} text { + fill: ${r["cScaleLabel"+t]}; + } + .node-icon-${t-1} { + font-size: 40px; + color: ${r["cScaleLabel"+t]}; + } + .section-edge-${t-1}{ + stroke: ${r["cScale"+t]}; + } + .edge-depth-${t-1}{ + stroke-width: ${i}; + } + .section-${t-1} line { + stroke: ${r["cScaleInv"+t]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${r.background}; + stroke: ${r.nodeBorder}; + stroke-width: 1px; + } + + .kanban-ticket-link { + fill: ${r.background}; + stroke: ${r.nodeBorder}; + text-decoration: underline; + } + `}return e},"genSections"),JNt=me(t=>` + .edge { + stroke-width: 3; + } + ${QNt(t)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .cluster-label, .label { + color: ${t.textColor}; + fill: ${t.textColor}; + } + .kanban-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } + ${ict()} +`,"getStyles"),tIt=JNt}),sIt={};KBt(sIt,{diagram:()=>oIt});var oIt,lIt,cIt,hIt,uIt,dIt,pIt,gIt,fIt,mIt,yIt,vIt,xIt,bIt,wIt,kIt=b(()=>{rIt(),nIt(),iIt(),aIt(),oIt={db:XNt,renderer:ZNt,parser:RNt,styles:tIt}}),TIt=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,9],n=[1,10],i=[1,5,10,12],i={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 7:var l=n.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=n.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());n.addLink(l,c,h);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:n},{1:[2,6],7:11,10:[1,12]},e(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[2,11]),{1:[2,1]},{1:[2,5]},e(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:n},{15:18,16:7,17:8,18:r,20:n},{18:[1,19]},e(n,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:r,20:n},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,n){switch(r){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};i.lexer=r,me(t,"Parser"),(lIt=new((t.prototype=i).Parser=t)).parser=lIt,cIt=lIt}),EIt=b(()=>{Tu(),Oc(),ku(),hIt=[],uIt=[],dIt=new Map,pIt=me(()=>{hIt=[],uIt=[],dIt=new Map,fh()},"clear"),gIt=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{me(this,"SankeyLink")}},fIt=me((t,e,r)=>{hIt.push(new gIt(t,e,r))},"addLink"),mIt=class{constructor(t){this.ID=t}static{me(this,"SankeyNode")}},yIt=me(t=>{t=L.sanitizeText(t,O());let e=dIt.get(t);return void 0===e&&(e=new mIt(t),dIt.set(t,e),uIt.push(e)),e},"findOrCreateNode"),vIt=me(()=>uIt,"getNodes"),xIt=me(()=>hIt,"getLinks"),bIt=me(()=>({nodes:uIt.map(t=>({id:t.ID})),links:hIt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),wIt={nodesMap:dIt,getConfig:me(()=>O().sankey,"getConfig"),getNodes:vIt,getLinks:xIt,getGraph:bIt,addLink:fIt,findOrCreateNode:yIt,getAccTitle:yh,setAccTitle:mh,getAccDescription:xh,setAccDescription:vh,getDiagramTitle:wh,setDiagramTitle:bh,clear:pIt}});function CIt(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n<t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n<i||void 0===n&&i<=i)&&(n=i)}return n}var SIt=b(()=>{me(CIt,"max")});function _It(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var AIt=b(()=>{me(_It,"min")});function LIt(e,r){let n=0;if(void 0===r)for(var t of e)(t=+t)&&(n+=t);else{let t=-1;for(var i of e)(i=+r(i,++t,e))&&(n+=i)}return n}var NIt=b(()=>{me(LIt,"sum")}),IIt=b(()=>{SIt(),AIt(),NIt()});function RIt(t){return t.target.depth}function MIt(t){return t.depth}function DIt(t,e){return e-1-t.height}function OIt(t,e){return t.sourceLinks.length?t.depth:e-1}function PIt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?_It(t.sourceLinks,RIt)-1:0}var BIt=b(()=>{IIt(),me(RIt,"targetDepth"),me(MIt,"left"),me(DIt,"right"),me(OIt,"justify"),me(PIt,"center")});function $It(t){return function(){return t}}var FIt=b(()=>{me($It,"constant")});function zIt(t,e){return UIt(t.source,e.source)||t.index-e.index}function GIt(t,e){return UIt(t.target,e.target)||t.index-e.index}function UIt(t,e){return t.y0-e.y0}function qIt(t){return t.value}function jIt(t){return t.index}function WIt(t){return t.nodes}function YIt(t){return t.links}function HIt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function VIt({nodes:t}){for(var r of t){let t=r.y0,e=t;for(var n of r.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(var i of r.targetLinks)i.y1=e+i.width/2,e+=i.width}}function XIt(){let o=0,l=0,c=1,h=1,u=24,i=8,d,p=jIt,g=OIt,f,m,e=WIt,r=YIt,a=6;function n(){var t={nodes:e.apply(null,arguments),links:r.apply(null,arguments)};return s(t),y(t),v(t),x(t),k(t),VIt(t),t}function s({nodes:r,links:t}){for(var[e,n]of r.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];var i,a,s=new Map(r.map((t,e)=>[p(t,e,r),t]));for([i,a]of t.entries()){a.index=i;let{source:t,target:e}=a;"object"!=typeof t&&(t=a.source=HIt(s,t)),"object"!=typeof e&&(e=a.target=HIt(s,e)),t.sourceLinks.push(a),e.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:t}){for(var e of t)e.value=void 0===e.fixedValue?Math.max(LIt(e.sourceLinks,qIt),LIt(e.targetLinks,qIt)):e.fixedValue}function v({nodes:t}){let e=t.length,r=new Set(t),n=new Set,i=0;for(;r.size;){for(var a of r){a.depth=i;for(var{target:s}of a.sourceLinks)n.add(s)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}function x({nodes:t}){let e=t.length,r=new Set(t),n=new Set,i=0;for(;r.size;){for(var a of r){a.height=i;for(var{source:s}of a.targetLinks)n.add(s)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}function b({nodes:t}){var e,r=CIt(t,t=>t.depth)+1,n=(c-o-u)/(r-1),i=new Array(r);for(e of t){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,e,r))));e.layer=a,e.x0=o+a*n,e.x1=e.x0+u,i[a]?i[a].push(e):i[a]=[e]}if(f)for(var s of i)s.sort(f);return i}function w(t){var r,n=_It(t,t=>(h-l-(t.length-1)*d)/LIt(t,qIt));for(r of t){let e=l;for(var i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+d;for(var a of i.sourceLinks)a.width=a.value*n}e=(h-e+d)/(r.length+1);for(let t=0;t<r.length;++t){var s=r[t];s.y0+=e*(t+1),s.y1+=e*(t+1)}L(r)}}function k(t){var e=b(t);d=Math.min(i,(h-l)/(CIt(e,t=>t.length)-1)),w(e);for(let t=0;t<a;++t){var r=Math.pow(.99,t),n=Math.max(1-r,(t+1)/a);E(e,r,n),T(e,r,n)}}function T(r,n,i){for(let t=1,e=r.length;t<e;++t){var a,s,o=r[t];for(a of o){let t=0,e=0;for(var{source:l,value:c}of a.targetLinks)c*=a.layer-l.layer,t+=N(l,a)*c,e+=c;0<e&&(s=(t/e-a.y0)*n,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(UIt),C(o,i)}}function E(r,n,i){for(let t=r.length,e=t-2;0<=e;--e){var a,s,o=r[e];for(a of o){let t=0,e=0;for(var{target:l,value:c}of a.sourceLinks)c*=l.layer-a.layer,t+=I(a,l)*c,e+=c;0<e&&(s=(t/e-a.y0)*n,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(UIt),C(o,i)}}function C(t,e){var r=t.length>>1,n=t[r];_(t,n.y0-d,r-1,e),S(t,n.y1+d,1+r,e),_(t,h,t.length-1,e),S(t,l,0,e)}function S(t,e,r,n){for(;r<t.length;++r){var i=t[r],a=(e-i.y0)*n;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+d}}function _(t,e,r,n){for(;0<=r;--r){var i=t[r],a=(i.y1-e)*n;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-d}}function A({sourceLinks:t,targetLinks:e}){if(void 0===m){for(var{source:{sourceLinks:r}}of e)r.sort(GIt);for(var{target:{targetLinks:n}}of t)n.sort(zIt)}}function L(t){if(void 0===m)for(var{sourceLinks:e,targetLinks:r}of t)e.sort(GIt),r.sort(zIt)}function N(t,e){let r=t.y0-(t.sourceLinks.length-1)*d/2;for(var{target:n,width:i}of t.sourceLinks){if(n===e)break;r+=i+d}for(var{source:a,width:s}of e.targetLinks){if(a===t)break;r-=s}return r}function I(t,e){let r=e.y0-(e.targetLinks.length-1)*d/2;for(var{source:n,width:i}of e.targetLinks){if(n===t)break;r+=i+d}for(var{target:a,width:s}of t.sourceLinks){if(a===e)break;r-=s}return r}return me(n,"sankey"),n.update=function(t){return VIt(t),t},n.nodeId=function(t){return arguments.length?(p="function"==typeof t?t:$It(t),n):p},n.nodeAlign=function(t){return arguments.length?(g="function"==typeof t?t:$It(t),n):g},n.nodeSort=function(t){return arguments.length?(f=t,n):f},n.nodeWidth=function(t){return arguments.length?(u=+t,n):u},n.nodePadding=function(t){return arguments.length?(i=d=+t,n):i},n.nodes=function(t){return arguments.length?(e="function"==typeof t?t:$It(t),n):e},n.links=function(t){return arguments.length?(r="function"==typeof t?t:$It(t),n):r},n.linkSort=function(t){return arguments.length?(m=t,n):m},n.size=function(t){return arguments.length?(o=l=0,c=+t[0],h=+t[1],n):[c-o,h-l]},n.extent=function(t){return arguments.length?(o=+t[0][0],c=+t[1][0],l=+t[0][1],h=+t[1][1],n):[[o,l],[c,h]]},n.iterations=function(t){return arguments.length?(a=+t,n):a},me(s,"computeNodeLinks"),me(y,"computeNodeValues"),me(v,"computeNodeDepths"),me(x,"computeNodeHeights"),me(b,"computeNodeLayers"),me(w,"initializeNodeBreadths"),me(k,"computeNodeBreadths"),me(T,"relaxLeftToRight"),me(E,"relaxRightToLeft"),me(C,"resolveCollisions"),me(S,"resolveCollisionsTopToBottom"),me(_,"resolveCollisionsBottomToTop"),me(A,"reorderNodeLinks"),me(L,"reorderLinks"),me(N,"targetTop"),me(I,"sourceTop"),n}var KIt=b(()=>{IIt(),BIt(),FIt(),me(zIt,"ascendingSourceBreadth"),me(GIt,"ascendingTargetBreadth"),me(UIt,"ascendingBreadth"),me(qIt,"value"),me(jIt,"defaultId"),me(WIt,"defaultNodes"),me(YIt,"defaultLinks"),me(HIt,"find"),me(VIt,"computeLinkBreadths"),me(XIt,"Sankey")});function ZIt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function QIt(){return new ZIt}var JIt,tRt,eRt,rRt,nRt=b(()=>{JIt=Math.PI,eRt=(tRt=2*JIt)-1e-6,me(ZIt,"Path"),me(QIt,"path"),ZIt.prototype=QIt.prototype={constructor:ZIt,moveTo:me(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:me(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:me(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:me(function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:me(function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:me(function(t,e,r,n,i){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(t=+t),h=(n=+n)-(e=+e),u=o-t,d=l-e,p=u*u+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):1e-6<p&&(1e-6<Math.abs(d*c-h*u)&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan((JIt-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,1e-6<Math.abs(p-1)&&(this._+="L"+(t+p*u)+","+(e+p*d)),this._+="A"+i+","+i+",0,0,"+ +(u*o<d*r)+","+(this._x1=t+n*c)+","+(this._y1=e+n*h)):this._+="L"+(this._x1=t)+","+(this._y1=e))},"arcTo"),arc:me(function(t,e,r,n,i,a){t=+t,e=+e,a=!!a;var s=(r=+r)*Math.cos(n),o=r*Math.sin(n),l=t+s,c=e+o,h=1^a,a=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+l+","+c:(1e-6<Math.abs(this._x1-l)||1e-6<Math.abs(this._y1-c))&&(this._+="L"+l+","+c),r&&(eRt<(a=a<0?a%tRt+tRt:a)?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):1e-6<a&&(this._+="A"+r+","+r+",0,"+ +(JIt<=a)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},"arc"),rect:me(function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:me(function(){return this._},"toString")},rRt=QIt}),iRt=b(()=>{nRt()});function aRt(t){return me(function(){return t},"constant")}var sRt=b(()=>{me(aRt,"default")});function oRt(t){return t[0]}function lRt(t){return t[1]}var cRt,hRt=b(()=>{me(oRt,"x"),me(lRt,"y")}),uRt=b(()=>{cRt=Array.prototype.slice});function dRt(t){return t.source}function pRt(t){return t.target}function gRt(i){var a=dRt,s=pRt,o=oRt,l=lRt,c=null;function e(){var t,e=cRt.call(arguments),r=a.apply(this,e),n=s.apply(this,e);if(c=c||(t=rRt()),i(c,+o.apply(this,(e[0]=r,e)),+l.apply(this,e),+o.apply(this,(e[0]=n,e)),+l.apply(this,e)),t)return c=null,t+""||null}return me(e,"link"),e.source=function(t){return arguments.length?(a=t,e):a},e.target=function(t){return arguments.length?(s=t,e):s},e.x=function(t){return arguments.length?(o="function"==typeof t?t:aRt(+t),e):o},e.y=function(t){return arguments.length?(l="function"==typeof t?t:aRt(+t),e):l},e.context=function(t){return arguments.length?(c=t??null,e):c},e}function fRt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function mRt(){return gRt(fRt)}var yRt=b(()=>{iRt(),uRt(),sRt(),hRt(),me(dRt,"linkSource"),me(pRt,"linkTarget"),me(gRt,"link"),me(fRt,"curveHorizontal"),me(mRt,"linkHorizontal")}),vRt=b(()=>{yRt()});function xRt(t){return[t.source.x1,t.y0]}function bRt(t){return[t.target.x0,t.y1]}function wRt(){return mRt().source(xRt).target(bRt)}var kRt,TRt,ERt,CRt,SRt,_Rt,ARt,LRt=b(()=>{vRt(),me(xRt,"horizontalSource"),me(bRt,"horizontalTarget"),me(wRt,"default")}),NRt=b(()=>{KIt(),BIt(),LRt()}),IRt=b(()=>{kRt=class e{static{me(this,"Uid")}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href="#"+t}toString(){return"url("+this.href+")"}}}),RRt=b(()=>{Tu(),i6(),NRt(),lh(),IRt(),TRt={left:MIt,right:DIt,center:PIt,justify:OIt},ERt=me(function(t,e,r,n){let{securityLevel:i,sankey:a}=O(),s=Ch.sankey,o,l=("sandbox"===i&&(o=H("#i"+e)),H("sandbox"===i?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===i?l.select(`[id="${e}"]`):H(`[id="${e}"]`),h=a?.width??s.width,u=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,f=a?.suffix??s.suffix,m=a?.showValues??s.showValues,y=n.db.getGraph(),v=TRt[p],x=(XIt().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),yx(y5));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=kRt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>x(t.id));var e=me(({id:t,value:e})=>m?t+` +`+g+Math.round(100*e)/100+f:t,"getText"),n=(c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",t=>t.x0<h/2?t.x1+6:t.x0-6).attr("y",t=>(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0<h/2?"start":"end").text(e),c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(y.links).join("g").attr("class","link").style("mix-blend-mode","multiply")),b=a?.linkColor??"gradient";"gradient"===b&&((e=n.append("linearGradient").attr("id",t=>(t.uid=kRt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0)).append("stop").attr("offset","0%").attr("stop-color",t=>x(t.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",t=>x(t.target.id)));let w;switch(b){case"gradient":w=me(t=>t.uid,"coloring");break;case"source":w=me(t=>x(t.source.id),"coloring");break;case"target":w=me(t=>x(t.target.id),"coloring");break;default:w=b}n.append("path").attr("d",wRt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),Qc(void 0,c,0,d)},"draw"),CRt={draw:ERt}}),MRt=b(()=>{SRt=me(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")}),DRt=b(()=>{_Rt=me(t=>`.label { + font-family: ${t.fontFamily}; + }`,"getStyles"),ARt=_Rt}),ORt={};KBt(ORt,{diagram:()=>BRt});var PRt,BRt,$Rt,FRt,zRt,GRt,URt,qRt,jRt,WRt,YRt,HRt,VRt=b(()=>{TIt(),EIt(),RRt(),MRt(),DRt(),PRt=cIt.parse.bind(cIt),cIt.parse=t=>PRt(SRt(t)),BRt={styles:ARt,parser:cIt,db:wIt,renderer:CRt}}),XRt=b(()=>{rn(),tn(),iS(),ku(),$Rt=We.packet,FRt=class{constructor(){this.packet=[],this.setAccTitle=mh,this.getAccTitle=yh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getAccDescription=xh,this.setAccDescription=vh}static{me(this,"PacketDB")}getConfig(){var t=SC({...$Rt,...ar().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){0<t.length&&this.packet.push(t)}clear(){fh(),this.packet=[]}}}),KRt=b(()=>{v6t(),t(),k6t(),XRt(),zRt=me((t,e)=>{x6t(t,e);let r=-1,n=[],i=1,a=e.getConfig().bitsPerRow;for(var{start:s,end:o,bits:l,label:c}of t.blocks){if(void 0!==s&&void 0!==o&&o<s)throw new Error(`Packet block ${s} - ${o} is invalid. End must be greater than start.`);if((s??=r+1)!==r+1)throw new Error(`Packet block ${s} - ${o??s} is not contiguous. It should start from ${r+1}.`);if(0===l)throw new Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(o??=s+(l??1)-1,l??=o-s+1,r=o,D.debug(`Packet block ${s} - ${r} with label `+c);n.length<=a+1&&e.getPacket().length<1e4;){var[h,u]=GRt({start:s,end:o,bits:l,label:c},i,a);if(n.push(h),h.end+1===i*a&&(e.pushWord(n),n=[],i++),!u)break;({start:s,end:o,bits:l,label:c}=u)}}e.pushWord(n)},"populate"),GRt=me((t,e,r)=>{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.end<t.start)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);var n;return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:n=e*r-1,label:t.label,bits:n-t.start},{start:n=e*r,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),URt={parser:{yy:void 0},parse:me(async t=>{var t=await g6t("packet",t),e=URt.parser?.yy;if(!(e instanceof FRt))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");D.debug(t),zRt(t,e)},"parse")}}),ZRt=b(()=>{z7t(),lh(),qRt=me((t,e,r,n)=>{var i,a,s=(n=n.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=n.getPacket(),n=n.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(n?0:o),c=c*h+2,d=M7t(e);d.attr("viewbox",`0 0 ${c} `+o),Zc(d,o,c,s.useMaxWidth);for([i,a]of u.entries())jRt(d,a,i,s);d.append("text").text(n).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),jRt=me((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=t.append("g"),u=r*(n+a)+a;for(c of e){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-i;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),l&&(d=c.end===c.start,p=u-2,h.append("text").attr("x",g+(d?f/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",d?"middle":"start").text(c.start),d||h.append("text").attr("x",g+f).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(c.end))}},"drawWord"),WRt={draw:qRt}}),QRt=b(()=>{iS(),YRt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},HRt=me(({packet:t}={})=>` + .packetByte { + font-size: ${(t=SC(YRt,t)).byteFontSize}; + } + .packetByte.start { + fill: ${t.startByteColor}; + } + .packetByte.end { + fill: ${t.endByteColor}; + } + .packetLabel { + fill: ${t.labelColor}; + font-size: ${t.labelFontSize}; + } + .packetTitle { + fill: ${t.titleColor}; + font-size: ${t.titleFontSize}; + } + .packetBlock { + stroke: ${t.blockStrokeColor}; + stroke-width: ${t.blockStrokeWidth}; + fill: ${t.blockFillColor}; + } + `,"styles")}),JRt={};KBt(JRt,{diagram:()=>tMt});var tMt,eMt,rMt,nMt,iMt,aMt,sMt,oMt,lMt,cMt,hMt,uMt,dMt,pMt,gMt,fMt,mMt,yMt=b(()=>{XRt(),KRt(),ZRt(),QRt(),tMt={parser:URt,get db(){return new FRt},renderer:WRt,styles:HRt}}),vMt=b(()=>{rn(),tn(),iS(),ku(),rMt={axes:[],curves:[],options:eMt={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},nMt=structuredClone(rMt),iMt=We.radar,aMt=me(()=>SC({...iMt,...ar().radar}),"getConfig"),sMt=me(()=>nMt.axes,"getAxes"),oMt=me(()=>nMt.curves,"getCurves"),lMt=me(()=>nMt.options,"getOptions"),cMt=me(t=>{nMt.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),hMt=me(t=>{nMt.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:uMt(t.entries)}))},"setCurves"),uMt=me(r=>{if(null==r[0].axis)return r.map(t=>t.value);var t=sMt();if(0===t.length)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{var t=r.find(t=>t.axis?.$refText===e.name);if(void 0===t)throw new Error("Missing entry for axis "+e.label);return t.value})},"computeCurveEntries"),dMt=me(t=>{t=t.reduce((t,e)=>(t[e.name]=e,t),{}),nMt.options={showLegend:t.showLegend?.value??eMt.showLegend,ticks:t.ticks?.value??eMt.ticks,max:t.max?.value??eMt.max,min:t.min?.value??eMt.min,graticule:t.graticule?.value??eMt.graticule}},"setOptions"),pMt=me(()=>{fh(),nMt=structuredClone(rMt)},"clear"),gMt={getAxes:sMt,getCurves:oMt,getOptions:lMt,setAxes:cMt,setCurves:hMt,setOptions:dMt,getConfig:aMt,clear:pMt,setAccTitle:mh,getAccTitle:yh,setDiagramTitle:bh,getDiagramTitle:wh,getAccDescription:xh,setAccDescription:vh}}),xMt=b(()=>{v6t(),t(),k6t(),vMt(),fMt=me(t=>{x6t(t,gMt);var{axes:t,curves:e,options:r}=t;gMt.setAxes(t),gMt.setCurves(e),gMt.setOptions(r)},"populate"),mMt={parse:me(async t=>{t=await g6t("radar",t),D.debug(t),fMt(t)},"parse")}});function bMt(r,t,e,n,i,a,s){let o=t.length,l=Math.min(s.width,s.height)/2;e.forEach((t,e)=>{t.entries.length===o&&(t=t.entries.map((t,e)=>(e=2*Math.PI*e/o-Math.PI/2,{x:(t=wMt(t,n,i,l))*Math.cos(e),y:t*Math.sin(e)})),"circle"===a?r.append("path").attr("d",kMt(t,s.curveTension)).attr("class","radarCurve-"+e):"polygon"===a&&r.append("polygon").attr("points",t.map(t=>t.x+","+t.y).join(" ")).attr("class","radarCurve-"+e))})}function wMt(t,e,r,n){return n*(Math.min(Math.max(t,e),r)-e)/(r-e)}function kMt(e,r){let n=e.length,i=`M${e[0].x},`+e[0].y;for(let t=0;t<n;t++){var a=e[(t-1+n)%n],s=e[t],o=e[(t+1)%n],l=e[(t+2)%n],c=s.x+(o.x-a.x)*r,a=s.y+(o.y-a.y)*r,h=o.x-(l.x-s.x)*r;i+=` C${c},${a} ${h},${o.y-(l.y-s.y)*r} ${o.x},`+o.y}return i+" Z"}function TMt(a,t,e,r){if(e){let n=3*(r.width/2+r.marginRight)/4,i=3*-(r.height/2+r.marginTop)/4;t.forEach((t,e)=>{var r=a.append("g").attr("transform",`translate(${n}, ${i+20*e})`);r.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+e),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(t.label)})}}var EMt,CMt,SMt,_Mt,AMt,LMt,NMt,IMt,RMt=b(()=>{z7t(),EMt=me((t,e,r,n)=>{var i=(n=n.db).getAxes(),a=n.getCurves(),s=n.getOptions(),o=n.getConfig(),n=n.getDiagramTitle(),e=M7t(e),e=CMt(e,o),l=s.max??Math.max(...a.map(t=>Math.max(...t.entries))),c=s.min,h=Math.min(o.width,o.height)/2;SMt(e,i,h,s.ticks,s.graticule),_Mt(e,i,h,o),bMt(e,i,a,c,l,s.graticule,o),TMt(e,a,s.showLegend,o),e.append("text").attr("class","radarTitle").text(n).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),CMt=me((t,e)=>{var r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,i=e.marginLeft+e.width/2,e=e.marginTop+e.height/2;return t.attr("viewbox",`0 0 ${r} `+n).attr("width",r).attr("height",n),t.append("g").attr("transform",`translate(${i}, ${e})`)},"drawFrame"),SMt=me((i,a,s,o,t)=>{if("circle"===t)for(let t=0;t<o;t++){var e=s*(t+1)/o;i.append("circle").attr("r",e).attr("class","radarGraticule")}else if("polygon"===t){let n=a.length;for(let e=0;e<o;e++){let r=s*(e+1)/o,t=a.map((t,e)=>(e=2*e*Math.PI/n-Math.PI/2,r*Math.cos(e)+","+r*Math.sin(e))).join(" ");i.append("polygon").attr("points",t).attr("class","radarGraticule")}}},"drawGraticule"),_Mt=me((e,r,n,i)=>{var a=r.length;for(let t=0;t<a;t++){var s=r[t].label,o=2*t*Math.PI/a-Math.PI/2;e.append("line").attr("x1",0).attr("y1",0).attr("x2",n*i.axisScaleFactor*Math.cos(o)).attr("y2",n*i.axisScaleFactor*Math.sin(o)).attr("class","radarAxisLine"),e.append("text").text(s).attr("x",n*i.axisLabelFactor*Math.cos(o)).attr("y",n*i.axisLabelFactor*Math.sin(o)).attr("class","radarAxisLabel")}},"drawAxes"),me(bMt,"drawCurves"),me(wMt,"relativeRadius"),me(kMt,"closedRoundCurve"),me(TMt,"drawLegend"),AMt={draw:EMt}}),MMt=b(()=>{iS(),Xr(),rn(),LMt=me((e,r)=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var i=e["cScale"+t];n+=` + .radarCurve-${t} { + color: ${i}; + fill: ${i}; + fill-opacity: ${r.curveOpacity}; + stroke: ${i}; + stroke-width: ${r.curveStrokeWidth}; + } + .radarLegendBox-${t} { + fill: ${i}; + fill-opacity: ${r.curveOpacity}; + stroke: ${i}; + } + `}return n},"genIndexStyles"),NMt=me(t=>{var e=SC(Oe(),ar().themeVariables);return{themeVariables:e,radarOptions:SC(e.radar,t)}},"buildRadarStyleOptions"),IMt=me(({radar:t}={})=>{var{themeVariables:t,radarOptions:e}=NMt(t);return` + .radarTitle { + font-size: ${t.fontSize}; + color: ${t.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${e.axisColor}; + stroke-width: ${e.axisStrokeWidth}; + } + .radarAxisLabel { + dominant-baseline: middle; + text-anchor: middle; + font-size: ${e.axisLabelFontSize}px; + color: ${e.axisColor}; + } + .radarGraticule { + fill: ${e.graticuleColor}; + fill-opacity: ${e.graticuleOpacity}; + stroke: ${e.graticuleColor}; + stroke-width: ${e.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${e.legendFontSize}px; + dominant-baseline: hanging; + } + ${LMt(t,e)} + `},"styles")}),DMt={};KBt(DMt,{diagram:()=>OMt});var OMt,PMt,BMt,$Mt=b(()=>{vMt(),xMt(),RMt(),MMt(),OMt={parser:mMt,db:gMt,renderer:AMt,styles:IMt}}),FMt=b(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,15],n=[1,7],i=[1,13],a=[1,14],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],p=[1,24],g=[8,10,15,16,21,28,29,30,31,39,43,46],f=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],h={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[o-1]),n.setHierarchy(a[o-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:n.getLogger().debug("Rule: link: ",a[o],t),this.$={edgeTypeStr:a[o],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:var l=parseInt(a[o]),c=n.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),c=n.edgeStrToEdgeData(a[o-1].edgeTypeStr),this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:n.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this||"na"),n.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),n.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=n.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:n.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:n.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:n.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:n.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:r,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:s,39:o,43:l,46:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:r,21:n,28:i,29:a,31:s,39:o,43:l,46:c}),e(u,[2,16],{14:22,15:d,16:p}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(g,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,31:s},{10:r,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:s,39:o,43:l,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(f,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(g,[2,24]),{10:r,11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:s,39:o,43:l,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(f,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},e(u,[2,27]),e(f,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},e(f,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:me(function(t,e,r,n){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:case 41:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:case 60:case 61:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 76:case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};h.lexer=r,me(t,"Parser"),(PMt=new((t.prototype=h).Parser=t)).parser=PMt,BMt=PMt});function zMt(t){switch(D.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return D.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function GMt(t){return"=="!==(D.debug("typeStr2Type",t),t)?"normal":"thick"}function UMt(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}var qMt,jMt,WMt,YMt,HMt,VMt,XMt,KMt,ZMt,QMt,JMt,tDt,eDt,rDt,nDt,iDt,aDt,sDt,oDt,lDt,cDt,hDt,uDt,dDt,pDt,gDt,fDt,mDt,yDt,vDt,xDt,bDt,wDt,kDt,TDt,EDt,CDt,SDt,_Dt,ADt,LDt=b(()=>{yz(),rn(),Tu(),t(),Oc(),ku(),qMt=new Map,jMt=[],WMt=new Map,YMt=O(),HMt=new Map,VMt=me(t=>L.sanitizeText(t,YMt),"sanitizeText"),XMt=me(function(t,e=""){let r=HMt.get(t);r||(r={id:t,styles:[],textStyles:[]},HMt.set(t,r)),e?.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(t)&&(t=e.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(t)),r.styles.push(e)})},"addStyleClass"),KMt=me(function(t,e=""){t=qMt.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),ZMt=me(function(t,r){t.split(",").forEach(function(t){let e=qMt.get(t);void 0===e&&(t=t.trim(),e={id:t,type:"na",children:[]},qMt.set(t,e)),e.classes||(e.classes=[]),e.classes.push(r)})},"setCssClass"),QMt=me((t,e)=>{var r,n=[],i=(t=t.flat()).find(t=>"column-setting"===t?.type)?.columns??-1;for(r of t)if("number"==typeof i&&0<i&&"column-setting"!==r.type&&"number"==typeof r.widthInColumns&&r.widthInColumns>i&&D.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width `+i),r.label&&(r.label=VMt(r.label)),"classDef"===r.type)XMt(r.id,r.css);else if("applyClass"===r.type)ZMt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&KMt(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var a=(WMt.get(r.id)??0)+1;WMt.set(r.id,a),r.id=a+"-"+r.id,jMt.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(a=qMt.get(r.id))?qMt.set(r.id,r):("na"!==r.type&&(a.type=r.type),r.label!==r.id&&(a.label=r.label)),r.children&&QMt(r.children,r),"space"===r.type){var s=r.width??1;for(let t=0;t<s;t++){var o=mz(r);o.id=o.id+"-"+t,qMt.set(o.id,o),n.push(o)}}else void 0===a&&n.push(r);e.children=n},"populateBlockDatabase"),JMt=[],tDt={id:"root",type:"composite",children:[],columns:-1},eDt=me(()=>{D.debug("Clear called"),fh(),tDt={id:"root",type:"composite",children:[],columns:-1},qMt=new Map([["root",tDt]]),JMt=[],HMt=new Map,jMt=[],WMt=new Map},"clear"),me(zMt,"typeStr2Type"),me(GMt,"edgeTypeStr2Type"),me(UMt,"edgeStrToEdgeData"),rDt=0,nDt=me(()=>(rDt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+rDt),"generateId"),iDt=me(t=>{tDt.children=t,QMt(t,tDt),JMt=tDt.children},"setHierarchy"),aDt=me(t=>(t=qMt.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),sDt=me(()=>[...qMt.values()],"getBlocksFlat"),oDt=me(()=>JMt||[],"getBlocks"),lDt=me(()=>jMt,"getEdges"),cDt=me(t=>qMt.get(t),"getBlock"),hDt=me(t=>{qMt.set(t.id,t)},"setBlock"),dDt=me(()=>D,"getLogger"),uDt=me(function(){return HMt},"getClasses"),dDt={getConfig:me(()=>ar().block,"getConfig"),typeStr2Type:zMt,edgeTypeStr2Type:GMt,edgeStrToEdgeData:UMt,getLogger:dDt,getBlocksFlat:sDt,getBlocks:oDt,getEdges:lDt,setHierarchy:iDt,getBlock:cDt,setBlock:hDt,getColumns:aDt,getClasses:uDt,clear:eDt,generateId:nDt},pDt=dDt}),NDt=b(()=>{jr(),gct(),gDt=me((t,e)=>{var r=(i=ce)(t,"r"),n=i(t,"g"),i=i(t,"b");return oe(r,n,i,e)},"fade"),fDt=me(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.nodeTextColor||t.textColor}; + } + .cluster-label text { + fill: ${t.titleColor}; + } + .cluster-label span,p { + color: ${t.titleColor}; + } + + + + .label text,span,p { + fill: ${t.nodeTextColor||t.textColor}; + color: ${t.nodeTextColor||t.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${gDt(t.edgeLabelBackground,.5)}; + // background-color: + } + + .node .cluster { + // fill: ${gDt(t.mainBkg,.5)}; + fill: ${gDt(t.clusterBkg,.5)}; + stroke: ${gDt(t.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${t.titleColor}; + } + + .cluster span,p { + color: ${t.titleColor}; + } + /* .cluster div { + color: ${t.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } + ${ict()} +`,"getStyles"),mDt=fDt}),IDt=b(()=>{t(),yDt=me((e,t,r,n)=>{t.forEach(t=>{_Dt[t](e,r,n)})},"insertMarkers"),vDt=me((t,e,r)=>{D.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),xDt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),bDt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),wDt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),kDt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),TDt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),EDt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),CDt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),SDt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),_Dt={extension:vDt,composition:xDt,aggregation:bDt,dependency:wDt,lollipop:kDt,point:TDt,circle:EDt,cross:CDt,barb:SDt},ADt=yDt});function RDt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}function MDt(s,o,l=0,c=0){if(D.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"siblingWidth",l),s?.size?.width||(s.size={width:l,height:c,x:0,y:0}),0<s.children?.length){for(var h of s.children)MDt(h,o);var u,d,p,g,f=$Dt(s),m=f.width;D.debug("setBlockSizes abc95 maxWidth of",s.id,":s children is ",m,u=f.height);for(d of s.children)d.size&&(D.debug(`abc95 Setting size of children of ${s.id} id=${d.id} ${m} ${u} `+JSON.stringify(d.size)),d.size.width=m*(d.widthInColumns??1)+BDt*((d.widthInColumns??1)-1),d.size.height=u,d.size.x=0,d.size.y=0,D.debug(`abc95 updating size of ${s.id} children child:${d.id} maxWidth:${m} maxHeight:`+u));for(p of s.children)MDt(p,o,m,u);let t=s.columns??-1,e=0;for(g of s.children)e+=g.widthInColumns??1;let r=s.children.length,n=(0<t&&t<e&&(r=t),Math.ceil(e/r)),i=r*(m+BDt)+BDt,a=n*(u+BDt)+BDt;if(i<l){D.debug(`Detected to small sibling: abc95 ${s.id} siblingWidth ${l} siblingHeight ${c} width `+i),i=l,a=c;var y,v=(l-r*BDt-BDt)/r,x=(c-n*BDt-BDt)/n;D.debug("Size indata abc88",s.id,"childWidth",v,"maxWidth",m),D.debug("Size indata abc88",s.id,"childHeight",x,"maxHeight",u),D.debug("Size indata abc88 xSize",r,"padding",BDt);for(y of s.children)y.size&&(y.size.width=v,y.size.height=x,y.size.x=0,y.size.y=0)}if(D.debug(`abc95 (finale calc) ${s.id} xSize ${r} ySize ${n} columns ${t}${s.children.length} width=`+Math.max(i,s.size?.width||0)),i<(s?.size?.width||0)&&(i=s?.size?.width||0,0<(f=0<t?Math.min(s.children.length,t):s.children.length))){var b,w=(i-f*BDt-BDt)/f;D.debug("abc95 (growing to fit) width",s.id,i,s.size?.width,w);for(b of s.children)b.size&&(b.size.width=w)}s.size={width:i,height:a,x:0,y:0}}D.debug("setBlockSizes abc94 (done)",s.id,s?.size?.x,s?.size?.width,s?.size?.y,s?.size?.height)}function DDt(i,a){D.debug(`abc85 layout blocks (=>layoutBlocks) ${i.id} x: ${i?.size?.x} y: ${i?.size?.y} width: `+i?.size?.width);var s=i.columns??-1;if(D.debug("layoutBlocks columns abc95",i.id,"=>",s,i),i.children&&0<i.children.length){var o,t=i?.children[0]?.size?.width??0,t=i.children.length*t+(i.children.length-1)*BDt;D.debug("widthOfChildren 88",t,"posX");let e=0,r=(D.debug("abc91 block?.size?.x",i.id,i?.size?.x),i?.size?.x?i?.size?.x+(-i?.size?.width/2||0):-BDt),n=0;for(o of i.children){var l=i;if(o.size){var{width:c,height:h}=o.size,{px:u,py:d}=RDt(s,e);d!=n&&(n=d,r=i?.size?.x?i?.size?.x+(-i?.size?.width/2||0):-BDt,D.debug("New row in layout for block",i.id," and child ",o.id,n)),D.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${e} (px, py) ${u},${d} (${l?.size?.x},${l?.size?.y}) parent: ${l.id} width: `+c+BDt),l.size&&(u=c/2,o.size.x=r+BDt+u,D.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${r} new startingPosX${o.size.x} ${u} padding=${BDt} width=${c} halfWidth=${u} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 `+c*(o?.widthInColumns??1)/2),r=o.size.x+u,o.size.y=l.size.y-l.size.height/2+d*(h+BDt)+h/2+BDt,D.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${r}${BDt}${u}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2`+c*(o?.widthInColumns??1)/2)),o.children&&DDt(o,a);let t=o?.widthInColumns??1;0<s&&(t=Math.min(t,s-e%s)),e+=t,D.debug("abc88 columnsPos",o,e)}}}D.debug(`layout blocks (<==layoutBlocks) ${i.id} x: ${i?.size?.x} y: ${i?.size?.y} width: `+i?.size?.width)}function ODt(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(t.size&&"root"!==t.id&&({x:a,y:s,width:o,height:l}=t.size,a-o/2<e&&(e=a-o/2),s-l/2<r&&(r=s-l/2),n<a+o/2&&(n=a+o/2),i<s+l/2)&&(i=s+l/2),t.children)for(var c of t.children)({minX:e,minY:r,maxX:n,maxY:i}=ODt(c,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function PDt(t){var e,r,n=t.getBlock("root");if(n)return MDt(n,t,0,0),DDt(n,t),D.debug("getBlocks",JSON.stringify(n,null,2)),{minX:t,minY:n,maxX:e,maxY:r}=ODt(n),{x:t,y:n,width:e-t,height:r-n}}var BDt,$Dt,FDt=b(()=>{t(),Tu(),BDt=O()?.block?.padding??8,me(RDt,"calculateBlockPosition"),$Dt=me(t=>{let e=0,r=0;for(var n of t.children){var{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};D.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),"space"!==n.type&&(i>e&&(e=i/(t.widthInColumns??1)),a>r)&&(r=a)}return{width:e,height:r}},"getMaxChildSize"),me(MDt,"setBlockSizes"),me(DDt,"layoutBlocks"),me(ODt,"findBounds"),me(PDt,"layout")});function zDt(t,e){e&&t.attr("style",e)}function GDt(t,e){var r=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=r.append("xhtml:div"),i=t.label,a=t.isNode?"nodeLabel":"edgeLabel",s=n.append("span");return s.html(lc(i,e)),zDt(s,t.labelStyle),s.attr("class",a),zDt(n,t.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}var UDt,qDt,jDt,WDt,YDt,HDt=b(()=>{i6(),Tu(),Oc(),t(),JL(),iS(),me(zDt,"applyStyle"),me(GDt,"addHtmlLabel"),UDt=me(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),t=O(),fc(t.flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),D.debug("vertexText"+i),GDt({isNode:n,label:await ZL(rS(i)),labelStyle:e.replace("fill:","color:")},t);var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),qDt=UDt}),VDt=b(()=>{t(),jDt=me((t,e,r,n,i)=>{e.arrowTypeStart&&YDt(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&YDt(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),WDt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},YDt=me((t,e,r,n,i,a)=>{var s=WDt[r];s?t.attr("marker-"+e,`url(${n}#${i}_${a}-${s}${"start"===e?"Start":"End"})`):D.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function XDt(t,e){O().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var KDt,ZDt,QDt,JDt,tOt,eOt,rOt,nOt,iOt,aOt,sOt=b(()=>{t(),HDt(),JL(),i6(),Tu(),iS(),Oc(),gO(),aO(),VDt(),KDt={},ZDt={},QDt=me(async(t,e)=>{var r,n=O(),i=fc(n.flowchart.htmlLabels),n="markdown"===e.labelType?QL(t,e.label,{style:e.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):await qDt(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();i&&(i=n.children[0],r=H(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),KDt[e.id]=a,e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(i=await qDt(e.startLabelLeft,e.labelStyle),s=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a=i.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),ZDt[e.id]||(ZDt[e.id]={}),ZDt[e.id].startLeft=r,XDt(l,e.startLabelLeft)),e.startLabelRight&&(i=await qDt(e.startLabelRight,e.labelStyle),a=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a.node().appendChild(i),r=i.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),ZDt[e.id]||(ZDt[e.id]={}),ZDt[e.id].startRight=s,XDt(l,e.startLabelRight)),e.endLabelLeft&&(i=await qDt(e.endLabelLeft,e.labelStyle),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(i),s=i.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(i),ZDt[e.id]||(ZDt[e.id]={}),ZDt[e.id].endLeft=a,XDt(l,e.endLabelLeft)),e.endLabelRight&&(r=await qDt(e.endLabelRight,e.labelStyle),i=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=i.node().appendChild(r),a=r.getBBox(),i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),ZDt[e.id]||(ZDt[e.id]={}),ZDt[e.id].endRight=s,XDt(l,e.endLabelRight)),n},"insertEdgeLabel"),me(XDt,"setTerminalWidth"),JDt=me((n,i)=>{D.debug("Moving label abc88 ",n.id,n.label,KDt[n.id],i);var a,s=i.updatedPath||i.originalPath,o=O(),o=YD(o).subGraphTitleTotalMargin;if(n.label){let t=KDt[n.id],e=n.x,r=n.y;s&&(a=tS.calcLabelPosition(s),D.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(n.startLabelLeft){let t=ZDt[n.id].startLeft,e=n.x,r=n.y;s&&(i=tS.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=ZDt[n.id].startRight,e=n.x,r=n.y;s&&(a=tS.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=ZDt[n.id].endLeft,e=n.x,r=n.y;s&&(o=tS.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=ZDt[n.id].endRight,e=n.x,r=n.y;s&&(i=tS.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),tOt=me((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),eOt=me((t,n,i)=>{D.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(n)} + insidePoint : ${JSON.stringify(i)} + node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),s=t.width/2,o=i.x<n.x?s-r:s+r,l=t.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x),u;if(Math.abs(e-n.y)*s>Math.abs(a-n.x)*l)return t=i.y<n.y?n.y-l-e:e-l-n.y,o=h*t/c,u={x:i.x<n.x?i.x+o:i.x-h+o,y:i.y<n.y?i.y+c-t:i.y-c+t},0===o&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),D.debug(`abc89 topp/bott calc, Q ${c}, q ${t}, R ${h}, r `+o,u),u;{let t=c*(o=i.x<n.x?n.x-s-a:a-s-n.x)/h,e=i.x<n.x?i.x+h-o:i.x-h+o,r=i.y<n.y?i.y+t:i.y-t;return D.debug(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r `+o,{_x:e,_y:r}),0===o&&(e=n.x,r=n.y),0===h&&(e=n.x),0===c&&(r=n.y),{x:e,y:r}}},"intersection"),rOt=me((t,n)=>{D.debug("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(tOt(n,t)||s)a=t,s||i.push(t);else{let e=eOt(n,a,t),r=!1;i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)||i.push(e),s=!0}}),i},"cutPathAtIntersect"),nOt=me(function(t,e,r,n,i,a,s){let o=r.points,l=(D.debug("abc88 InsertEdge: edge=",r,"e=",e),!1),c=a.node(e.v),h=a.node(e.w),u=(h?.intersect&&c?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(c.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(D.debug("to cluster abc88",n[r.toCluster]),o=rOt(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(D.debug("from cluster abc88",n[r.fromCluster]),o=rOt(o.reverse(),n[r.fromCluster].node).reverse(),l=!0),o.filter(t=>!Number.isNaN(t.y))),d=v3,{x:p,y:g}=(!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve),hO(r)),f=r3().x(p).y(g).curve(d),m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}let y=t.append("path").attr("d",f(u)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style),v="";return(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&(v=gc(!0)),jDt(y,r,v,s,i),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),oOt=b(()=>{iOt=me(t=>{var e,r=new Set;for(e of t)switch(e){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(e)}return r},"expandAndDeduplicateDirections"),aOt=me((t,e,r)=>{var t=iOt(t),n=e.height+2*r.padding,i=n/2,e=e.width+2*i+r.padding,r=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:i,y:0},{x:e/2,y:2*r},{x:e-i,y:0},{x:e,y:0},{x:e,y:-n/3},{x:e+2*r,y:-n/2},{x:e,y:-2*n/3},{x:e,y:-n},{x:e-i,y:-n},{x:e/2,y:-n-2*r},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*r,y:-n/2},{x:0,y:-n/3}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:i,y:0},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:i,y:-n},{x:e-i,y:-n},{x:e,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:e,y:-i},{x:e,y:i-n},{x:0,y:-n}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:e,y:0},{x:0,y:-i},{x:0,y:i-n},{x:e,y:-n}]:t.has("right")&&t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")&&t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:e,y:-i},{x:0,y:-n}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:e,y:0},{x:0,y:-n}]:t.has("left")&&t.has("up")?[{x:e,y:0},{x:0,y:-i},{x:e,y:-n}]:t.has("left")&&t.has("down")?[{x:e,y:0},{x:0,y:0},{x:e,y:-n}]:t.has("right")?[{x:i,y:-r},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:r-n}]:t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")?[{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r}]:t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function lOt(t,e){return t.intersect(e)}var cOt,hOt=b(()=>{me(lOt,"intersectNode"),cOt=lOt});function uOt(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x<i&&(a=-a),Math.abs(e*r*s/o));return{x:i+a,y:t+(e=n.y<t?-e:e)}}var dOt,pOt=b(()=>{me(uOt,"intersectEllipse"),dOt=uOt});function gOt(t,e,r){return dOt(t,e,e,r)}var fOt,mOt=b(()=>{pOt(),me(gOt,"intersectCircle"),fOt=gOt});function yOt(t,e,r,n){var i,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0<u*d||(u=(i=n.y-r.y)*t.x+(a=r.x-n.x)*t.y+(s=n.x*r.y-r.x*n.y),d=i*e.x+a*e.y+s,0!=u&&0!==d&&0<u*d)||0==(o=l*a-i*c)))return t=Math.abs(o/2),{x:(r=c*s-a*h)<0?(r-t)/o:(r+t)/o,y:(r=i*h-l*s)<0?(r-t)/o:(r+t)/o}}function vOt(t,e){return 0<t*e}var xOt,bOt=b(()=>{me(yOt,"intersectLine"),me(vOt,"sameSign"),xOt=yOt});function wOt(t,e,n){var r=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-s,c=i-t.height/2-o,h=0;h<e.length;h++){var u=e[h],d=e[h<e.length-1?h+1:0];(u=xOt(t,n,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y}))&&a.push(u)}return a.length?(1<a.length&&a.sort(function(t,e){var r=t.x-n.x,t=t.y-n.y,r=Math.sqrt(r*r+t*t),t=e.x-n.x,e=e.y-n.y;return r<(t=Math.sqrt(t*t+e*e))?-1:r===t?0:1}),a[0]):t}var kOt,TOt,EOt,COt,SOt=b(()=>{bOt(),me(kOt=wOt,"intersectPolygon")}),_Ot=b(()=>{TOt=me((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),EOt=TOt}),AOt=b(()=>{hOt(),mOt(),pOt(),SOt(),_Ot(),COt={node:cOt,circle:fOt,ellipse:dOt,polygon:kOt,rect:EOt}});function LOt(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var NOt,IOt,ROt,MOt,DOt=b(()=>{HDt(),JL(),Tu(),i6(),Oc(),iS(),NOt=me(async(t,e,r,i)=>{let a=O(),n,s=e.useHtmlLabels||fc(a.flowchart.htmlLabels),o=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),c,h=(c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],l.node()),u,d=(u="markdown"===e.labelType?QL(l,lc(rS(c),a),{useHtmlLabels:s,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(await qDt(lc(rS(c),a),e.labelStyle,!1,i))).getBBox(),p=e.padding/2;if(fc(a.flowchart.htmlLabels)){if(r=u.children[0],t=H(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/<img[^>]*>/g,"").trim();await Promise.all([...i].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=a.fontSize||window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}d=r.getBoundingClientRect(),t.attr("width",d.width),t.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),IOt=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),me(LOt,"insertPolygonShape")}),OOt=b(()=>{DOt(),t(),Tu(),AOt(),ROt=me(async(t,e)=>{e.useHtmlLabels||O().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:n}=await NOt(t,e,"node "+e.classes,!0),i=(D.info("Classes = ",e.classes),t.insert("rect",":first-child"));return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",r.width+e.padding).attr("height",r.height+e.padding),IOt(e,i),e.intersect=function(t){return COt.rect(e,t)},t},"note"),MOt=ROt});function POt(t,e,r,n){let i=[],a=me(t=>{i.push(t,0)},"addBorder"),s=me(t=>{i.push(0,t)},"skipBorder");(e.includes("t")?(D.debug("add top border"),a):s)(r),(e.includes("r")?(D.debug("add right border"),a):s)(n),(e.includes("b")?(D.debug("add bottom border"),a):s)(r),(e.includes("l")?(D.debug("add left border"),a):s)(n),t.attr("stroke-dasharray",i.join(" "))}var BOt,$Ot,FOt,zOt,GOt,UOt,qOt,jOt,WOt,YOt,HOt,VOt,XOt,KOt,ZOt,QOt,JOt,tPt,ePt,rPt,nPt,iPt,aPt,sPt,oPt,lPt,cPt,hPt,uPt,dPt=b(()=>{i6(),Tu(),Oc(),t(),oOt(),HDt(),AOt(),OOt(),DOt(),BOt=me(t=>t?" "+t:"","formatClass"),$Ot=me((t,e)=>`${e||"node default"}${BOt(t.classes)} `+BOt(t.class),"getClassesFromNode"),FOt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,$Ot(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return D.info("Question main (Circle)"),(t=LOt(r,s,s,o)).attr("style",e.style),IOt(e,t),e.intersect=function(t){return D.warn("Intersect called"),COt.polygon(e,o,t)},r},"question"),zOt=me((t,e)=>((t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return COt.circle(e,14,t)},t),"choice"),GOt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,$Ot(e,void 0),!0),i=n.height+e.padding,a=i/4,s=n.width+2*a+e.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=LOt(r,s,i,o);return l.attr("style",e.style),IOt(e,l),e.intersect=function(t){return COt.polygon(e,o,t)},r},"hexagon"),UOt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,void 0,!0),i=n.height+2*e.padding,a=i/2,s=n.width+2*a+e.padding,o=aOt(e.directions,n,e),l=LOt(r,s,i,o);return l.attr("style",e.style),IOt(e,l),e.intersect=function(t){return COt.polygon(e,o,t)},r},"block_arrow"),qOt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,$Ot(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return LOt(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return COt.polygon(e,s,t)},r},"rect_left_inv_arrow"),jOt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,$Ot(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=LOt(r,i,a,s);return o.attr("style",e.style),IOt(e,o),e.intersect=function(t){return COt.polygon(e,s,t)},r},"lean_right"),WOt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,$Ot(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=LOt(r,i,a,s);return o.attr("style",e.style),IOt(e,o),e.intersect=function(t){return COt.polygon(e,s,t)},r},"lean_left"),YOt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,$Ot(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=LOt(r,i,a,s);return o.attr("style",e.style),IOt(e,o),e.intersect=function(t){return COt.polygon(e,s,t)},r},"trapezoid"),HOt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,$Ot(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=LOt(r,i,a,s);return o.attr("style",e.style),IOt(e,o),e.intersect=function(t){return COt.polygon(e,s,t)},r},"inv_trapezoid"),VOt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,$Ot(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=LOt(r,i,a,s);return o.attr("style",e.style),IOt(e,o),e.intersect=function(t){return COt.polygon(e,s,t)},r},"rect_right_inv_arrow"),XOt=me(async(t,i)=>{let{shapeSvg:e,bbox:r}=await NOt(t,i,$Ot(i,void 0),!0),n=r.width+i.padding,a=n/2,s=a/(2.5+n/50),o=r.height+s+i.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,c=e.attr("label-offset-y",s).insert("path",":first-child").attr("style",i.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return IOt(i,c),i.intersect=function(e){var r=COt.rect(i,e),n=r.x-i.x;if(0!=a&&(Math.abs(n)<i.width/2||Math.abs(n)==i.width/2&&Math.abs(r.y-i.y)>i.height/2-s)){let t=s*s*(1-n*n/(a*a));0!=t&&(t=Math.sqrt(t)),t=s-t,0<e.y-i.y&&(t=-t),r.y+=t}return r},e},"cylinder"),KOt=me(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:n}=await NOt(t,e,"node "+e.classes+" "+e.class,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/2:-r.height/2-n;return i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(POt(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{D.warn("Unknown node property "+t)})),IOt(e,i),e.intersect=function(t){return COt.rect(e,t)},t},"rect"),ZOt=me(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:n}=await NOt(t,e,"node "+e.classes,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/2:-r.height/2-n;return i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(POt(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{D.warn("Unknown node property "+t)})),IOt(e,i),e.intersect=function(t){return COt.rect(e,t)},t},"composite"),QOt=me(async(t,e)=>{var r,t=(await NOt(t,e,"label",!0)).shapeSvg,n=(D.trace("Classes = ",e.class),t.insert("rect",":first-child"));return n.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(POt(n,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{D.warn("Unknown node property "+t)})),IOt(e,n),e.intersect=function(t){return COt.rect(e,t)},t},"labelRect"),me(POt,"applyNodePropertyBorders"),JOt=me(async(t,e)=>{let r,n=(r=e.classes?"node "+e.classes:"node default",t.insert("g").attr("class",r).attr("id",e.domId||e.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l,c=(l="object"==typeof o?o[0]:o,D.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(await qDt(l,e.labelStyle,!0,!0))),h={width:0,height:0};fc(O().flowchart.htmlLabels)&&(t=c.children[0],d=H(c),h=t.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),D.info("Text 2",o);var u,t=o.slice(1,o.length),d=c.getBBox(),t=s.node().appendChild(await qDt(t.join?t.join("<br/>"):t,e.labelStyle,!0,!0)),p=(fc(O().flowchart.htmlLabels)&&(p=t.children[0],u=H(t),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),e.padding/2);return H(t).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),H(c).attr("transform","translate( "+(h.width<d.width?0:-(d.width-h.width)/2)+", 0)"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-p+3)+")"),i.attr("class","outer title-state").attr("x",-h.width/2-p).attr("y",-h.height/2-p).attr("width",h.width+e.padding).attr("height",h.height+e.padding),a.attr("class","divider").attr("x1",-h.width/2-p).attr("x2",h.width/2+p).attr("y1",-h.height/2-p+d.height+p).attr("y2",-h.height/2-p+d.height+p),IOt(e,i),e.intersect=function(t){return COt.rect(e,t)},n},"rectWithTitle"),tPt=me(async(t,e)=>{var{shapeSvg:t,bbox:r}=await NOt(t,e,$Ot(e,void 0),!0),n=r.height+e.padding,r=r.width+n/4+e.padding,r=t.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-r/2).attr("y",-n/2).attr("width",r).attr("height",n);return IOt(e,r),e.intersect=function(t){return COt.rect(e,t)},t},"stadium"),ePt=me(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await NOt(t,e,$Ot(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),D.info("Circle main"),IOt(e,a),e.intersect=function(t){return D.info("Circle intersect",e,n.width/2+i,t),COt.circle(e,n.width/2+i,t)},r},"circle"),rPt=me(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await NOt(t,e,$Ot(e,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),D.info("DoubleCircle main"),IOt(e,s),e.intersect=function(t){return D.info("DoubleCircle intersect",e,n.width/2+i+5,t),COt.circle(e,n.width/2+i+5,t)},r},"doublecircle"),nPt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await NOt(t,e,$Ot(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=LOt(r,i,a,s);return o.attr("style",e.style),IOt(e,o),e.intersect=function(t){return COt.polygon(e,s,t)},r},"subroutine"),iPt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),IOt(e,r),e.intersect=function(t){return COt.circle(e,7,t)},t},"start"),aPt=me((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;return"LR"===r&&(i=10,a=70),t=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join"),IOt(e,t),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return COt.rect(e,t)},n},"forkJoin"),sPt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),n=t.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),IOt(e,n),e.intersect=function(t){return COt.circle(e,7,t)},t},"end"),oPt=me(async(t,s)=>{let e=s.padding/2,r,n=(r=s.classes?"node "+s.classes:"node default",t.insert("g").attr("class",r).attr("id",s.domId||s.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("line"),l=0,c=4,h=n.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=h.node().appendChild(await qDt(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(fc(O().flowchart.htmlLabels)&&(t=g.children[0],y=H(g),f=t.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height)),s.classData.annotations[0]&&(c+=f.height+4,l+=f.width),s.classData.label);var y;void 0!==s.classData.type&&""!==s.classData.type&&(O().flowchart.htmlLabels?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),H(t=h.node().appendChild(await qDt(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=t.getBBox(),x=(fc(O().flowchart.htmlLabels)&&(y=t.children[0],w=H(t),v=y.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),b=(s.classData.members.forEach(async t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(O().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(await qDt(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;fc(O().flowchart.htmlLabels)&&(t=n.children[0],a=H(n),i=t.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,x.push(n)}),c+=8,[]);s.classData.methods.forEach(async t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(O().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(await qDt(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;fc(O().flowchart.htmlLabels)&&(t=n.children[0],a=H(n),i=t.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,b.push(n)}),c+=8,d&&(y=(l-f.width)/2,H(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var w=(l-v.width)/2;return H(t).attr("transform","translate( "+(-1*l/2+w)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,x.forEach(t=>{H(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,b.forEach(t=>{H(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),i.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-e).attr("y",-c/2-e).attr("width",l+s.padding).attr("height",c+s.padding),IOt(s,i),s.intersect=function(t){return COt.rect(s,t)},n},"class_box"),lPt={rhombus:FOt,composite:ZOt,question:FOt,rect:KOt,labelRect:QOt,rectWithTitle:JOt,choice:zOt,circle:ePt,doublecircle:rPt,stadium:tPt,hexagon:GOt,block_arrow:UOt,rect_left_inv_arrow:qOt,lean_right:jOt,lean_left:WOt,trapezoid:YOt,inv_trapezoid:HOt,rect_right_inv_arrow:VOt,cylinder:XOt,start:iPt,end:sPt,note:MOt,subroutine:nPt,fork:aPt,join:aPt,class_box:oPt},cPt={},hPt=me(async(e,r,n)=>{let i,a;if(r.link){let t;"sandbox"===O().securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await lPt[r.shape](i,r,n)}else a=await lPt[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),cPt[r.id]=i,r.haveCallback&&cPt[r.id].attr("class",cPt[r.id].attr("class")+" clickable"),i},"insertNode"),uPt=me(t=>{var e=cPt[t.id],r=(D.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")});function pPt(t,e,r=!1){let n=t,i="default",a=(0<(n?.classes?.length||0)&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label",0),s="",o;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}var t=wC(n?.styles??[]),l=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:t.labelStyle,shape:s,labelText:n.label,rx:a,ry:a,class:i,style:t.style,id:n.id,directions:n.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:r,intersect:void 0,type:n.type,padding:o??ar()?.block?.padding??0}}async function gPt(t,e,r){var n;"group"!==(e=pPt(e,0,!1)).type&&(n=ar(),n=(t=await hPt(t,e,{config:n})).node().getBBox(),(e=r.getBlock(e.id)).size={width:n.width,height:n.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function fPt(t,e,r){var n=pPt(e,0,!0);"space"!==r.getBlock(n.id).type&&(r=ar(),await hPt(t,n,{config:r}),e.intersect=n?.intersect,uPt(n))}async function mPt(t,e,r,n){for(var i of e)await n(t,i,r),i.children&&await mPt(t,i.children,r,n)}async function yPt(t,e,r){await mPt(t,e,r,gPt)}async function vPt(t,e,r){await mPt(t,e,r,fPt)}async function xPt(t,e,r,n,i){var a,s,o,l,c=new QY({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&c.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of e)s.start&&s.end&&(l=n.getBlock(s.start),o=n.getBlock(s.end),l?.size)&&o?.size&&(l=l.size,o=o.size,l=[{x:l.x,y:l.y},{x:l.x+(o.x-l.x)/2,y:l.y+(o.y-l.y)/2},{x:o.x,y:o.y}],nOt(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",c,i),s.label)&&(await QDt(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),JDt({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var bPt,wPt,kPt,TPt=b(()=>{tH(),rn(),sOt(),dPt(),iS(),me(pPt,"getNodeFromBlock"),me(gPt,"calculateBlockSize"),me(fPt,"insertBlockPositioned"),me(mPt,"performOperations"),me(yPt,"calculateBlockSizes"),me(vPt,"insertBlocks"),me(xPt,"insertEdges")}),EPt=b(()=>{i6(),rn(),IDt(),t(),lh(),FDt(),TPt(),bPt=me(function(t,e){return e.db.getClasses()},"getClasses"),wPt=me(async function(t,e,r,n){let{securityLevel:i,block:a}=ar(),s=n.db,o;"sandbox"===i&&(o=H("#i"+e));var l=H("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===i?l.select(`[id="${e}"]`):H(`[id="${e}"]`),n=(ADt(l,["point","circle","cross"],n.type,e),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await yPt(u,n,s),PDt(s));await vPt(u,n,s),await xPt(u,h,c,s,e),d&&(n=d,u=Math.max(1,Math.round(n.width/n.height*.125)),h=n.height+u+10,c=n.width+10,e=a.useMaxWidth,Zc(l,h,c,!!e),D.debug("Here Bounds",d,n),l.attr("viewBox",`${n.x-5} ${n.y-5} ${n.width+10} `+(n.height+10)))},"draw"),kPt={draw:wPt,getClasses:bPt}}),CPt={};KBt(CPt,{diagram:()=>SPt});var SPt,_Pt,APt,LPt,NPt,IPt,RPt,MPt,DPt,OPt,PPt,BPt,$Pt,FPt,zPt,GPt,UPt,qPt,jPt,WPt,YPt,HPt,VPt,XPt,KPt,ZPt,QPt,JPt,tBt,eBt,rBt,nBt=b(()=>{FMt(),LDt(),NDt(),EPt(),SPt={parser:BMt,db:pDt,renderer:kPt,styles:mDt}}),iBt=b(()=>{_Pt={L:"left",R:"right",T:"top",B:"bottom"},APt={L:me(t=>t+`,${t/2} 0,${t} 0,0`,"L"),R:me(t=>`0,${t/2} ${t},0 ${t},`+t,"R"),T:me(t=>`0,0 ${t},0 ${t/2},`+t,"T"),B:me(t=>t/2+`,0 ${t},${t} 0,`+t,"B")},LPt={L:me((t,e)=>t-e+2,"L"),R:me((t,e)=>t-2,"R"),T:me((t,e)=>t-e+2,"T"),B:me((t,e)=>t-2,"B")},NPt=me(function(t){return RPt(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),IPt=me(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),RPt=me(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),MPt=me(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),DPt=me(function(t,e){var r=RPt(t)&&MPt(e),t=MPt(t)&&RPt(e);return r||t},"isArchitectureDirectionXY"),OPt=me(function(t){var e=t[0],t=t[1],r=RPt(e)&&MPt(t),e=MPt(e)&&RPt(t);return r||e},"isArchitecturePairXY"),PPt=me(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),BPt=me(function(t,e){return PPt(t=""+t+e)?t:void 0},"getArchitectureDirectionPair"),$Pt=me(function([t,e],r){var n=r[0],r=r[1];return RPt(n)?MPt(r)?[t+("L"===n?-1:1),e+("T"===r?1:-1)]:[t+("L"===n?-1:1),e]:RPt(r)?[t+("L"===r?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),FPt=me(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),zPt=me(function(t,e){return DPt(t,e)?"bend":RPt(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),GPt=me(function(t){return"service"===t.type},"isArchitectureService"),UPt=me(function(t){return"junction"===t.type},"isArchitectureJunction"),qPt=me(t=>t.data(),"edgeData"),jPt=me(t=>t.data(),"nodeData")}),aBt=b(()=>{rn(),tn(),iS(),ku(),iBt(),WPt=We.architecture,YPt=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=mh,this.getAccTitle=yh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getAccDescription=xh,this.setAccDescription=vh,this.clear()}static{me(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},fh()}addService({id:t,icon:e,in:r,title:n,iconText:i}){if(void 0!==this.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another `+this.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[r])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(GPt)}addJunction({id:t,in:e}){this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(UPt)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:r,title:n}){if(void 0!==this.registeredIds?.[t])throw new Error(`The group id [${t}] is already in use by another `+this.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===this.registeredIds?.[r])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[r])throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!IPt(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+String(r));if(!IPt(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+String(n));if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);var c=this.nodes[t].in,h=this.nodes[e].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l}),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let s={},o=Object.entries(this.nodes).reduce((t,[a,e])=>(t[a]=e.edges.reduce((t,e)=>{var r,n=this.getNode(e.lhsId)?.in,i=this.getNode(e.rhsId)?.in;return n&&i&&n!==i&&"bend"!==(r=zPt(e.lhsDir,e.rhsDir))&&(s[n]??={},s[n][i]=r,s[i]??={},s[i][n]=r),e.lhsId===a?(i=BPt(e.lhsDir,e.rhsDir))&&(t[i]=e.rhsId):(n=BPt(e.rhsDir,e.lhsDir))&&(t[n]=e.lhsId),t},{}),t),{}),r=Object.keys(o)[0],l={[r]:1},c=Object.keys(o).reduce((t,e)=>e===r?t:{...t,[e]:1},{}),t=me(t=>{let i={[t]:[0,0]},a=[t];for(;0<a.length;){var e=a.shift();if(e){l[e]=1,delete c[e];let t=o[e],[r,n]=i[e];Object.entries(t).forEach(([t,e])=>{l[e]||(i[e]=$Pt([r,n],t),a.push(e))})}}return i},"BFS"),e=[t(r)];for(;0<Object.keys(c).length;)e.push(t(Object.keys(c)[0]));this.dataStructures={adjList:o,spatialMaps:e,groupAlignments:s}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return SC({...WPt,...ar().architecture})}getConfigField(t){return this.getConfig()[t]}}}),sBt=b(()=>{v6t(),t(),k6t(),aBt(),HPt=me((t,e)=>{x6t(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t))},"populateDb"),VPt={parser:{yy:void 0},parse:me(async t=>{var t=await g6t("architecture",t),e=(D.debug(t),VPt.parser?.yy);if(!(e instanceof YPt))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");HPt(t,e)},"parse")}}),oBt=b(()=>{XPt=me(t=>` + .edge { + stroke-width: ${t.archEdgeWidth}; + stroke: ${t.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${t.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${t.archGroupBorderColor}; + stroke-width: ${t.archGroupBorderWidth}; + stroke-dasharray: 8; + } + .node-icon-text { + display: flex; + align-items: center; + } + + .node-icon-text > div { + color: #fff; + margin: 1px; + height: fit-content; + text-align: center; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + } +`,"getStyles"),KPt=XPt}),lBt=WBt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}me(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),s=r(9);function o(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in me(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=o},function(t,e,r){function n(t){this.vGraphObject=t}me(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(n in me(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;r<t.length;r++)t[r].withChildren().forEach(function(t){e.add(t)});return e},h.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),r=0;r<e.length;r++)t+=e[r].getNoOfChildren();return 0==t?1:t},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var t=-o.INITIAL_WORLD_BOUNDARY,e=o.INITIAL_WORLD_BOUNDARY,e=o.WORLD_CENTER_X+l.nextDouble()*(e-t)+t,t=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-t)+t;this.rect.x=e,this.rect.y=r},h.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var t,e;0!=this.getChild().getNodes().length&&((e=this.getChild()).updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(t=e.getRight()-e.getLeft(),e=e.getBottom()-e.getTop(),this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(t+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>t?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(t+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(e+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>e?(this.rect.y-=(this.labelHeight-e)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(e+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=h},function(t,e,r){var n,i=r(0);function a(){}for(n in me(a,"FDLayoutConstants"),i)a[n]=i[n];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=a},function(t,e,r){function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){var n,i=r(2),d=r(10),a=r(0),s=r(7),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(t,e,r){i.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in me(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(n))throw"Node already in graph!";return(n.owner=this).getNodes().push(n),n}if(n=t,!(-1<this.getNodes().indexOf(e)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(e.owner!=r.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=r.owner?null:(n.source=e,n.target=r,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),r!=e&&r.edges.push(n),n)},u.prototype.remove=function(t){var e=t;if(t instanceof o){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,n=e.edges.slice(),i=n.length,a=0;a<i;a++)((r=n[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(s=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(t instanceof l){if(null==(r=t))throw"Edge is null!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(null==r.source.owner||null==r.target.owner||r.source.owner!=this||r.target.owner!=this)throw"Source and/or target owner is invalid!";var s,e=r.source.edges.indexOf(r),t=r.target.edges.indexOf(r);if(!(-1<e&&-1<t))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(e,1),r.target!=r.source&&r.target.edges.splice(t,1),-1==(s=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var t,e=d.MAX_VALUE,r=d.MAX_VALUE,n=this.getNodes(),i=n.length,a=0;a<i;a++){var s,o=n[a];(s=o.getTop())<e&&(e=s),(s=o.getLeft())<r&&(r=s)}return e==d.MAX_VALUE?null:(t=null!=n[0].getParent().paddingLeft?n[0].getParent().paddingLeft:this.margin,this.left=r-t,this.top=e-t,new c(this.left,this.top))},u.prototype.updateBounds=function(t){for(var e,r,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=d.MAX_VALUE,s=-d.MAX_VALUE,o=this.nodes,l=o.length,c=0;c<l;c++){var h=o[c];t&&null!=h.child&&h.updateBounds(),(e=h.getLeft())<n&&(n=e),i<(e=h.getRight())&&(i=e),(e=h.getTop())<a&&(a=e),s<(e=h.getBottom())&&(s=e)}var u=new p(n,a,i-n,s-a);n==d.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=u.x-r,this.right=u.x+u.width+r,this.top=u.y-r,this.bottom=u.y+u.height+r},u.calculateBounds=function(t){for(var e=d.MAX_VALUE,r=-d.MAX_VALUE,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=t.length,s=0;s<a;s++){var o,l=t[s];(o=l.getLeft())<e&&(e=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<n&&(n=o),i<(o=l.getBottom())&&(i=o)}return new p(e,n,r-e,i-n)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,r=e.length,n=0;n<r;n++)t+=e[n].calcEstimatedSize();return this.estimatedSize=0==t?a.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var e=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,n=new h,i=new Set,t=this.nodes[0];for(t.withChildren().forEach(function(t){n.push(t),i.add(t)});0!==n.length;)for(var a,s,o=(a=(t=n.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(t,this))||i.has(s)||s.withChildren().forEach(function(t){n.push(t),i.add(t)});this.isConnected=!1,i.size>=this.nodes.length&&(r=0,i.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function n(t){c=r(6),this.layout=t,this.graphs=[],this.edges=[]}me(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1<this.graphs.indexOf(t))throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return(t.parent=e).child=t}if(i=r,r=t,t=(n=e).getOwner(),e=i.getOwner(),null==t||t.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==e||e.getGraphManager()!=this)throw"Target not in this graph mgr!";if(t==e)return r.isInterGraph=!1,t.add(r,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,-1<this.edges.indexOf(r))throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},n.prototype.remove=function(t){if(t instanceof c){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var r,n=[],i=(n=n.concat(e.getEdges())).length,a=0;a<i;a++)r=n[a],e.remove(r);for(var s,o=[],i=(o=o.concat(e.getNodes())).length,a=0;a<i;a++)s=o[a],e.remove(s);e==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(e);this.graphs.splice(l,1),e.parent=null}else if(t instanceof h){if(null==(r=t))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(l=r.source.edges.indexOf(r),r.source.edges.splice(l,1),l=r.target.edges.indexOf(r),r.target.edges.splice(l,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";l=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(l,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),r=e.length,n=0;n<r;n++)t=t.concat(e[n].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],e=this.getGraphs(),r=(e.length,0);r<e.length;r++)t=t.concat(e[r].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=t).parent&&(t.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var r,n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}for(n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,e,r,n,i,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(e=(t=a[o]).source,r=t.target,t.lca=null,(t.sourceInLca=e)==(t.targetInLca=r))t.lca=e.getOwner();else{for(n=e.getOwner();null==t.lca;){for(i=(t.targetInLca=r).getOwner();null==t.lca;){if(i==n){t.lca=i;break}if(i==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=i.getParent(),i=t.targetInLca.getOwner()}if(n==this.rootGraph)break;null==t.lca&&(t.sourceInLca=n.getParent(),n=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var r=t.getOwner();null!=r;){for(var n=e.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},n.prototype.calcInclusionTreeDepths=function(t,e){null==t&&null==e&&(t=this.rootGraph,e=1);for(var r,n=t.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=e,null!=r.child&&this.calcInclusionTreeDepths(r.child,e+1)},n.prototype.includesInvalidEdge=function(){for(var t,e=[],r=this.edges.length,n=0;n<r;n++)t=this.edges[n],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(n=0;n<e.length;n++)this.remove(e[n]);return!1},t.exports=n},function(t,e,r){var h=r(12);function n(){}me(n,"IGeometry"),n.calcSeparationAmount=function(t,e,r,n){if(!t.intersects(e))throw"assert failed";var i=new Array(2),a=(this.decideDirectionsForOverlappingNodes(t,e,i),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]<t?t=r[0]:e=r[1],r[0]=-1*i[0]*(t/2+n),r[1]=-1*i[1]*(e/2+n)},n.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},n.getIntersection2=function(t,e,r){var n=t.getCenterX(),i=t.getCenterY(),a=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return r[0]=n,r[1]=i,r[2]=a,r[3]=s,!0;var o=t.getX(),l=t.getY(),c=t.getRight(),h=t.getX(),u=t.getBottom(),d=t.getRight(),p=t.getWidthHalf(),g=t.getHeightHalf(),f=e.getX(),m=e.getY(),y=e.getRight(),v=e.getX(),x=e.getBottom(),b=e.getRight(),w=e.getWidthHalf(),k=e.getHeightHalf(),T=!1,E=!1;if(n===a){if(s<i)return r[0]=n,r[1]=l,r[2]=a,r[3]=x,!1;i<s&&(r[0]=n,r[1]=u,r[2]=a,r[3]=m)}else if(i===s){if(a<n)return r[0]=o,r[1]=i,r[2]=y,r[3]=s,!1;n<a&&(r[0]=c,r[1]=i,r[2]=f,r[3]=s)}else{var t=t.height/t.width,e=e.height/e.width,C=(s-i)/(a-n),S=void 0,_=void 0,A=void 0;if(-t==C?(a<n?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):t==C&&(a<n?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),T=!0),-e==C?(n<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):e==C&&(n<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<n?s<i?(S=this.getCardinalDirection(t,C,4),this.getCardinalDirection(e,C,2)):(S=this.getCardinalDirection(-t,C,3),this.getCardinalDirection(-e,C,1)):s<i?(S=this.getCardinalDirection(-t,C,1),this.getCardinalDirection(-e,C,3)):(S=this.getCardinalDirection(t,C,2),this.getCardinalDirection(e,C,4)),!T)switch(S){case 1:_=l,r[0]=n+-g/C,r[1]=_;break;case 2:_=i+p*C,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=n+g/C,r[1]=_;break;case 4:_=i+-p*C,r[0]=h,r[1]=_}if(!E)switch(c){case 1:A=m,r[2]=a+-k/C,r[3]=A;break;case 2:A=s+w*C,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/C,r[3]=A;break;case 4:A=s+-w*C,r[2]=v,r[3]=A}}return!1},n.getCardinalDirection=function(t,e,r){return e<t?r:1+r%4},n.getIntersection=function(t,e,r,n){var i,a,s,o,l,c;return null==n?this.getIntersection2(t,e,r):(i=t.x,a=e.x,l=r.x,o=a*(t=t.y)-i*(e=e.y),c=(s=n.x)*(r=r.y)-l*(n=n.y),0==(n=(e-=t)*(t=l-s)-(l=n-r)*(s=i-a))?null:new h((s*c-t*o)/n,(l*o-e*c)/n))},n.angleOfVector=function(t,e,r,n){var i=void 0;return t!==r?(i=Math.atan((n-e)/(r-t)),r<t?i+=Math.PI:n<e&&(i+=this.TWO_PI)):i=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},n.doIntersect=function(t,e,r,n){var i=t.x,t=t.y,a=e.x,e=e.y,s=r.x,r=r.y,o=n.x,l=(a-i)*((n=n.y)-r)-(o-s)*(e-t);return 0!=l&&(e=((t-e)*(o-i)+(a-i)*(n-t))/l,0<(a=((n-r)*(o-i)+(s-o)*(n-t))/l))&&a<1&&0<e&&e<1},n.findCircleLineIntersections=function(t,e,r,n,i,a,s){var o=(r-t)*(r-t)+(n-e)*(n-e);return 0<=(r=2*((t-i)*(r-t)+(e-a)*(n-e)))*r-4*o*(n=(t-i)*(t-i)+(e-a)*(e-a)-s*s)?(t=(-r+Math.sqrt(r*r-4*o*n))/(2*o),i=(-r-Math.sqrt(r*r-4*o*n))/(2*o),0<=t&&t<=1?[t]:0<=i&&i<=1?[i]:null):null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,r){function n(){}me(n,"IMath"),n.sign=function(t){return 0<t?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,r){function n(){}me(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(n,"defineProperties"),me(i,"_classCallCheck");var a,s,o=me(function(t){return{value:t,next:null,prev:null}},"nodeFrom"),l=me(function(t,e,r,n){return null!==t?t.next=e:n.head=e,null!==r?r.prev=e:n.tail=e,e.prev=t,e.next=r,n.length++,e},"add"),c=me(function(t,e){var r=t.prev,n=t.next;return null!==r?r.next=n:e.head=n,null!==n?n.prev=r:e.tail=r,t.prev=t.next=null,e.length--,t},"_remove");function h(t){var e=this;i(this,h),this.length=0,this.head=null,this.tail=null,t?.forEach(function(t){return e.push(t)})}me(h,"LinkedList"),a=h,s=[{key:"size",value:me(function(){return this.length},"size")},{key:"insertBefore",value:me(function(t,e){return l(e.prev,o(t),e,this)},"insertBefore")},{key:"insertAfter",value:me(function(t,e){return l(e,o(t),e.next,this)},"insertAfter")},{key:"insertNodeBefore",value:me(function(t,e){return l(e.prev,t,e,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:me(function(t,e){return l(e,t,e.next,this)},"insertNodeAfter")},{key:"push",value:me(function(t){return l(this.tail,o(t),null,this)},"push")},{key:"unshift",value:me(function(t){return l(null,o(t),this.head,this)},"unshift")},{key:"remove",value:me(function(t){return c(t,this)},"remove")},{key:"pop",value:me(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:me(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:me(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:me(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:me(function(t){if(t<=this.length()){for(var e=1,r=this.head;e<t;)r=r.next,e++;return r.value}},"get_object_at")},{key:"set_object_at",value:me(function(t,e){if(t<=this.length()){for(var r=1,n=this.head;r<t;)n=n.next,r++;n.value=e}},"set_object_at")}],n(a.prototype,s),t.exports=h},function(t,e,r){function n(t,e,r){this.x=null,(this.y=null)==t&&null==e&&null==r?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==r?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==r&&(this.x=(r=t).x,this.y=r.y)}me(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(t,e,r){"Point"==t.constructor.name&&null==e&&null==r?this.setLocation((r=t).x,r.y):"number"==typeof t&&"number"==typeof e&&null==r&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},n.prototype.move=function(t,e){this.x=t,this.y=e},n.prototype.translate=function(t,e){this.x+=t,this.y+=e},n.prototype.equals=function(t){return"Point"==t.constructor.name?this.x==t.x&&this.y==t.y:this==t},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){function n(t,e,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=r&&null!=n&&(this.x=t,this.y=e,this.width=r,this.height=n)}me(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(t){this.x=t},n.prototype.getY=function(){return this.y},n.prototype.setY=function(t){this.y=t},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}me(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(null==t.uniqueID&&(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return"Object#"+(null==t?i.lastID:t)},i.isPrimitive=function(t){var e="u"<typeof t?"undefined":n(t);return null==t||"object"!=e&&"function"!=e},t.exports=i},function(t,e,r){function g(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(g,"_toConsumableArray");var n=r(0),i=r(7),a=r(3),s=r(1),o=r(6),l=r(5),c=r(17),h=r(29);function u(t){h.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}me(u,"Layout"),u.RANDOM_SEED=1,(u.prototype=Object.create(h.prototype)).getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t},u.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},u.prototype.newNode=function(t){return new a(this.graphManager,t)},u.prototype.newEdge=function(t){return new s(null,null,t)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==n.ANIMATE&&(t&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},u.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];for(var r=this.graphManager.getRoot().getNodes(),e=0;e<r.length;e++)r[e];this.update(this.graphManager.getRoot())}},u.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof a){var e=t;if(null!=e.getChild())for(var r=e.getChild().getNodes(),n=0;n<r.length;n++)update(r[n]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else t instanceof s?null!=t.vGraphObject&&t.vGraphObject.update(t):t instanceof o&&null!=t.vGraphObject&&t.vGraphObject.update(t)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},u.prototype.transform=function(t){if(null==t)this.transform(new l(0,0));else{var e=new c,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(r.x),e.setDeviceOrgY(r.y);for(var n=this.getAllNodes(),i=0;i<n.length;i++)n[i].transform(e)}}},u.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,r,n=t.getNodes(),i=0;i<n.length;i++)null==(r=(e=n[i]).getChild())||0==r.getNodes().length?e.scatter():(this.positionNodesRandomly(r),e.updateBounds())},u.prototype.getFlatForest=function(){for(var t=[],e=!0,r=this.graphManager.getRoot().getNodes(),n=!0,i=0;i<r.length;i++)null!=r[i].getChild()&&(n=!1);if(n)for(var a=new Set,s=[],o=new Map,l=(l=[]).concat(r);0<l.length&&e;){for(s.push(l[0]);0<s.length&&e;){var c=s[0];s.splice(0,1),a.add(c);for(var h=c.getEdges(),i=0;i<h.length;i++){var u=h[i].getOtherEnd(c);if(o.get(c)!=u){if(a.has(u)){e=!1;break}s.push(u),o.set(u,c)}}}if(e){var d=[].concat(g(a));for(t.push(d),i=0;i<d.length;i++){var p=d[i];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,o=new Map}else t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i<t.bendpoints.length;i++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),n.add(a),this.newEdge(null));this.graphManager.add(s,r,a),e.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,t.target),this.edgeToDummyNodes.set(t,e),(t.isInterGraph()?this.graphManager:n).remove(t),e},u.prototype.createBendpointsFromDummyNodes=function(){for(var t=(t=[]).concat(this.graphManager.getAllEdges()),t=[].concat(g(this.edgeToDummyNodes.keys())).concat(t),e=0;e<t.length;e++){var r=t[e];if(0<r.bendpoints.length){for(var n=this.edgeToDummyNodes.get(r),i=0;i<n.length;i++){var a=n[i],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(i);o.x=s.x,o.y=s.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(t,e,r,n){var i,a;return null!=r&&null!=n?(i=e,t<=50?i-=(e-e/r)/50*(50-t):i+=(e*n-e)/50*(t-50),i):(r=t<=50?(a=9*e/500,e/10):(a=9*e/50,-8*e),a*t+r)},u.findCenterOfTree=function(t){var e=(e=[]).concat(t),r=[],n=new Map,i=!1,a=null;1!=e.length&&2!=e.length||(i=!0,a=e[0]);for(var s=0;s<e.length;s++){var o=(c=e[s]).getNeighborsList().size;n.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!i;){[].concat(l);for(var l=[],s=0;s<e.length;s++){var c=e[s],h=e.indexOf(c);0<=h&&e.splice(h,1),c.getNeighborsList().forEach(function(t){var e;r.indexOf(t)<0&&(1==(e=n.get(t)-1)&&l.push(t),n.set(t,e))})}r=r.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,r){function n(){}me(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return(n.x=1e4*Math.sin(n.seed++))-Math.floor(n.x)},t.exports=n},function(t,e,r){var n=r(5);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}me(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=this.lworldExtX;return 0!=e?this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/e:0},i.prototype.transformY=function(t){var e=this.lworldExtY;return 0!=e?this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/e:0},i.prototype.inverseTransformX=function(t){var e=this.ldeviceExtX;return 0!=e?this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/e:0},i.prototype.inverseTransformY=function(t){var e=this.ldeviceExtY;return 0!=e?this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/e:0},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,r){function d(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(d,"_toConsumableArray");var n,i=r(15),p=r(4),l=r(0),c=r(8),h=r(9);function a(){i.call(this),this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=p.MAX_ITERATIONS}for(n in me(a,"FDLayout"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=p.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var t,e,r,n,i,a,s=this.getGraphManager().getAllEdges(),o=0;o<s.length;o++)e=(t=s[o]).idealLength,t.isInterGraph&&(r=t.getSource(),n=t.getTarget(),i=t.getSourceInLca().getEstimatedSize(),a=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=i+a-2*l.SIMPLE_NODE_SIZE),i=t.getLca().getInclusionTreeDepth(),t.idealLength+=e*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+n.getInclusionTreeDepth()-2*i))},a.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),r=0;r<e.length;r++)t=e[r],this.calcSpringForce(t,t.idealLength)},a.prototype.calcRepulsionForces=function(){var t,e,r,n,i,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),i=new Set,t=0;t<o.length;t++)r=o[t],this.calculateRepulsionForceOfANode(r,i,a,s),i.add(r);else for(t=0;t<o.length;t++)for(r=o[t],e=t+1;e<o.length;e++)n=o[e],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},a.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),r=0;r<e.length;r++)t=e[r],this.calcGravitationalForce(t)},a.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},a.prototype.calcSpringForce=function(t,e){var r,n,i=t.getSource(),a=t.getTarget();if(this.uniformLeafNodeSizes&&null==i.getChild()&&null==a.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(r=t.getLength())&&(e=t.edgeElasticity*(r-e),n=t.lengthY/r*e,i.springForceX+=t=t.lengthX/r*e,i.springForceY+=n,a.springForceX-=t,a.springForceY-=n)},a.prototype.calcRepulsionForce=function(t,e){var r,n,i,a=t.getRect(),s=e.getRect(),o=new Array(2),l=new Array(4);a.intersects(s)?(c.calcSeparationAmount(a,s,o,p.DEFAULT_EDGE_LENGTH/2),n=2*o[0],i=2*o[1],o=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren),t.repulsionForceX-=o*n,t.repulsionForceY-=o*i,e.repulsionForceX+=o*n,e.repulsionForceY+=o*i):(o=this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(r=s.getCenterX()-a.getCenterX(),s.getCenterY()-a.getCenterY()):(c.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?h.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?h.sign(o)*p.MIN_REPULSION_DIST:o)*o,s=Math.sqrt(a),i=(l=(t.nodeRepulsion/2+e.nodeRepulsion/2)*t.noOfChildren*e.noOfChildren/a)*o/s,t.repulsionForceX-=n=l*r/s,t.repulsionForceY-=i,e.repulsionForceX+=n,e.repulsionForceY+=i)},a.prototype.calcGravitationalForce=function(t){var e,r=t.getOwner(),n=(r.getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,n=t.getCenterX()-n,i=t.getCenterY()-i,a=Math.abs(n)+t.getWidth()/2,s=Math.abs(i)+t.getHeight()/2;t.getOwner()==this.graphManager.getRoot()?((e=r.getEstimatedSize()*this.gravityRangeFactor)<a||e<s)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*i):((e=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||e<s)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*i*this.compoundGravityConstant)},a.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),r=0;r<e.length;r++)(t=e[r]).noOfChildren=t.getNoOfChildren()},a.prototype.calcGrid=function(t){for(var e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange)),n=new Array(e),i=0;i<e;i++)n[i]=new Array(r);for(i=0;i<e;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},a.prototype.addNodeToGrid=function(t,e,r){for(var n=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),i=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-r)/this.repulsionRange)),o=n;o<=i;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(t),t.setGridCoordinates(n,i,a,s)},a.prototype.updateGrid=function(){var t,e,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<r.length;t++)e=r[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(t,e,r,n){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var i=new Set;t.surrounding=new Array;for(var a=this.grid,s=t.startX-1;s<t.finishX+2;s++)for(var o=t.startY-1;o<t.finishY+2;o++)if(!(s<0||o<0||s>=a.length||o>=a[0].length))for(var l=0;l<a[s][o].length;l++){var c,h,u=a[s][o][l];t.getOwner()!=u.getOwner()||t==u||e.has(u)||i.has(u)||(c=Math.abs(t.getCenterX()-u.getCenterX())-(t.getWidth()/2+u.getWidth()/2),h=Math.abs(t.getCenterY()-u.getCenterY())-(t.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=this.repulsionRange&&i.add(u))}t.surrounding=[].concat(d(i))}for(s=0;s<t.surrounding.length;s++)this.calcRepulsionForce(t,t.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},t.exports=a},function(t,e,r){var n,i=r(1),a=r(4);function s(t,e,r){i.call(this,t,e,r),this.idealLength=a.DEFAULT_EDGE_LENGTH,this.edgeElasticity=a.DEFAULT_SPRING_STRENGTH}for(n in me(s,"FDLayoutEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];t.exports=s},function(t,e,r){var n,i=r(3),a=r(4);function s(t,e,r,n){i.call(this,t,e,r,n),this.nodeRepulsion=a.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(n in me(s,"FDLayoutNode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.setGridCoordinates=function(t,e,r,n){this.startX=t,this.finishX=e,this.startY=r,this.finishY=n},t.exports=s},function(t,e,r){function n(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}me(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},t.exports=n},function(t,e,r){var n=r(14);function i(){this.map={},this.keys=[]}me(i,"HashMap"),i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),null!=this.map[t]},i.prototype.get=function(t){return t=n.createID(t),this.map[t]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){var n=r(14);function i(){this.set={}}me(i,"HashSet"),i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,n=0;n<r;n++)t.push(this.set[e[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var n=t[r];this.add(n)}},t.exports=i},function(t,e,r){function n(){}me(n,"Matrix"),n.multMat=function(t,e){for(var r=[],n=0;n<t.length;n++){r[n]=[];for(var i=0;i<e[0].length;i++)for(var a=r[n][i]=0;a<t[0].length;a++)r[n][i]+=t[n][a]*e[a][i]}return r},n.transpose=function(t){for(var e=[],r=0;r<t[0].length;r++){e[r]=[];for(var n=0;n<t.length;n++)e[r][n]=t[n][r]}return e},n.multCons=function(t,e){for(var r=[],n=0;n<t.length;n++)r[n]=t[n]*e;return r},n.minusOp=function(t,e){for(var r=[],n=0;n<t.length;n++)r[n]=t[n]-e[n];return r},n.dotProduct=function(t,e){for(var r=0,n=0;n<t.length;n++)r+=t[n]*e[n];return r},n.mag=function(t){return Math.sqrt(this.dotProduct(t,t))},n.normalize=function(t){for(var e=[],r=this.mag(t),n=0;n<t.length;n++)e[n]=t[n]/r;return e},n.multGamma=function(t){for(var e=[],r=0,n=0;n<t.length;n++)r+=t[n];r*=-1/t.length;for(var i=0;i<t.length;i++)e[i]=r+t[i];return e},n.multL=function(t,e,r){for(var n=[],i=[],a=[],s=0;s<e[0].length;s++){for(var o=0,l=0;l<e.length;l++)o+=-.5*e[l][s]*t[l];i[s]=o}for(var c=0;c<r.length;c++){for(var h=0,u=0;u<r.length;u++)h+=r[c][u]*i[u];a[c]=h}for(var d=0;d<e.length;d++){for(var p=0,g=0;g<e[0].length;g++)p+=e[d][g]*a[g];n[d]=p}return n},t.exports=n},function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(n,"defineProperties"),me(i,"_classCallCheck");var a,s,o=r(11),r=(me(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:me(function(t,e,r){var n;e<r&&(n=this._partition(t,e,r),this._quicksort(t,e,n),this._quicksort(t,n+1,r))},"_quicksort")},{key:"_partition",value:me(function(t,e,r){for(var n=this._get(t,e),i=e,a=r;;){for(;this.compareFunction(n,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,i),n);)i++;if(!(i<a))return a;this._swap(t,i,a),i++,a--}},"_partition")},{key:"_get",value:me(function(t,e){return t instanceof o?t.get_object_at(e):t[e]},"_get")},{key:"_set",value:me(function(t,e,r){t instanceof o?t.set_object_at(e,r):t[e]=r},"_set")},{key:"_swap",value:me(function(t,e,r){var n=this._get(t,e);this._set(t,e,this._get(t,r)),this._set(t,r,n)},"_swap")},{key:"_defaultCompareFunction",value:me(function(t,e){return t<e},"_defaultCompareFunction")}],n(a.prototype,s),l);function l(t,e){i(this,l),null===e&&void 0===e||(this.compareFunction=this._defaultCompareFunction),e=void 0,e=t instanceof o?t.size():t.length,this._quicksort(t,0,e-1)}t.exports=r},function(t,e,r){function At(){}me(At,"SVD"),At.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e,P=Math.min(this.m,this.n);this.s=(t=>{for(var e=[];0<t--;)e.push(0);return e})(Math.min(this.m+1,this.n)),this.U=(e=[this.m,P],me(function t(e){if(0==e.length)return 0;for(var r=[],n=0;n<e[0];n++)r.push(t(e.slice(1)));return r},"allocate")(e)),this.V=(e=[this.n,this.n],me(function t(e){if(0==e.length)return 0;for(var r=[],n=0;n<e[0];n++)r.push(t(e.slice(1)));return r},"allocate")(e));for(var B,$,F,r=(t=>{for(var e=[];0<t--;)e.push(0);return e})(this.n),z=(t=>{for(var e=[];0<t--;)e.push(0);return e})(this.m),n=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(n,i);a++){if(a<n){this.s[a]=0;for(var G=a;G<this.m;G++)this.s[a]=At.hypot(this.s[a],t[G][a]);if(0!==this.s[a]){t[a][a]<0&&(this.s[a]=-this.s[a]);for(var U=a;U<this.m;U++)t[U][a]/=this.s[a];t[a][a]+=1}this.s[a]=-this.s[a]}for(var s=a+1;s<this.n;s++){if(F=0!==this.s[a],a<n&&F){for(var q=0,j=a;j<this.m;j++)q+=t[j][a]*t[j][s];for(var q=-q/t[a][a],W=a;W<this.m;W++)t[W][s]+=q*t[W][a]}r[s]=t[a][s]}if(a<n)for(var Y=a;Y<this.m;Y++)this.U[Y][a]=t[Y][a];if(a<i){r[a]=0;for(var H=a+1;H<this.n;H++)r[a]=At.hypot(r[a],r[H]);if(0!==r[a]){r[a+1]<0&&(r[a]=-r[a]);for(var V=a+1;V<this.n;V++)r[V]/=r[a];r[a+1]+=1}if(r[a]=-r[a],B=a+1<this.m,$=0!==r[a],B&&$){for(var X=a+1;X<this.m;X++)z[X]=0;for(var K=a+1;K<this.n;K++)for(var Z=a+1;Z<this.m;Z++)z[Z]+=r[K]*t[Z][K];for(var Q=a+1;Q<this.n;Q++)for(var J=-r[Q]/r[a+1],tt=a+1;tt<this.m;tt++)t[tt][Q]+=J*z[tt]}for(var et=a+1;et<this.n;et++)this.V[et][a]=r[et]}}var o=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=t[n][n]),this.m<o&&(this.s[o-1]=0),i+1<o&&(r[i]=t[i][o-1]),r[o-1]=0;for(var l=n;l<P;l++){for(var rt=0;rt<this.m;rt++)this.U[rt][l]=0;this.U[l][l]=1}for(var c=n-1;0<=c;c--)if(0!==this.s[c]){for(var nt=c+1;nt<P;nt++){for(var it=0,at=c;at<this.m;at++)it+=this.U[at][c]*this.U[at][nt];for(var it=-it/this.U[c][c],st=c;st<this.m;st++)this.U[st][nt]+=it*this.U[st][c]}for(var ot=c;ot<this.m;ot++)this.U[ot][c]=-this.U[ot][c];this.U[c][c]=1+this.U[c][c];for(var lt=0;lt<c-1;lt++)this.U[lt][c]=0}else{for(var ct=0;ct<this.m;ct++)this.U[ct][c]=0;this.U[c][c]=1}for(var ht,h=this.n-1;0<=h;h--){if(ht=0!==r[h],h<i&&ht)for(var ut=h+1;ut<P;ut++){for(var dt=0,pt=h+1;pt<this.n;pt++)dt+=this.V[pt][h]*this.V[pt][ut];for(var dt=-dt/this.V[h+1][h],gt=h+1;gt<this.n;gt++)this.V[gt][ut]+=dt*this.V[gt][h]}for(var ft=0;ft<this.n;ft++)this.V[ft][h]=0;this.V[h][h]=1}for(var mt=o-1,yt=Math.pow(2,-52),vt=Math.pow(2,-966);0<o;){for(var u=void 0,d=void 0,u=o-2;-1<=u&&-1!==u;u--)if(Math.abs(r[u])<=vt+yt*(Math.abs(this.s[u])+Math.abs(this.s[u+1]))){r[u]=0;break}if(u===o-2)d=4;else{for(var p=void 0,p=o-1;u<=p&&p!==u;p--){var xt=(p!==o?Math.abs(r[p]):0)+(p!==u+1?Math.abs(r[p-1]):0);if(Math.abs(this.s[p])<=vt+yt*xt){this.s[p]=0;break}}p===u?d=3:p===o-1?d=1:(d=2,u=p)}switch(u++,d){case 1:var bt=r[o-2];r[o-2]=0;for(var g=o-2;u<=g;g--){var f=At.hypot(this.s[g],bt),wt=this.s[g]/f,kt=bt/f;this.s[g]=f,g!==u&&(bt=-kt*r[g-1],r[g-1]=wt*r[g-1]);for(var m=0;m<this.n;m++)f=wt*this.V[m][g]+kt*this.V[m][o-1],this.V[m][o-1]=-kt*this.V[m][g]+wt*this.V[m][o-1],this.V[m][g]=f}break;case 2:var Tt=r[u-1];r[u-1]=0;for(var y=u;y<o;y++){var v=At.hypot(this.s[y],Tt),Et=this.s[y]/v,Ct=Tt/v;this.s[y]=v,Tt=-Ct*r[y],r[y]=Et*r[y];for(var x=0;x<this.m;x++)v=Et*this.U[x][y]+Ct*this.U[x][u-1],this.U[x][u-1]=-Ct*this.U[x][y]+Et*this.U[x][u-1],this.U[x][y]=v}break;case 3:var b=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[o-1]),Math.abs(this.s[o-2])),Math.abs(r[o-2])),Math.abs(this.s[u])),Math.abs(r[u])),w=this.s[o-1]/b,k=this.s[o-2]/b,T=r[o-2]/b,St=this.s[u]/b,b=r[u]/b,k=((k+w)*(k-w)+T*T)/2,T=w*T*(w*T),E=0;0==k&&0==T||(E=Math.sqrt(k*k+T),E=T/(k+(k<0?-E:E)));for(var C=(St+w)*(St-w)+E,S=St*b,_=u;_<o-1;_++){var A=At.hypot(C,S),L=C/A,N=S/A;_!==u&&(r[_-1]=A),C=L*this.s[_]+N*r[_],r[_]=L*r[_]-N*this.s[_],S=N*this.s[_+1],this.s[_+1]=L*this.s[_+1];for(var I=0;I<this.n;I++)A=L*this.V[I][_]+N*this.V[I][_+1],this.V[I][_+1]=-N*this.V[I][_]+L*this.V[I][_+1],this.V[I][_]=A;if(L=C/(A=At.hypot(C,S)),N=S/A,this.s[_]=A,C=L*r[_]+N*this.s[_+1],this.s[_+1]=-N*r[_]+L*this.s[_+1],S=N*r[_+1],r[_+1]=L*r[_+1],_<this.m-1)for(var R=0;R<this.m;R++)A=L*this.U[R][_]+N*this.U[R][_+1],this.U[R][_+1]=-N*this.U[R][_]+L*this.U[R][_+1],this.U[R][_]=A}r[o-2]=C;break;case 4:if(this.s[u]<=0&&(this.s[u]=this.s[u]<0?-this.s[u]:0,1))for(var _t=0;_t<=mt;_t++)this.V[_t][u]=-this.V[_t][u];for(;u<mt&&!(this.s[u]>=this.s[u+1]);){var M=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=M,u<this.n-1)for(var D=0;D<this.n;D++)M=this.V[D][u+1],this.V[D][u+1]=this.V[D][u],this.V[D][u]=M;if(u<this.m-1)for(var O=0;O<this.m;O++)M=this.U[O][u+1],this.U[O][u+1]=this.U[O][u],this.U[O][u]=M;u++}o--}}return{U:this.U,V:this.V,S:this.s}},At.hypot=function(t,e){var r=void 0;return Math.abs(t)>Math.abs(e)?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0!=e?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0},t.exports=At},function(t,e,r){var n,i;function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;c(this,h),this.sequence1=t,this.sequence2=e,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=i,this.iMax=t.length+1,this.jMax=e.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[a][s]=0}this.tracebackGrid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.tracebackGrid[o]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[o][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}me(a,"defineProperties"),me(c,"_classCallCheck"),me(h,"NeedlemanWunsch"),n=h,i=[{key:"getScore",value:me(function(){return this.score},"getScore")},{key:"getAlignments",value:me(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:me(function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:me(function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],r=this.tracebackGrid[e.pos[0]][e.pos[1]];r[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),r[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),r[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:me(function(t,e){for(var r=[],n=-1;-1!==(n=t.indexOf(e,n+1));)r.push(n);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:me(function(t){return this.getAllIndexes(t,Math.max.apply(null,t))},"arrayAllMaxIndexes")}],a(n.prototype,i),t.exports=h},function(t,e,r){var n=me(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(4),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(5),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(25),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(6),n.LEdge=r(1),n.LGraphManager=r(7),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(27),n.Matrix=r(24),n.SVD=r(26),t.exports=n},function(t,e,r){function n(){this.listeners=[]}me(n,"Emitter");var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;0<=r;r--){var n=this.listeners[r];n.event===t&&n.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];t===n.event&&n.callback(e)}},t.exports=n}],i={},me(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?me(function(){return t.default},"getDefault"):me(function(){return t},"getModuleExports");return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=28);function n(t){var e;return(i[t]||(e=i[t]={i:t,l:!1,exports:{}},r[t].call(e.exports,e,e.exports,n),e.l=!0,e)).exports}var r,i})}),cBt=WBt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(lBt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(lBt()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={45:(t,e,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),t.exports=n},806:(t,e,r)=>{var n,i=r(551).FDLayoutConstants;function a(){}for(n in me(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,t.exports=a},767:(t,e,r)=>{var n,i=r(551).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},880:(t,e,r)=>{var n,i=r(551).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},578:(t,e,r)=>{var n,i=r(551).LGraphManager;function a(t){i.call(this,t)}for(n in me(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},765:(t,e,r)=>{var n,i=r(551).FDLayout,a=r(578),s=r(880),h=r(991),o=r(767),f=r(806),l=r(902),m=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,c=r(551).DimensionD,g=r(551).Layout,y=r(551).Integer,v=r(551).IGeometry,x=r(551).LGraph,b=r(551).Transform,w=r(551).LinkedList;function k(){i.call(this),this.toBeTiled={},this.constraints={}}for(n in me(k,"CoSELayout"),k.prototype=Object.create(i.prototype),i)k[n]=i[n];k.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},k.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},k.prototype.newNode=function(t){return new h(this.graphManager,t)},k.prototype.newEdge=function(t){return new o(null,null,t)},k.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(f.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=f.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},k.prototype.initSpringEmbedder=function(){i.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},k.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},k.prototype.classicLayout=function(){var t,e,r;return this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental?f.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(t=this.getFlatForest()).length?this.positionNodesRadially(t):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),0<Object.keys(this.constraints).length&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),f.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},k.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}var e;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),f.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),f.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var t=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(t,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},k.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r<t.length;r++){var n=t[r].rect,i=t[r].id;e[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return e},k.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===m.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},k.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].calculateDisplacement();for(0<Object.keys(this.constraints).length&&this.updateDisplacements(),e=0;e<t.length;e++)t[e].move()},k.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var t=this.graphManager.getAllNodes(),e=0;e<t.length;e++){var r=t[e];this.idToNodeMap.set(r.id,r)}var n=me(function t(e){for(var r,n=e.getChild().getNodes(),i=0,a=0;a<n.length;a++)null==(r=n[a]).getChild()?s.fixedNodeSet.has(r.id)&&(i+=100):i+=t(r);return i},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(t){s.fixedNodeSet.add(t.nodeId)});for(var i,t=this.graphManager.getAllNodes(),e=0;e<t.length;e++)null!=(r=t[e]).getChild()&&0<(i=n(r))&&(r.fixedNodeWeight=i)}if(this.constraints.relativePlacementConstraint){var a,o,l,c,h=new Map,u=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){s.fixedNodesOnHorizontal.add(t),s.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var d=this.constraints.alignmentConstraint.vertical,e=0;e<d.length;e++)this.dummyToNodeForVerticalAlignment.set("dummy"+e,[]),d[e].forEach(function(t){h.set(t,"dummy"+e),s.dummyToNodeForVerticalAlignment.get("dummy"+e).push(t),s.fixedNodeSet.has(t)&&s.fixedNodesOnHorizontal.add("dummy"+e)});if(this.constraints.alignmentConstraint.horizontal)for(var p=this.constraints.alignmentConstraint.horizontal,e=0;e<p.length;e++)this.dummyToNodeForHorizontalAlignment.set("dummy"+e,[]),p[e].forEach(function(t){u.set(t,"dummy"+e),s.dummyToNodeForHorizontalAlignment.get("dummy"+e).push(t),s.fixedNodeSet.has(t)&&s.fixedNodesOnVertical.add("dummy"+e)})}f.RELAX_MOVEMENT_ON_CONSTRAINTS?(this.shuffle=function(t){for(var e,r,n=t.length-1;n>=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),r=t[n],t[n]=t[e],t[e]=r;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.right,s.nodesInRelativeHorizontal.includes(r)||(s.nodesInRelativeHorizontal.push(r),s.nodeToRelativeConstraintMapHorizontal.set(r,[]),s.dummyToNodeForVerticalAlignment.has(r)?s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(r).getCenterX())),s.nodesInRelativeHorizontal.includes(e)||(s.nodesInRelativeHorizontal.push(e),s.nodeToRelativeConstraintMapHorizontal.set(e,[]),s.dummyToNodeForVerticalAlignment.has(e)?s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(e)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(e).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:e,gap:t.gap}),s.nodeToRelativeConstraintMapHorizontal.get(e).push({left:r,gap:t.gap})):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,s.nodesInRelativeVertical.includes(e)||(s.nodesInRelativeVertical.push(e),s.nodeToRelativeConstraintMapVertical.set(e,[]),s.dummyToNodeForHorizontalAlignment.has(e)?s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(e).getCenterY())),s.nodesInRelativeVertical.includes(r)||(s.nodesInRelativeVertical.push(r),s.nodeToRelativeConstraintMapVertical.set(r,[]),s.dummyToNodeForHorizontalAlignment.has(r)?s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(r).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(e).push({bottom:r,gap:t.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:e,gap:t.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.right,a.has(r)?a.get(r).push(e):a.set(r,[e]),a.has(e)?a.get(e).push(r):a.set(e,[r])):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,o.has(e)?o.get(e).push(r):o.set(e,[r]),o.has(r)?o.get(r).push(e):o.set(r,[e]))}),c=(l=me(function(n,i){var a=[],s=[],o=new w,l=new Set,c=0;return n.forEach(function(t,e){if(!l.has(e)){for(a[c]=[],s[c]=!1,o.push(r=e),l.add(r),a[c].push(r);0!=o.length;){var r=o.shift();i.has(r)&&(s[c]=!0),n.get(r).forEach(function(t){l.has(t)||(o.push(t),l.add(t),a[c].push(t))})}c++}}),{components:a,isFixed:s}},"constructComponents"))(a,s.fixedNodesOnHorizontal),this.componentsOnHorizontal=c.components,this.fixedComponentsOnHorizontal=c.isFixed,c=l(o,s.fixedNodesOnVertical),this.componentsOnVertical=c.components,this.fixedComponentsOnVertical=c.isFixed)}},k.prototype.updateDisplacements=function(){var i=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){(t=i.idToNodeMap.get(t.nodeId)).displacementX=0,t.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,e=0;e<t.length;e++){for(var r=0,n=0;n<t[e].length;n++){if(this.fixedNodeSet.has(t[e][n])){r=0;break}r+=this.idToNodeMap.get(t[e][n]).displacementX}for(var a=r/t[e].length,n=0;n<t[e].length;n++)this.idToNodeMap.get(t[e][n]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal)for(var s=this.constraints.alignmentConstraint.horizontal,e=0;e<s.length;e++){for(var o=0,n=0;n<s[e].length;n++){if(this.fixedNodeSet.has(s[e][n])){o=0;break}o+=this.idToNodeMap.get(s[e][n]).displacementY}for(var l=o/s[e].length,n=0;n<s[e].length;n++)this.idToNodeMap.get(s[e][n]).displacementY=l}}if(this.constraints.relativePlacementConstraint)if(f.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(r){var n;i.fixedNodesOnHorizontal.has(r)||(n=0,n=(i.dummyToNodeForVerticalAlignment.has(r)?i.idToNodeMap.get(i.dummyToNodeForVerticalAlignment.get(r)[0]):i.idToNodeMap.get(r)).displacementX,i.nodeToRelativeConstraintMapHorizontal.get(r).forEach(function(t){var e;t.right?(e=i.nodeToTempPositionMapHorizontal.get(t.right)-i.nodeToTempPositionMapHorizontal.get(r)-n)<t.gap&&(n-=t.gap-e):(e=i.nodeToTempPositionMapHorizontal.get(r)-i.nodeToTempPositionMapHorizontal.get(t.left)+n)<t.gap&&(n+=t.gap-e)}),i.nodeToTempPositionMapHorizontal.set(r,i.nodeToTempPositionMapHorizontal.get(r)+n),i.dummyToNodeForVerticalAlignment.has(r)?i.dummyToNodeForVerticalAlignment.get(r).forEach(function(t){i.idToNodeMap.get(t).displacementX=n}):i.idToNodeMap.get(r).displacementX=n)}),this.nodesInRelativeVertical.forEach(function(r){var n;i.fixedNodesOnHorizontal.has(r)||(n=0,n=(i.dummyToNodeForHorizontalAlignment.has(r)?i.idToNodeMap.get(i.dummyToNodeForHorizontalAlignment.get(r)[0]):i.idToNodeMap.get(r)).displacementY,i.nodeToRelativeConstraintMapVertical.get(r).forEach(function(t){var e;t.bottom?(e=i.nodeToTempPositionMapVertical.get(t.bottom)-i.nodeToTempPositionMapVertical.get(r)-n)<t.gap&&(n-=t.gap-e):(e=i.nodeToTempPositionMapVertical.get(r)-i.nodeToTempPositionMapVertical.get(t.top)+n)<t.gap&&(n+=t.gap-e)}),i.nodeToTempPositionMapVertical.set(r,i.nodeToTempPositionMapVertical.get(r)+n),i.dummyToNodeForHorizontalAlignment.has(r)?i.dummyToNodeForHorizontalAlignment.get(r).forEach(function(t){i.idToNodeMap.get(t).displacementY=n}):i.idToNodeMap.get(r).displacementY=n)});else{for(e=0;e<this.componentsOnHorizontal.length;e++){var c=this.componentsOnHorizontal[e];if(this.fixedComponentsOnHorizontal[e])for(n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?this.dummyToNodeForVerticalAlignment.get(c[n]).forEach(function(t){i.idToNodeMap.get(t).displacementX=0}):this.idToNodeMap.get(c[n]).displacementX=0;else{for(var h=0,u=0,n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?(h+=(p=this.dummyToNodeForVerticalAlignment.get(c[n])).length*this.idToNodeMap.get(p[0]).displacementX,u+=p.length):(h+=this.idToNodeMap.get(c[n]).displacementX,u++);for(var d=h/u,n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?this.dummyToNodeForVerticalAlignment.get(c[n]).forEach(function(t){i.idToNodeMap.get(t).displacementX=d}):this.idToNodeMap.get(c[n]).displacementX=d}}for(e=0;e<this.componentsOnVertical.length;e++)if(c=this.componentsOnVertical[e],this.fixedComponentsOnVertical[e])for(n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?this.dummyToNodeForHorizontalAlignment.get(c[n]).forEach(function(t){i.idToNodeMap.get(t).displacementY=0}):this.idToNodeMap.get(c[n]).displacementY=0;else{for(var p,h=0,u=0,n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?(h+=(p=this.dummyToNodeForHorizontalAlignment.get(c[n])).length*this.idToNodeMap.get(p[0]).displacementY,u+=p.length):(h+=this.idToNodeMap.get(c[n]).displacementY,u++);for(d=h/u,n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?this.dummyToNodeForHorizontalAlignment.get(c[n]).forEach(function(t){i.idToNodeMap.get(t).displacementY=d}):this.idToNodeMap.get(c[n]).displacementY=d}}},k.prototype.calculateNodesToApplyGravitationTo=function(){for(var t,e=[],r=this.graphManager.getGraphs(),n=r.length,i=0;i<n;i++)(t=r[i]).updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},k.prototype.createBendpoints=function(){for(var t=(t=[]).concat(this.graphManager.getAllEdges()),e=new Set,r=0;r<t.length;r++){var n=t[r];if(!e.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new p),n.getBendpoints().push(new p),this.createDummyNodesForBendpoints(n),e.add(n);else{var s=(s=(s=[]).concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i));if(!e.has(s[0])){if(1<s.length)for(var o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}s.forEach(function(t){e.add(t)})}}}if(e.size==t.length)break}},k.prototype.positionNodesRadially=function(t){for(var e=new d(0,0),r=Math.ceil(Math.sqrt(t.length)),n=0,i=0,a=0,s=new p(0,0),o=0;o<t.length;o++){o%r==0&&(i=n,(a=0)!=o&&(i+=f.DEFAULT_COMPONENT_SEPERATION),n=0);var l=t[o],c=g.findCenterOfTree(l);e.x=a,e.y=i,(s=k.radialLayout(l,c,e)).y>n&&(n=Math.floor(s.y)),a=Math.floor(s.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},k.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),f.DEFAULT_RADIAL_SEPARATION),e=(k.branchRadialLayout(e,null,0,359,0,n),x.calculateBounds(t)),i=new b;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;a<t.length;a++)t[a].transform(i);return n=new p(e.getMaxX(),e.getMaxY()),i.inverseTransformPoint(n)},k.branchRadialLayout=function(t,e,r,n,i,a){(s=(n-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),i*Math.cos(s)),s=i*Math.sin(s),l=(t.setCenter(o,s),[]),c=(l=l.concat(t.getEdges())).length;null!=e&&c--;for(var h=0,u=l.length,d=t.getEdgesBetween(e);1<d.length;){var p=d[0];d.splice(0,1),0<=(p=l.indexOf(p))&&l.splice(p,1),u--,c--}for(var o=null!=e?(l.indexOf(d[0])+1)%u:0,g=Math.abs(n-r)/c,f=o;h!=c;f=++f%u){var m=l[f].getOtherEnd(t);m!=e&&(k.branchRadialLayout(m,t,m=(r+h*g)%360,(m+g)%360,i+a,a),h++)}},k.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,r=0;r<t.length;r++){var n=t[r].getDiagonal();e<n&&(e=n)}return e},k.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},k.prototype.groupZeroDegreeMembers=function(){var l=this,c={};this.memberGroups={},this.idToDummyNode={};for(var t=[],e=this.graphManager.getAllNodes(),r=0;r<e.length;r++){var n=(i=e[r]).getParent();0!==this.getNodeDegreeWithChildren(i)||null!=n.id&&this.getToBeTiled(n)||t.push(i)}for(r=0;r<t.length;r++){var i,a=(i=t[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(i)}Object.keys(c).forEach(function(t){if(1<c[t].length){var e="DummyCompound_"+t,r=(l.memberGroups[e]=c[t],c[t][0].getParent()),n=new h(l.graphManager),i=(n.id=e,n.paddingLeft=r.paddingLeft||0,n.paddingRight=r.paddingRight||0,n.paddingBottom=r.paddingBottom||0,n.paddingTop=r.paddingTop||0,l.idToDummyNode[e]=n,l.getGraphManager().add(l.newGraph(),n)),a=r.getChild();a.add(n);for(var s=0;s<c[t].length;s++){var o=c[t][s];a.remove(o),i.add(o)}}})},k.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)e[this.compoundOrder[r].id]=this.compoundOrder[r],t[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},k.prototype.clearZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(t){var e,r=n.idToDummyNode[t];i[t]=n.tileNodes(n.memberGroups[t],r.paddingLeft+r.paddingRight),r.rect.width=i[t].width,r.rect.height=i[t].height,r.setCenter(i[t].centerX,i[t].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(t=r.rect.width,e=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(t+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>t?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(t){var e=n.idToDummyNode[t],r=e.paddingLeft;n.adjustLocations(i[t],e.rect.x,e.rect.y,r,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)})},k.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),n=0;n<r.length;n++){var i=r[n];if(0<this.getNodeDegree(i))return this.toBeTiled[e]=!1;if(null==i.getChild())this.toBeTiled[i.id]=!1;else if(!this.getToBeTiled(i))return this.toBeTiled[e]=!1}return this.toBeTiled[e]=!0},k.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,n=0;n<e.length;n++){var i=e[n];i.getSource().id!==i.getTarget().id&&(r+=1)}return r},k.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null!=t.getChild())for(var r=t.getChild().getNodes(),n=0;n<r.length;n++){var i=r[n];e+=this.getNodeDegreeWithChildren(i)}return e},k.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},k.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var r=t[e];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},k.prototype.adjustLocations=function(t,e,r,n,i,a,s){r+=i+s;for(var o=e+=n+a,l=0;l<t.rows.length;l++){var c=t.rows[l];e=o;for(var h=0,u=0;u<c.length;u++){var d=c[u];d.rect.x=e,d.rect.y=r,e+=d.rect.width+t.horizontalPadding,d.rect.height>h&&(h=d.rect.height)}r+=h+t.verticalPadding}},k.prototype.tileCompoundMembers=function(n,i){var a=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(t){var e,r=i[t];a.tiledMemberPack[t]=a.tileNodes(n[t],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[t].width,r.rect.height=a.tiledMemberPack[t].height,r.setCenter(a.tiledMemberPack[t].centerX,a.tiledMemberPack[t].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(t=r.rect.width,e=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(t+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>t?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.tileNodes=function(t,e){var r=this.tileNodesByFavoringDim(t,e,!0),t=this.tileNodesByFavoringDim(t,e,!1),e=this.getOrgRatio(r);return this.getOrgRatio(t)<e?t:r},k.prototype.getOrgRatio=function(t){return(t=t.width/t.height)<1?1/t:t},k.prototype.calcIdealRowWidth=function(t,e){var r,n=f.TILING_PADDING_VERTICAL,i=f.TILING_PADDING_HORIZONTAL,a=t.length,s=0,o=0,l=0,t=(t.forEach(function(t){s+=t.getWidth(),o+=t.getHeight(),t.getWidth()>l&&(l=t.getWidth())}),s/a),c=o/a,c=Math.pow(n-i,2)+4*(t+i)*(c+n)*a,a=(i-n+Math.sqrt(c))/(2*(t+i));return e?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((n=r*(t+i)-i)<l?l:n)+2*i},k.prototype.tileNodesByFavoringDim=function(t,e,r){var n=f.TILING_PADDING_VERTICAL,i=f.TILING_PADDING_HORIZONTAL,a=f.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:n,horizontalPadding:i,centerX:0,centerY:0},o=(a&&(s.idealRowWidth=this.calcIdealRowWidth(t,r)),me(function(t){return t.rect.width*t.rect.height},"getNodeArea")),l=me(function(t,e){return o(e)-o(t)},"areaCompareFcn");t.sort(function(t,e){var r=l;return s.idealRowWidth?(r=a)(t.id,e.id):r(t,e)});for(var c=0,h=0,u=0;u<t.length;u++)c+=(p=t[u]).getCenterX(),h+=p.getCenterY();for(s.centerX=c/t.length,s.centerY=h/t.length,u=0;u<t.length;u++){var d,p=t[u];0==s.rows.length?this.insertNodeToRow(s,p,0,e):this.canAddHorizontal(s,p.rect.width,p.rect.height)?(d=s.rows.length-1,s.idealRowWidth||(d=this.getShortestRowIndex(s)),this.insertNodeToRow(s,p,d,e)):this.insertNodeToRow(s,p,s.rows.length,e),this.shiftToLastRow(s)}return s},k.prototype.insertNodeToRow=function(t,e,r,n){r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(n),t.rowHeight.push(0));var n=t.rowWidth[r]+e.rect.width,n=(0<t.rows[r].length&&(n+=t.horizontalPadding),t.rowWidth[r]=n,t.width<n&&(t.width=n),e.rect.height),i=(0<r&&(n+=t.verticalPadding),0);n>t.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},k.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]<r&&(e=n,r=t.rowWidth[n]);return e},k.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]>r&&(e=n,r=t.rowWidth[n]);return e},k.prototype.canAddHorizontal=function(t,e,r){var n,i,a;return t.idealRowWidth?(i=t.rows.length-1,t.rowWidth[i]+e+t.horizontalPadding<=t.idealRowWidth):(i=this.getShortestRowIndex(t))<0||(a=t.rowWidth[i])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[i]<r&&0<i&&(n=r+t.verticalPadding-t.rowHeight[i]),i=e+t.horizontalPadding<=t.width-a?(t.height+n)/(a+e+t.horizontalPadding):(t.height+n)/t.width,n=r+t.verticalPadding,(i=i<1?1/i:i)<((a=t.width<e?(t.height+n)/e:(t.height+n)/t.width)<1?1/a:a))},k.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,n=t.rows[e],i=n[n.length-1],a=i.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;o<n.length;o++)n[o].height>s&&(s=n[o].height);0<e&&(s+=t.verticalPadding),a=t.rowHeight[e]+t.rowHeight[r],t.rowHeight[e]=s,t.rowHeight[r]<i.height+t.verticalPadding&&(t.rowHeight[r]=i.height+t.verticalPadding),i=t.rowHeight[e]+t.rowHeight[r],t.height+=i-a,this.shiftToLastRow(t)}},k.prototype.tilingPreLayout=function(){f.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},k.prototype.tilingPostLayout=function(){f.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},k.prototype.reduceTrees=function(){for(var t=[],e=!0;e;){for(var r,n,i=this.graphManager.getAllNodes(),a=[],e=!1,s=0;s<i.length;s++)1!=(n=i[s]).getEdges().length||n.getEdges()[0].isInterGraph||null!=n.getChild()||(f.PURE_INCREMENTAL?(r=n.getEdges()[0].getOtherEnd(n),r=new c(n.getCenterX()-r.getCenterX(),n.getCenterY()-r.getCenterY()),a.push([n,n.getEdges()[0],n.getOwner(),r])):a.push([n,n.getEdges()[0],n.getOwner()]),e=!0);if(1==e){for(var o=[],l=0;l<a.length;l++)1==a[l][0].getEdges().length&&(o.push(a[l]),a[l][0].getOwner().remove(a[l][0]));t.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},k.prototype.growTree=function(t){for(var e,r=t[t.length-1],n=0;n<r.length;n++)e=r[n],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},k.prototype.findPlaceforPrunedNode=function(t){var e=t[0],r=e==t[1].source?t[1].target:t[1].source;if(f.PURE_INCREMENTAL)e.setCenter(r.getCenterX()+t[3].getWidth(),r.getCenterY()+t[3].getHeight());else{var n=r.startX,i=r.finishX,a=r.startY,s=r.finishY,o=[0,0,0,0];if(0<a)for(var l=n;l<=i;l++)o[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(i<this.grid.length-1)for(l=a;l<=s;l++)o[1]+=this.grid[i+1][l].length+this.grid[i][l].length-1;if(s<this.grid[0].length-1)for(l=n;l<=i;l++)o[2]+=this.grid[l][s+1].length+this.grid[l][s].length-1;if(0<n)for(l=a;l<=s;l++)o[3]+=this.grid[n-1][l].length+this.grid[n][l].length-1;for(var c,h,u,d,p=y.MAX_VALUE,g=0;g<o.length;g++)o[g]<p?(p=o[g],c=1,h=g):o[g]==p&&c++;3==c&&0==p?0==o[0]&&0==o[1]&&0==o[2]?u=1:0==o[0]&&0==o[1]&&0==o[3]?u=0:0==o[0]&&0==o[2]&&0==o[3]?u=3:0==o[1]&&0==o[2]&&0==o[3]&&(u=2):u=2==c&&0==p?(d=Math.floor(2*Math.random()),0==o[0]&&0==o[1]?0==d?0:1:0==o[0]&&0==o[2]?0==d?0:2:0==o[0]&&0==o[3]?0==d?0:3:0==o[1]&&0==o[2]?0==d?1:2:0==o[1]&&0==o[3]?0==d?1:3:0==d?2:3):4==c&&0==p?d=Math.floor(4*Math.random()):h,0==u?e.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-m.DEFAULT_EDGE_LENGTH-e.getHeight()/2):1==u?e.setCenter(r.getCenterX()+r.getWidth()/2+m.DEFAULT_EDGE_LENGTH+e.getWidth()/2,r.getCenterY()):2==u?e.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+m.DEFAULT_EDGE_LENGTH+e.getHeight()/2):e.setCenter(r.getCenterX()-r.getWidth()/2-m.DEFAULT_EDGE_LENGTH-e.getWidth()/2,r.getCenterY())}},t.exports=k},991:(t,e,r)=>{var n,i=r(551).FDLayoutNode,a=r(551).IMath;function s(t,e,r,n){i.call(this,t,e,r,n)}for(n in me(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0<this.child.getNodes().length&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},s.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).getChild()?(r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},s.prototype.move=function(){var t=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.setPred1=function(t){this.pred1=t},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(t){this.next=t},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(t){this.processed=t},s.prototype.isProcessed=function(){return processed},t.exports=s},902:(t,e,r)=>{function Pt(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(Pt,"_toConsumableArray");var Bt=r(806),$t=r(551).LinkedList,Ft=r(551).Matrix,zt=r(551).SVD;function n(){}me(n,"ConstraintHandler"),n.handleConstraints=function(t){var e={};e.fixedNodeConstraint=t.constraints.fixedNodeConstraint,e.alignmentConstraint=t.constraints.alignmentConstraint,e.relativePlacementConstraint=t.constraints.relativePlacementConstraint;for(var r=new Map,k=new Map,T=[],E=[],n=t.getAllNodes(),P=0,i=0;i<n.length;i++){var a=n[i];null==a.getChild()&&(k.set(a.id,P++),T.push(a.getCenterX()),E.push(a.getCenterY()),r.set(a.id,a))}e.relativePlacementConstraint&&e.relativePlacementConstraint.forEach(function(t){t.gap||0==t.gap||(t.left?t.gap=Bt.DEFAULT_EDGE_LENGTH+r.get(t.left).getWidth()/2+r.get(t.right).getWidth()/2:t.gap=Bt.DEFAULT_EDGE_LENGTH+r.get(t.top).getHeight()/2+r.get(t.bottom).getHeight()/2)});var s,B=me(function(t,e){return{x:t.x-e.x,y:t.y-e.y}},"calculatePositionDiff"),o=me(function(t){var e=0,r=0;return t.forEach(function(t){e+=T[k.get(t)],r+=E[k.get(t)]}),{x:e/t.size,y:r/t.size}},"calculateAvgPosition"),t=me(function(t,x,h,b,e){function i(t,e){var r=new Set(t),n=!0,t=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var o=a.value;r.add(o)}}catch(e){t=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(t)throw i}}return r}me(i,"setUnion");var a=new Map,w=(t.forEach(function(t,e){a.set(e,0)}),t.forEach(function(t,e){t.forEach(function(t){a.set(t.id,a.get(t.id)+1)})}),new Map),s=new Map,o=new $t;a.forEach(function(t,e){0==t?(o.push(e),h||("horizontal"==x?w.set(e,k.has(e)?T[k.get(e)]:b.get(e)):w.set(e,k.has(e)?E[k.get(e)]:b.get(e)))):w.set(e,Number.NEGATIVE_INFINITY),h&&s.set(e,new Set([e]))}),h&&e.forEach(function(t){var e,r,n=[];t.forEach(function(t){h.has(t)&&n.push(t)}),0<n.length?(e=0,n.forEach(function(t){"horizontal"==x?w.set(t,k.has(t)?T[k.get(t)]:b.get(t)):w.set(t,k.has(t)?E[k.get(t)]:b.get(t)),e+=w.get(t)}),e/=n.length,t.forEach(function(t){h.has(t)||w.set(t,e)})):(r=0,t.forEach(function(t){r+="horizontal"==x?k.has(t)?T[k.get(t)]:b.get(t):k.has(t)?E[k.get(t)]:b.get(t)}),r/=t.length,t.forEach(function(t){w.set(t,r)}))});for(var u,d,r=me(function(){var n=o.shift();t.get(n).forEach(function(t){var e,r;w.get(t.id)<w.get(n)+t.gap&&(h&&h.has(t.id)?(r="horizontal"==x?k.has(t.id)?T[k.get(t.id)]:b.get(t.id):k.has(t.id)?E[k.get(t.id)]:b.get(t.id),w.set(t.id,r),r<w.get(n)+t.gap&&(e=w.get(n)+t.gap-r,s.get(n).forEach(function(t){w.set(t,w.get(t)-e)}))):w.set(t.id,w.get(n)+t.gap)),a.set(t.id,a.get(t.id)-1),0==a.get(t.id)&&o.push(t.id),h&&s.set(t.id,i(s.get(n),s.get(t.id)))})},"_loop");0!=o.length;)r();return h&&(u=new Set,t.forEach(function(t,e){0==t.length&&u.add(e)}),d=[],s.forEach(function(r,t){if(u.has(t)){var n,i,e=!1,a=!0,t=!1,s=void 0;try{for(var o,l=r[Symbol.iterator]();!(a=(o=l.next()).done);a=!0){var c=o.value;h.has(c)&&(e=!0)}}catch(e){t=!0,s=e}finally{try{!a&&l.return&&l.return()}finally{if(t)throw s}}e||(n=!1,i=void 0,d.forEach(function(t,e){t.has([].concat(Pt(r))[0])&&(n=!0,i=e)}),n?r.forEach(function(t){d[i].add(t)}):d.push(new Set(r)))}}),d.forEach(function(t,e){var r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=!0,o=!1,l=void 0;try{for(var c,h=t[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var u=c.value,d="horizontal"==x?k.has(u)?T[k.get(u)]:b.get(u):k.has(u)?E[k.get(u)]:b.get(u),p=w.get(u);d<r&&(r=d),i<d&&(i=d),p<n&&(n=p),a<p&&(a=p)}}catch(t){o=!0,l=t}finally{try{!s&&h.return&&h.return()}finally{if(o)throw l}}var g=(r+i)/2-(n+a)/2,f=!0,o=!1,l=void 0;try{for(var m,y=t[Symbol.iterator]();!(f=(m=y.next()).done);f=!0){var v=m.value;w.set(v,w.get(v)+g)}}catch(t){o=!0,l=t}finally{try{!f&&y.return&&y.return()}finally{if(o)throw l}}})),w},"findAppropriatePositionForRelativePlacement"),l=me(function(t){var e=0,r=0,n=0,i=0;if(t.forEach(function(t){t.left?0<=T[k.get(t.left)]-T[k.get(t.right)]?e++:r++:0<=E[k.get(t.top)]-E[k.get(t.bottom)]?n++:i++}),r<e&&i<n)for(var a=0;a<k.size;a++)T[a]=-1*T[a],E[a]=-1*E[a];else if(r<e)for(var s=0;s<k.size;s++)T[s]=-1*T[s];else if(i<n)for(var o=0;o<k.size;o++)E[o]=-1*E[o]},"applyReflectionForRelativePlacement"),$=me(function(n){var i=[],a=new $t,s=new Set,o=0;return n.forEach(function(t,e){if(!s.has(e)){for(i[o]=[],a.push(r=e),s.add(r),i[o].push(r);0!=a.length;){var r=a.shift();n.get(r).forEach(function(t){s.has(t.id)||(a.push(t.id),s.add(t.id),i[o].push(t.id))})}o++}}),i},"findComponents"),F=me(function(t){var r=new Map;return t.forEach(function(t,e){r.set(e,[])}),t.forEach(function(t,e){t.forEach(function(t){r.get(e).push(t),r.get(t.id).push({id:e,gap:t.gap,direction:t.direction})})}),r},"dagToUndirected"),z=me(function(t){var r=new Map;return t.forEach(function(t,e){r.set(e,[])}),t.forEach(function(t,e){t.forEach(function(t){r.get(t.id).push({id:e,gap:t.gap,direction:t.direction})})}),r},"dagToReversed"),c=[],h=[],u=!1,d=!1,p=new Set,g=new Map,f=new Map,m=[];if(e.fixedNodeConstraint&&e.fixedNodeConstraint.forEach(function(t){p.add(t.nodeId)}),e.relativePlacementConstraint&&(e.relativePlacementConstraint.forEach(function(t){t.left?(g.has(t.left)?g.get(t.left).push({id:t.right,gap:t.gap,direction:"horizontal"}):g.set(t.left,[{id:t.right,gap:t.gap,direction:"horizontal"}]),g.has(t.right)||g.set(t.right,[])):(g.has(t.top)?g.get(t.top).push({id:t.bottom,gap:t.gap,direction:"vertical"}):g.set(t.top,[{id:t.bottom,gap:t.gap,direction:"vertical"}]),g.has(t.bottom)||g.set(t.bottom,[]))}),m=$(f=F(g))),Bt.TRANSFORM_ON_CONSTRAINT_HANDLING){if(e.fixedNodeConstraint&&1<e.fixedNodeConstraint.length)e.fixedNodeConstraint.forEach(function(t,e){c[e]=[t.position.x,t.position.y],h[e]=[T[k.get(t.nodeId)],E[k.get(t.nodeId)]]}),u=!0;else if(e.alignmentConstraint){var y=0;if(e.alignmentConstraint.vertical){for(var G=e.alignmentConstraint.vertical,U=me(function(t){var e=new Set,r=(G[t].forEach(function(t){e.add(t)}),new Set([].concat(Pt(e)).filter(function(t){return p.has(t)}))),n=0<r.size?T[k.get(r.values().next().value)]:o(e).x;G[t].forEach(function(t){c[y]=[n,E[k.get(t)]],h[y]=[T[k.get(t)],E[k.get(t)]],y++})},"_loop2"),q=0;q<G.length;q++)U(q);u=!0}if(e.alignmentConstraint.horizontal){for(var j=e.alignmentConstraint.horizontal,W=me(function(t){var e=new Set,r=(j[t].forEach(function(t){e.add(t)}),new Set([].concat(Pt(e)).filter(function(t){return p.has(t)}))),n=0<r.size?T[k.get(r.values().next().value)]:o(e).y;j[t].forEach(function(t){c[y]=[T[k.get(t)],n],h[y]=[T[k.get(t)],E[k.get(t)]],y++})},"_loop3"),Y=0;Y<j.length;Y++)W(Y);u=!0}e.relativePlacementConstraint&&(d=!0)}else if(e.relativePlacementConstraint){for(var v,x,b,H,V,X=0,K=0,w=0;w<m.length;w++)m[w].length>X&&(X=m[w].length,K=w);X<f.size/2?(l(e.relativePlacementConstraint),d=u=!1):(v=new Map,x=new Map,b=[],m[K].forEach(function(e){g.get(e).forEach(function(t){"horizontal"==t.direction?(v.has(e)?v.get(e).push(t):v.set(e,[t]),v.has(t.id)||v.set(t.id,[]),b.push({left:e,right:t.id})):(x.has(e)?x.get(e).push(t):x.set(e,[t]),x.has(t.id)||x.set(t.id,[]),b.push({top:e,bottom:t.id}))})}),l(b),d=!1,H=t(v,"horizontal"),V=t(x,"vertical"),m[K].forEach(function(t,e){h[e]=[T[k.get(t)],E[k.get(t)]],c[e]=[],H.has(t)?c[e][0]=H.get(t):c[e][0]=T[k.get(t)],V.has(t)?c[e][1]=V.get(t):c[e][1]=E[k.get(t)]}),u=!0)}if(u){for(var C=Ft.transpose(c),Z=Ft.transpose(h),S=0;S<C.length;S++)C[S]=Ft.multGamma(C[S]),Z[S]=Ft.multGamma(Z[S]);for(var f=Ft.multMat(C,Ft.transpose(Z)),u=zt.svd(f),_=Ft.multMat(u.V,Ft.transpose(u.U)),A=0;A<k.size;A++){var Q=[T[A],E[A]],J=[_[0][0],_[1][0]],tt=[_[0][1],_[1][1]];T[A]=Ft.dotProduct(Q,J),E[A]=Ft.dotProduct(Q,tt)}d&&l(e.relativePlacementConstraint)}}if(Bt.ENFORCE_CONSTRAINTS){if(e.fixedNodeConstraint&&0<e.fixedNodeConstraint.length&&(s={x:0,y:0},e.fixedNodeConstraint.forEach(function(t,e){var r={x:T[k.get(t.nodeId)],y:E[k.get(t.nodeId)]},t=t.position,t=B(t,r);s.x+=t.x,s.y+=t.y}),s.x/=e.fixedNodeConstraint.length,s.y/=e.fixedNodeConstraint.length,T.forEach(function(t,e){T[e]+=s.x}),E.forEach(function(t,e){E[e]+=s.y}),e.fixedNodeConstraint.forEach(function(t){T[k.get(t.nodeId)]=t.position.x,E[k.get(t.nodeId)]=t.position.y})),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var et=e.alignmentConstraint.vertical,rt=me(function(t){var e=new Set,r=(et[t].forEach(function(t){e.add(t)}),0<(t=new Set([].concat(Pt(e)).filter(function(t){return p.has(t)}))).size?T[k.get(t.values().next().value)]:o(e).x);e.forEach(function(t){p.has(t)||(T[k.get(t)]=r)})},"_loop4"),nt=0;nt<et.length;nt++)rt(nt);if(e.alignmentConstraint.horizontal)for(var it=e.alignmentConstraint.horizontal,at=me(function(t){var e=new Set,r=(it[t].forEach(function(t){e.add(t)}),0<(t=new Set([].concat(Pt(e)).filter(function(t){return p.has(t)}))).size?E[k.get(t.values().next().value)]:o(e).y);e.forEach(function(t){p.has(t)||(E[k.get(t)]=r)})},"_loop5"),st=0;st<it.length;st++)at(st)}if(e.relativePlacementConstraint){var L=new Map,N=new Map,I=new Map,R=new Map,ot=new Map,lt=new Map,ct=new Set,ht=new Set;if(p.forEach(function(t){ct.add(t),ht.add(t)}),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var ut=e.alignmentConstraint.vertical,dt=me(function(e){I.set("dummy"+e,[]),ut[e].forEach(function(t){L.set(t,"dummy"+e),I.get("dummy"+e).push(t),p.has(t)&&ct.add("dummy"+e)}),ot.set("dummy"+e,T[k.get(ut[e][0])])},"_loop6"),pt=0;pt<ut.length;pt++)dt(pt);if(e.alignmentConstraint.horizontal)for(var gt=e.alignmentConstraint.horizontal,ft=me(function(e){R.set("dummy"+e,[]),gt[e].forEach(function(t){N.set(t,"dummy"+e),R.get("dummy"+e).push(t),p.has(t)&&ht.add("dummy"+e)}),lt.set("dummy"+e,E[k.get(gt[e][0])])},"_loop7"),mt=0;mt<gt.length;mt++)ft(mt)}var M=new Map,D=new Map,yt=me(function(n){g.get(n).forEach(function(t){var e=void 0,r=void 0;"horizontal"==t.direction?(e=L.get(n)?L.get(n):n,r=L.get(t.id)?{id:L.get(t.id),gap:t.gap,direction:t.direction}:t,M.has(e)?M.get(e).push(r):M.set(e,[r]),M.has(r.id)||M.set(r.id,[])):(e=N.get(n)?N.get(n):n,r=N.get(t.id)?{id:N.get(t.id),gap:t.gap,direction:t.direction}:t,D.has(e)?D.get(e).push(r):D.set(e,[r]),D.has(r.id)||D.set(r.id,[]))})},"_loop8"),vt=!0,f=!1,u=void 0;try{for(var xt,bt=g.keys()[Symbol.iterator]();!(vt=(xt=bt.next()).done);vt=!0)yt(xt.value)}catch(t){f=!0,u=t}finally{try{!vt&&bt.return&&bt.return()}finally{if(f)throw u}}var f=F(M),u=F(D),f=$(f),u=$(u),wt=z(M),kt=z(D),Tt=[],Et=[],Ct=(f.forEach(function(t,e){Tt[e]=[],t.forEach(function(t){0==wt.get(t).length&&Tt[e].push(t)})}),u.forEach(function(t,e){Et[e]=[],t.forEach(function(t){0==kt.get(t).length&&Et[e].push(t)})}),t(M,"horizontal",ct,ot,Tt)),St=t(D,"vertical",ht,lt,Et),_t=me(function(e){I.get(e)?I.get(e).forEach(function(t){T[k.get(t)]=Ct.get(e)}):T[k.get(e)]=Ct.get(e)},"_loop9"),At=!0,f=!1,u=void 0;try{for(var Lt,Nt=Ct.keys()[Symbol.iterator]();!(At=(Lt=Nt.next()).done);At=!0)_t(Lt.value)}catch(t){f=!0,u=t}finally{try{!At&&Nt.return&&Nt.return()}finally{if(f)throw u}}var It=me(function(e){R.get(e)?R.get(e).forEach(function(t){E[k.get(t)]=St.get(e)}):E[k.get(e)]=St.get(e)},"_loop10"),Rt=!0,f=!1,u=void 0;try{for(var Mt,Dt=St.keys()[Symbol.iterator]();!(Rt=(Mt=Dt.next()).done);Rt=!0)It(Mt.value)}catch(t){f=!0,u=t}finally{try{!Rt&&Dt.return&&Dt.return()}finally{if(f)throw u}}}}for(var Ot=0;Ot<n.length;Ot++){var O=n[Ot];null==O.getChild()&&O.setCenter(T[k.get(O.id)],E[k.get(O.id)])}},t.exports=n},551:t=>{t.exports=e}},i={},me(r,"__webpack_require__"),r(45);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),hBt=WBt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(cBt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeFcose=e(cBt()):t.cytoscapeFcose=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var t=arguments.length,e=Array(1<t?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return e.forEach(function(e){Object.keys(e).forEach(function(t){return r[t]=e[t]})}),r}},548:(t,e,r)=>{me(C,"sliceIterator");var n=r(140).layoutBase.LinkedList;function C(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}t.exports=r={getTopMostNodes:function(t){for(var n={},e=0;e<t.length;e++)n[t[e].id()]=!0;return t.filter(function(t,e){for(var r=(t="number"==typeof t?e:t).parent()[0];null!=r;){if(n[r.id()])return!1;r=r.parent()[0]}return!0})},connectComponents:function(a,s,o,t){for(var l=new n,c=new Set,h=[],u=void 0,d=void 0,p=void 0,g=!1,f=1,m=[],y=[],e=me(function(){var n=a.collection(),i=(y.push(n),o[0]),t=a.collection();t.merge(i).merge(i.descendants().intersection(s)),h.push(i),t.forEach(function(t){l.push(t),c.add(t),n.merge(t)});for(var e,r=me(function(){i=l.shift();var e=a.collection();i.neighborhood().nodes().forEach(function(t){0<s.intersection(i.edgesWith(t)).length&&e.merge(t)});for(var t=0;t<e.length;t++){var r=e[t];null==(u=o.intersection(r.union(r.ancestors())))||c.has(u[0])||u.union(u.descendants()).forEach(function(t){l.push(t),c.add(t),n.merge(t),o.has(t)&&h.push(t)})}},"_loop2");0!=l.length;)r();n.forEach(function(t){s.intersection(t.connectedEdges()).forEach(function(t){n.has(t.source())&&n.has(t.target())&&n.merge(t)})}),(!(g=h.length==o.length||g)||1<f)&&(d=h[0],p=d.connectedEdges().length,h.forEach(function(t){t.connectedEdges().length<p&&(p=t.connectedEdges().length,d=t)}),m.push(d.id()),(e=a.collection()).merge(h[0]),h.forEach(function(t){e.merge(t)}),h=[],o=o.difference(e),f++)},"_loop");e(),!g;);return t&&0<m.length&&t.set("dummy"+(t.size+1),m),y},relocateComponent:function(t,i,e){if(!e.fixedNodeConstraint){var a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if("draft"==e.quality){var r=!0,n=!1,c=void 0;try{for(var h,u=i.nodeIndexes[Symbol.iterator]();!(r=(h=u.next()).done);r=!0){var d,p,g,f,m,y=(t=>{if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return C(t,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],x=y[1],b=e.cy.getElementById(v);b&&(d=b.boundingBox(),p=i.xCoords[x]-d.w/2,g=i.xCoords[x]+d.w/2,f=i.yCoords[x]-d.h/2,m=i.yCoords[x]+d.h/2,p<a&&(a=p),s<g&&(s=g),f<o&&(o=f),l<m)&&(l=m)}}catch(t){n=!0,c=t}finally{try{!r&&u.return&&u.return()}finally{if(n)throw c}}var w=t.x-(s+a)/2,k=t.y-(l+o)/2;i.xCoords=i.xCoords.map(function(t){return t+w}),i.yCoords=i.yCoords.map(function(t){return t+k})}else{Object.keys(i).forEach(function(t){var e=(t=i[t]).getRect().x,r=t.getRect().x+t.getRect().width,n=t.getRect().y,t=t.getRect().y+t.getRect().height;e<a&&(a=e),s<r&&(s=r),n<o&&(o=n),l<t&&(l=t)});var T=t.x-(s+a)/2,E=t.y-(l+o)/2;Object.keys(i).forEach(function(t){(t=i[t]).setCenter(t.getCenterX()+T,t.getCenterY()+E)})}}},calcBoundingBox:function(t,e,r,n){for(var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,l=t.descendants().not(":parent"),c=l.length,h=0;h<c;h++){var u,d=l[h];(u=e[n.get(d.id())]-d.width()/2)<i&&(i=u),a<(u=e[n.get(d.id())]+d.width()/2)&&(a=u),(u=r[n.get(d.id())]-d.height()/2)<s&&(s=u),o<(u=r[n.get(d.id())]+d.height()/2)&&(o=u)}return(t={}).topLeftX=i,t.topLeftY=s,t.width=a-i,t.height=o-s,t},calcParentsWithoutChildren:function(t,e){var r=t.collection();return e.nodes(":parent").forEach(function(t){var e=!1;t.children().forEach(function(t){"none"!=t.css("display")&&(e=!0)}),e||r.merge(t)}),r}}},816:(t,e,r)=>{var v=r(548),o=r(140).CoSELayout,x=r(140).CoSENode,b=r(140).layoutBase.PointD,w=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,k=r(140).CoSEConstants,r=me(function(c,t){var e=c.cy,r=(i=c.eles).nodes(),n=i.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=t.nodeIndexes,p=t.xCoords,g=t.yCoords),me(function(t){return"function"==typeof t},"isFn")),m=me(function(t,e){return h(t)?t(e):t},"optFn"),y=v.calcParentsWithoutChildren(e,i),t=me(function t(e,r,n,i){for(var a=r.length,s=0;s<a;s++){var o,l=r[s],c=null,h=void(0==l.intersection(y).length&&(c=l.children())),u=l.layoutDimensions({nodeDimensionsIncludeLabels:i.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?i.randomize?l.isParent()?(o=v.calcBoundingBox(l,p,g,d),0==l.intersection(y).length?e.add(new x(n.graphManager,new b(o.topLeftX,o.topLeftY),new w(o.width,o.height))):e.add(new x(n.graphManager,new b(o.topLeftX,o.topLeftY),new w(parseFloat(u.w),parseFloat(u.h))))):e.add(new x(n.graphManager,new b(p[d.get(l.id())]-u.w/2,g[d.get(l.id())]-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):e.add(new x(n.graphManager,new b(l.position("x")-u.w/2,l.position("y")-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):e.add(new x(this.graphManager))).id=l.data("id"),h.nodeRepulsion=m(i.nodeRepulsion,l),h.paddingLeft=parseInt(l.css("padding")),h.paddingTop=parseInt(l.css("padding")),h.paddingRight=parseInt(l.css("padding")),h.paddingBottom=parseInt(l.css("padding")),i.nodeDimensionsIncludeLabels&&(h.labelWidth=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,h.labelHeight=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,h.labelPosVertical=l.css("text-valign"),h.labelPosHorizontal=l.css("text-halign")),f[l.data("id")]=h,isNaN(h.rect.x)&&(h.rect.x=0),isNaN(h.rect.y)&&(h.rect.y=0),null!=c&&0<c.length&&t(n.getGraphManager().add(n.newGraph(),h),c,n,i)}},"processChildrenList"),e=me(function(t,e,r){for(var n=0,i=0,a=0;a<r.length;a++){var s=r[a],o=f[s.data("source")],l=f[s.data("target")];o&&l&&o!==l&&0==o.getEdgesBetween(l).length&&((o=e.add(t.newEdge(),o,l)).id=s.id(),o.idealLength=m(c.idealEdgeLength,s),o.edgeElasticity=m(c.edgeElasticity,s),n+=o.idealLength,i++)}null!=c.idealEdgeLength&&(0<i?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=n/i:h(c.idealEdgeLength)?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=50:k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=c.idealEdgeLength,k.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,k.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH)},"processEdges"),i=me(function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)},"processConstraints"),a=(null!=c.nestingFactor&&(k.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),null!=c.gravity&&(k.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=c.gravity),null!=c.numIter&&(k.MAX_ITERATIONS=u.MAX_ITERATIONS=c.numIter),null!=c.gravityRange&&(k.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),null!=c.gravityCompound&&(k.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),null!=c.gravityRangeCompound&&(k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),null!=c.initialEnergyOnIncremental&&(k.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),null!=c.tilingCompareBy&&(k.TILING_COMPARE_BY=c.tilingCompareBy),l.QUALITY="proof"==c.quality?2:0,k.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!c.randomize,k.ANIMATE=u.ANIMATE=l.ANIMATE=c.animate,k.TILE=c.tile,k.TILING_PADDING_VERTICAL="function"==typeof c.tilingPaddingVertical?c.tilingPaddingVertical.call():c.tilingPaddingVertical,k.TILING_PADDING_HORIZONTAL="function"==typeof c.tilingPaddingHorizontal?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,k.PURE_INCREMENTAL=!c.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=c.uniformNodeDimensions,"transformed"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!1),"enforced"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!1),"cose"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!0),"all"==c.step&&(c.randomize?k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!0),c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint?k.TREE_REDUCTION_ON_INCREMENTAL=!1:k.TREE_REDUCTION_ON_INCREMENTAL=!0,new o),s=a.newGraphManager();return t(s.addRoot(),v.getTopMostNodes(r),a,c),e(a,s,n),i(a,c),a.runLayout(),f},"coseLayout");t.exports={coseLayout:r}},212:(t,e,r)=>{function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(n,"defineProperties"),me(i,"_classCallCheck");var a,s,o=r(658),b=r(548),w=r(657).spectralLayout,k=r(816).coseLayout,l=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:me(function(t){return 4500},"nodeRepulsion"),idealEdgeLength:me(function(t){return 50},"idealEdgeLength"),edgeElasticity:me(function(t){return.45},"edgeElasticity"),nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:me(function(){},"ready"),stop:me(function(){},"stop")}),r=(me(c,"Layout"),a=c,s=[{key:"run",value:me(function(){var h=this.options,t=h.cy,e=h.eles,u=[],d=[],r=void 0,n=[],i=(!h.fixedNodeConstraint||Array.isArray(h.fixedNodeConstraint)&&0!=h.fixedNodeConstraint.length||(h.fixedNodeConstraint=void 0),!h.alignmentConstraint||(!h.alignmentConstraint.vertical||Array.isArray(h.alignmentConstraint.vertical)&&0!=h.alignmentConstraint.vertical.length||(h.alignmentConstraint.vertical=void 0),!h.alignmentConstraint.horizontal)||Array.isArray(h.alignmentConstraint.horizontal)&&0!=h.alignmentConstraint.horizontal.length||(h.alignmentConstraint.horizontal=void 0),!h.relativePlacementConstraint||Array.isArray(h.relativePlacementConstraint)&&0!=h.relativePlacementConstraint.length||(h.relativePlacementConstraint=void 0),void((h.fixedNodeConstraint||h.alignmentConstraint||h.relativePlacementConstraint)&&(h.tile=!1,h.packComponents=!1))),a=!1;if(t.layoutUtilities&&h.packComponents&&(i=(i=t.layoutUtilities("get"))||t.layoutUtilities(),a=!0),0<e.nodes().length)if(a){if(a=b.getTopMostNodes(h.eles.nodes()),(r=b.connectComponents(t,h.eles,a)).forEach(function(t){t=t.boundingBox(),n.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),h.randomize&&r.forEach(function(t){h.eles=t,u.push(w(h))}),"default"==h.quality||"proof"==h.quality){var s=t.collection();if(h.tile){var a=new Map,o=0,l={nodeIndexes:a,xCoords:[],yCoords:[]},c=[];if(r.forEach(function(r,t){0==r.edges().length&&(r.nodes().forEach(function(t,e){s.merge(r.nodes()[e]),t.isParent()||(l.nodeIndexes.set(r.nodes()[e].id(),o++),l.xCoords.push(r.nodes()[0].position().x),l.yCoords.push(r.nodes()[0].position().y))}),c.push(t))}),1<s.length){a=s.boundingBox(),n.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),r.push(s),u.push(l);for(var p=c.length-1;0<=p;p--)r.splice(c[p],1),u.splice(c[p],1),n.splice(c[p],1)}}r.forEach(function(t,e){h.eles=t,d.push(k(h,u[e])),b.relocateComponent(n[e],d[e],h)})}else r.forEach(function(t,e){b.relocateComponent(n[e],u[e],h)});var g,f,m,y,v=new Set;1<r.length&&(g=[],f=e.filter(function(t){return"none"==t.css("display")}),r.forEach(function(t,o){var l,r,c=void 0;"draft"==h.quality&&(c=u[o].nodeIndexes),0<t.nodes().not(f).length&&(l={edges:[],nodes:[]},t.nodes().not(f).forEach(function(t){var e;"draft"==h.quality?t.isParent()?(e=b.calcBoundingBox(t,u[o].xCoords,u[o].yCoords,c),l.nodes.push({x:e.topLeftX,y:e.topLeftY,width:e.width,height:e.height})):(r=c.get(t.id()),l.nodes.push({x:u[o].xCoords[r]-t.boundingbox().w/2,y:u[o].yCoords[r]-t.boundingbox().h/2,width:t.boundingbox().w,height:t.boundingbox().h})):d[o][t.id()]&&l.nodes.push({x:d[o][t.id()].getLeft(),y:d[o][t.id()].getTop(),width:d[o][t.id()].getWidth(),height:d[o][t.id()].getHeight()})}),t.edges().forEach(function(t){var e,r,n,i,a,s=t.source(),t=t.target();"none"!=s.css("display")&&"none"!=t.css("display")&&("draft"==h.quality?(e=c.get(s.id()),r=c.get(t.id()),n=[],i=[],s.isParent()?(a=b.calcBoundingBox(s,u[o].xCoords,u[o].yCoords,c),n.push(a.topLeftX+a.width/2),n.push(a.topLeftY+a.height/2)):(n.push(u[o].xCoords[e]),n.push(u[o].yCoords[e])),t.isParent()?(a=b.calcBoundingBox(t,u[o].xCoords,u[o].yCoords,c),i.push(a.topLeftX+a.width/2),i.push(a.topLeftY+a.height/2)):(i.push(u[o].xCoords[r]),i.push(u[o].yCoords[r])),l.edges.push({startX:n[0],startY:n[1],endX:i[0],endY:i[1]})):d[o][s.id()]&&d[o][t.id()]&&l.edges.push({startX:d[o][s.id()].getCenterX(),startY:d[o][s.id()].getCenterY(),endX:d[o][t.id()].getCenterX(),endY:d[o][t.id()].getCenterY()}))}),0<l.nodes.length)&&(g.push(l),v.add(o))}),m=i.packComponents(g,h.randomize).shifts,"draft"==h.quality?u.forEach(function(t,e){var r=t.xCoords.map(function(t){return t+m[e].dx}),n=t.yCoords.map(function(t){return t+m[e].dy});t.xCoords=r,t.yCoords=n}):(y=0,v.forEach(function(e){Object.keys(d[e]).forEach(function(t){(t=d[e][t]).setCenter(t.getCenterX()+m[y].dx,t.getCenterY()+m[y].dy)}),y++})))}else a=h.eles.boundingBox(),n.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),h.randomize&&(i=w(h),u.push(i)),"default"==h.quality||"proof"==h.quality?(d.push(k(h,u[0])),b.relocateComponent(n[0],d[0],h)):b.relocateComponent(n[0],u[0],h);var x=me(function(r,t){var e,n,i,a;return"default"==h.quality||"proof"==h.quality?(n=e=void 0,i=(r="number"==typeof r?t:r).data("id"),d.forEach(function(t){i in t&&(e={x:t[i].getRect().getCenterX(),y:t[i].getRect().getCenterY()},n=t[i])}),h.nodeDimensionsIncludeLabels&&(n.labelWidth&&("left"==n.labelPosHorizontal?e.x+=n.labelWidth/2:"right"==n.labelPosHorizontal&&(e.x-=n.labelWidth/2)),n.labelHeight)&&("top"==n.labelPosVertical?e.y+=n.labelHeight/2:"bottom"==n.labelPosVertical&&(e.y-=n.labelHeight/2)),{x:(e=null==e?{x:r.position("x"),y:r.position("y")}:e).x,y:e.y}):(a=void 0,u.forEach(function(t){var e=t.nodeIndexes.get(r.id());null!=e&&(a={x:t.xCoords[e],y:t.yCoords[e]})}),{x:(a=null==a?{x:r.position("x"),y:r.position("y")}:a).x,y:a.y})},"getPositions");"default"==h.quality||"proof"==h.quality||h.randomize?(a=b.calcParentsWithoutChildren(t,e),i=e.filter(function(t){return"none"==t.css("display")}),h.eles=e.not(i),e.nodes().not(":parent").not(i).layoutPositions(this,h,x),0<a.length&&a.forEach(function(t){t.position(x(t))})):console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}],n(a.prototype,s),c);function c(t){i(this,c),this.options=o({},l,t)}t.exports=r},657:(t,e,r)=>{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=me(function(t){var i=t.cy,a=t.eles,e=a.nodes(),r=a.nodes(":parent"),s=new Map,m=new Map,o=new Map,y=[],g=[],f=[],h=[],v=[],x=[],u=[],b=[],w=void 0,k=t.piTol,n=t.samplingType,T=t.nodeSeparation,d=void 0,P=me(function(){for(var t=0,e=!1;t<d;){for(var r=Math.floor(Math.random()*w),e=!1,n=0;n<t;n++)if(h[n]==r){e=!0;break}e||(h[t]=r,t++)}},"randomSampleCR"),p=me(function(t,e,r){for(var n,i=[],a=0,s=0,o=[],l=0,c=1,h=0;h<w;h++)o[h]=1e8;for(o[i[s]=t]=0;a<=s;){for(var u=i[a++],d=y[u],p=0;p<d.length;p++)1e8==o[n=m.get(d[p])]&&(o[n]=o[u]+1,i[++s]=n);x[u][e]=o[u]*T}if(r){for(var g=0;g<w;g++)x[g][e]<v[g]&&(v[g]=x[g][e]);for(var f=0;f<w;f++)l<v[f]&&(l=v[f],c=f)}return c},"BFS"),l=me(function(t){var e=void 0;if(t){for(var e=Math.floor(Math.random()*w),r=0;r<w;r++)v[r]=1e8;for(var n=0;n<d;n++)e=p(h[n]=e,n,t)}else{P();for(var i=0;i<d;i++)p(h[i],i,t,!1)}for(var a=0;a<w;a++)for(var s=0;s<d;s++)x[a][s]*=x[a][s];for(var o=0;o<d;o++)u[o]=[];for(var l=0;l<d;l++)for(var c=0;c<d;c++)u[l][c]=x[h[c]][l]},"allBFS"),B=me(function(){for(var t=(r=q.svd(u)).S,e=r.U,r=r.V,n=t[0]*t[0]*t[0],i=[],a=0;a<d;a++){i[a]=[];for(var s=0;s<d;s++)i[a][s]=0,a==s&&(i[a][s]=t[a]/(t[a]*t[a]+n/(t[a]*t[a])))}b=U.multMat(U.multMat(r,i),U.transpose(e))},"sample"),$=me(function(){for(var t=void 0,e=void 0,r=[],n=[],i=[],a=[],s=0;s<w;s++)r[s]=Math.random(),n[s]=Math.random();for(var r=U.normalize(r),n=U.normalize(n),o=1e-9,l=1e-9,c=void 0;;){for(var h=0;h<w;h++)i[h]=r[h];if(r=U.multGamma(U.multL(U.multGamma(i),x,b)),t=U.dotProduct(i,r),r=U.normalize(r),o=U.dotProduct(i,r),(c=Math.abs(o/l))<=1+k&&1<=c)break;l=o}for(var u=0;u<w;u++)i[u]=r[u];for(l=1e-9;;){for(var d=0;d<w;d++)a[d]=n[d];if(a=U.minusOp(a,U.multCons(i,U.dotProduct(i,a))),n=U.multGamma(U.multL(U.multGamma(a),x,b)),e=U.dotProduct(a,n),n=U.normalize(n),o=U.dotProduct(a,n),(c=Math.abs(o/l))<=1+k&&1<=c)break;l=o}for(var p=0;p<w;p++)a[p]=n[p];g=U.multCons(i,Math.sqrt(Math.abs(t))),f=U.multCons(a,Math.sqrt(Math.abs(e)))},"powerIteration");G.connectComponents(i,a,G.getTopMostNodes(e),s),r.forEach(function(t){G.connectComponents(i,a,G.getTopMostNodes(t.descendants().intersection(a)),s)});for(var c=0,E=0;E<e.length;E++)e[E].isParent()||m.set(e[E].id(),c++);var C=!0,S=!1,_=void 0;try{for(var A,L=s.keys()[Symbol.iterator]();!(C=(A=L.next()).done);C=!0){var F=A.value;m.set(F,c++)}}catch(t){S=!0,_=t}finally{try{!C&&L.return&&L.return()}finally{if(S)throw _}}for(var N=0;N<m.size;N++)y[N]=[];r.forEach(function(t){for(var e=t.children().intersection(a);0==e.nodes(":childless").length;)e=e.nodes()[0].children().intersection(a);var r=0,n=e.nodes(":childless")[0].connectedEdges().length;e.nodes(":childless").forEach(function(t,e){t.connectedEdges().length<n&&(n=t.connectedEdges().length,r=e)}),o.set(t.id(),e.nodes(":childless")[r].id())}),e.forEach(function(e){var r=e.isParent()?m.get(o.get(e.id())):m.get(e.id());e.neighborhood().nodes().forEach(function(t){0<a.intersection(e.edgesWith(t)).length&&(t.isParent()?y[r].push(o.get(t.id())):y[r].push(t.id()))})});var z=me(function(e){var r,n=m.get(e);s.get(e).forEach(function(t){r=i.getElementById(t).isParent()?o.get(t):t,y[n].push(r),y[m.get(r)].push(e)})},"_loop"),I=!0,S=!1,_=void 0;try{for(var R,M=s.keys()[Symbol.iterator]();!(I=(R=M.next()).done);I=!0)z(R.value)}catch(t){S=!0,_=t}finally{try{!I&&M.return&&M.return()}finally{if(S)throw _}}if(2<(w=m.size)){for(var d=w<t.sampleSize?w:t.sampleSize,D=0;D<w;D++)x[D]=[];for(var O=0;O<d;O++)b[O]=[];"draft"==t.quality||"all"==t.step?(l(n),B(),$()):m.forEach(function(t,e){g.push(i.getElementById(e).position("x")),f.push(i.getElementById(e).position("y"))})}else r=m.keys(),_=(S=i.getElementById(r.next().value)).position(),l=S.outerWidth(),g.push(_.x),f.push(_.y),2==w&&(n=i.getElementById(r.next().value).outerWidth(),g.push(_.x+l/2+n/2+t.idealEdgeLength),f.push(_.y));return{nodeIndexes:m,xCoords:g,yCoords:f}},"spectralLayout");t.exports={spectralLayout:r}},579:(t,e,r)=>{var n=r(212),r=me(function(t){t&&t("layout","fcose",n)},"register");typeof cytoscape<"u"&&r(cytoscape),t.exports=r},140:t=>{t.exports=e}},i={},me(r,"__webpack_require__"),r(579);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),uBt=b(()=>{Pc(),ZPt=me(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),QPt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ZPt('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:ZPt('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:ZPt('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:ZPt('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:ZPt('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:Ac,blank:{body:ZPt("")}}}}),dBt=b(()=>{Tu(),JL(),Pc(),Oc(),uBt(),iBt(),JPt=me(async function(w,t,k){let T=k.getConfigField("padding"),e=k.getConfigField("iconSize"),E=e/2,C=e/6,S=C/2;await Promise.all(t.edges().map(async t=>{let{source:e,sourceDir:r,sourceArrow:n,sourceGroup:i,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=qPt(t),{x:h,y:u}=t[0].sourceEndpoint(),{x:d,y:p}=t[0].midpoint(),{x:g,y:f}=t[0].targetEndpoint(),m=T+4;var y,v,x,b;i&&(RPt(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(RPt(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),i||"junction"!==k.getNode(e)?.type||(RPt(r)?h+="L"===r?E:-E:u+="T"===r?E:-E),l||"junction"!==k.getNode(a)?.type||(RPt(s)?g+="L"===s?E:-E:f+="T"===s?E:-E),t[0]._private.rscratch&&((t=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge"),n&&(b=RPt(r)?LPt[r](h,C):h-S,y=MPt(r)?LPt[r](u,C):u-S,t.insert("polygon").attr("points",APt[r](C)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=RPt(s)?LPt[s](g,C):g-S,y=MPt(s)?LPt[s](f,C):f-S,t.insert("polygon").attr("points",APt[s](C)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=DPt(r,s)?"XY":RPt(r)?"X":"Y")?Math.abs(h-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(h-g)/2,b=t.append("g"),await QL(b,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},O()),b.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==x?b.attr("transform","translate("+d+", "+p+")"):"Y"==x?b.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==x&&(y=BPt(r,s))&&OPt(y)&&(t=b.node().getBoundingClientRect(),[y,v]=FPt(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",` + translate(${d}, ${p-t.height/2}) + translate(${y*x.width/2}, ${v*x.height/2}) + rotate(${-1*y*v*45}, 0, ${t.height/2}) + `)))}))},"drawEdges"),tBt=me(async function(l,t,e){let c=.75*e.getConfigField("padding"),h=e.getConfigField("fontSize"),u=e.getConfigField("iconSize")/2;await Promise.all(t.nodes().map(async n=>{var i=jPt(n);if("group"===i.type){var{h:n,w:a,x1:s,y1:o}=n.boundingBox();l.append("rect").attr("x",s+u).attr("y",o+u).attr("width",a).attr("height",n).attr("class","node-bkg");let t=l.append("g"),e=s,r=o;i.icon&&((n=t.append("g")).html(`<g>${await Dc(i.icon,{height:c,width:c,fallbackPrefix:QPt.prefix})}</g>`),n.attr("transform","translate("+(e+u+1)+", "+(r+u+1)+")"),e+=c,r+=h/2-1-2),i.label&&(s=t.append("g"),await QL(s,i.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},O()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),s.attr("transform","translate("+(e+u+4)+", "+(r+u+2)+")"))}}))},"drawGroups"),eBt=me(async function(t,e,r){var n,i=O();for(n of r){var a=e.append("g"),s=t.getConfigField("iconSize"),o=(n.title&&(o=a.append("g"),await QL(o,n.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},i),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),o.attr("transform","translate("+s/2+", "+s+")")),a.append("g")),{width:l,height:c}=(n.icon?o.html(`<g>${await Dc(n.icon,{height:s,width:s,fallbackPrefix:QPt.prefix})}</g>`):n.iconText?(o.html(`<g>${await Dc("blank",{height:s,width:s,fallbackPrefix:QPt.prefix})}</g>`),l=o.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html(lc(n.iconText,i)),c=parseInt(window.getComputedStyle(l.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,l.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/c)};`)):o.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`),a.attr("class","architecture-service"),a._groups[0][0].getBBox());n.width=l,n.height=c,t.setElementForId(n.id,a)}return 0},"drawServices"),rBt=me(function(i,a,t){t.forEach(t=>{var e=a.append("g"),r=i.getConfigField("iconSize"),{width:r,height:n}=(e.append("g").append("rect").attr("id","node-"+t.id).attr("fill-opacity","0").attr("width",r).attr("height",r),e.attr("class","architecture-junction"),e._groups[0][0].getBBox());e.width=r,e.height=n,i.setElementForId(t.id,e)})},"drawJunctions")});function pBt(t,e,r){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function gBt(t,e,r){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function fBt(r,t){t.nodes().map(t=>{var e=jPt(t);"group"!==e.type&&(e.x=t.position().x,e.y=t.position().y,r.getElementById(e.id).attr("transform","translate("+(e.x||0)+","+(e.y||0)+")"))})}function mBt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function yBt(t,h){t.forEach(t=>{var{lhsId:e,rhsId:r,lhsInto:n,lhsGroup:i,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=t,t=DPt(t.lhsDir,t.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:e+"-"+r,label:c,source:e,sourceDir:s,sourceArrow:n,sourceGroup:i,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:r,targetDir:o,targetArrow:a,targetGroup:l,targetEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%"},classes:t})})}function vBt(s,t,u){let e=me((t,h)=>Object.entries(t).reduce((r,[n,t])=>{let i=0,a=Object.entries(t);if(1===a.length)r[n]=a[0][1];else for(let e=0;e<a.length-1;e++)for(let t=e+1;t<a.length;t++){var[s,o]=a[e],[l,c]=a[t];u[s]?.[l]===h||"default"===s||"default"===l?(r[n]??=[],r[n]=[...r[n],...o,...c]):(r[n+"-"+i++]=o,r[n+"-"+i++]=c)}return r},{}),"flattenAlignments"),r=t.map(t=>{let i={},a={};return Object.entries(t).forEach(([t,[e,r]])=>{var n=s.getNode(t)?.in??"default";i[r]??={},i[r][n]??=[],i[r][n].push(t),a[e]??={},a[e][n]??=[],a[e][n].push(t)}),{horiz:Object.values(e(i,"horizontal")).filter(t=>1<t.length),vert:Object.values(e(a,"vertical")).filter(t=>1<t.length)}}),[n,i]=r.reduce(([t,e],{horiz:r,vert:n})=>[[...t,...r],[...e,...n]],[[],[]]);return{horizontal:n,vertical:i}}function xBt(t,l){let c=[],h=me(t=>t[0]+","+t[1],"posToStr"),u=me(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{let a=Object.fromEntries(Object.entries(t).map(([t,e])=>[h(e),t])),s=[h([0,0])],o={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0<s.length;){var r=s.shift();if(r){o[r]=1;let i=a[r];if(i){let n=u(r);Object.entries(e).forEach(([t,e])=>{var e=h([n[0]+e[0],n[1]+e[1]]),r=a[e];r&&!o[e]&&(s.push(e),c.push({[_Pt[t]]:r,[_Pt[NPt(t)]]:i,gap:1.5*l.getConfigField("iconSize")}))})}}}}),c}function bBt(i,a,l,c,h,{spatialMaps:u,groupAlignments:d}){return new Promise(e=>{let t=H("body").append("div").attr("id","cy").attr("style","display:none"),s=Clt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":h.getConfigField("fontSize")+"px"}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:h.getConfigField("padding")+"px"}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}}),r=(t.remove(),mBt(l,s),pBt(i,s,h),gBt(a,s,h),yBt(c,s),vBt(h,u,d)),n=xBt(u,h),o=s.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){var[t,e]=t.connectedNodes();return(t=jPt(t).parent)===jPt(e).parent?1.5*h.getConfigField("iconSize"):.5*h.getConfigField("iconSize")},edgeElasticity(t){var[t,e]=t.connectedNodes();return(t=jPt(t).parent)===jPt(e).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:n});o.one("layoutstop",()=>{function t(t,e,r,n){var{x:t,y:i}=t,{x:e,y:a}=e,s=(n-i+(t-r)*(i-a)/(t-e))/Math.sqrt(1+Math.pow((i-a)/(t-e),2)),o=Math.sqrt(Math.pow(n-i,2)+Math.pow(r-t,2)-Math.pow(s,2));o/=Math.sqrt(Math.pow(e-t,2)+Math.pow(a-i,2));let l=(e-t)*(n-i)-(a-i)*(r-t);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(e-t)*(r-t)+(a-i)*(n-i);switch(!0){case 0<=c:c=1;break;case c<0:c=-1}return{distances:Math.abs(s)*l,weights:o*=c}}me(t,"getSegmentWeights"),s.startBatch();for(var e of Object.values(s.edges())){var r,n,i,a;e.data?.()&&({x:i,y:n}=e.source().position(),{x:a,y:r}=e.target().position(),i!==a)&&n!==r&&(i=e.sourceEndpoint(),a=e.targetEndpoint(),n=qPt(e).sourceDir,[r,n]=MPt(n)?[i.x,a.y]:[a.x,i.y],{weights:i,distances:a}=t(i,a,r,n),e.style("segment-distances",a),e.style("segment-weights",i))}s.endBatch(),o.run()}),o.run(),s.ready(t=>{D.info("Ready",t),e(s)})})}var wBt,kBt,TBt=b(()=>{Slt(),wBt=q(hBt(),1),i6(),t(),Pc(),z7t(),lh(),uBt(),iBt(),dBt(),Ic([{name:QPt.prefix,icons:QPt}]),Clt.use(wBt.default),me(pBt,"addServices"),me(gBt,"addJunctions"),me(fBt,"positionNodes"),me(mBt,"addGroups"),me(yBt,"addEdges"),me(vBt,"getAlignments"),me(xBt,"getRelativeConstraints"),me(bBt,"layoutArchitecture"),wBt=me(async(t,e,r,n)=>{var i=(n=n.db).getServices(),a=n.getJunctions(),s=n.getGroups(),o=n.getEdges(),l=n.getDataStructures(),c=(e=M7t(e)).append("g"),h=(c.attr("class","architecture-edges"),(u=e.append("g")).attr("class","architecture-services"),e.append("g")),u=(h.attr("class","architecture-groups"),await eBt(n,u,i),rBt(n,u,a),await bBt(i,a,s,o,n,l));await JPt(c,u,n),await tBt(h,u,n),fBt(n,u),Qc(void 0,e,n.getConfigField("padding"),n.getConfigField("useMaxWidth"))},"draw"),kBt={draw:wBt}}),EBt={};KBt(EBt,{diagram:()=>CBt});var CBt,SBt,_Bt=b(()=>{sBt(),aBt(),oBt(),TBt(),CBt={parser:VPt,get db(){return new YPt},renderer:kBt,styles:KPt}}),ABt=b(()=>{tn(),rn(),iS(),MN(),ku(),SBt=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=mh,this.getAccTitle=yh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getAccDescription=xh,this.setAccDescription=vh}static{me(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var t=We,e=ar();return SC({...t.treemap,...e.treemap??{}})}addNode(t,e){this.nodes.push(t),this.levels.set(t,e),0===e&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,e){let r=this.classes.get(t)??{id:t,styles:[],textStyles:[]},n=e.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(t=>{_N(t)&&(r?.textStyles?r.textStyles.push(t):r.textStyles=[t]),r?.styles?r.styles.push(t):r.styles=[t]}),this.classes.set(t,r)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){fh(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function LBt(t){if(!t.length)return[];let n=[],i=[];return t.forEach(t=>{var e,r={name:t.name,children:"Leaf"===t.type?void 0:[]};for(r.classSelector=t?.classSelector,t?.cssCompiledStyles&&(r.cssCompiledStyles=[t.cssCompiledStyles]),"Leaf"===t.type&&void 0!==t.value&&(r.value=t.value);0<i.length&&i[i.length-1].level>=t.level;)i.pop();0===i.length?n.push(r):(e=i[i.length-1].node).children?e.children.push(r):e.children=[r],"Leaf"!==t.type&&i.push({node:r,level:t.level})}),n}var NBt,IBt,RBt,MBt,DBt,OBt,PBt,BBt,$Bt,FBt=b(()=>{me(LBt,"buildHierarchy")}),zBt=b(()=>{v6t(),t(),k6t(),FBt(),ABt(),NBt=me((t,n)=>{x6t(t,n);var e,r,i=[];for(e of t.TreemapRows??[])"ClassDefStatement"===e.$type&&n.addClass(e.className??"",e.styleText??"");for(r of t.TreemapRows??[]){var a,s,o,l=r.item;l&&(o=r.indent?parseInt(r.indent):0,a=IBt(l),s=0<(s=l.classSelector?n.getStylesForClass(l.classSelector):[]).length?s.join(";"):void 0,o={level:o,name:a,type:l.$type,value:l.value,classSelector:l.classSelector,cssCompiledStyles:s},i.push(o))}let c=LBt(i),h=me((t,e)=>{for(var r of t)n.addNode(r,e),r.children&&0<r.children.length&&h(r.children,e+1)},"addNodesRecursively");h(c,0)},"populate"),IBt=me(t=>t.name?String(t.name):"","getItemName"),RBt={parser:{yy:void 0},parse:me(async t=>{try{var e=await g6t("treemap",t),r=(D.debug("Treemap AST:",e),RBt.parser?.yy);if(!(r instanceof SBt))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");NBt(e,r)}catch(t){throw D.error("Error parsing treemap:",t),t}},"parse")}}),GBt=b(()=>{z7t(),hct(),lh(),i6(),MN(),rn(),t(),MBt=me((t,a,e,s)=>{let r=s.db,o=r.getConfig(),l=o.padding??10,c=r.getDiagramTitle(),h=r.getRoot(),u=ar().themeVariables;if(h){var s=c?30:0,d=M7t(a),p=o.nodeWidth?10*o.nodeWidth:960,g=o.nodeHeight?10*o.nodeHeight:500,f=p,m=g+s;d.attr("viewBox",`0 0 ${f} `+m),Zc(d,m,f,o.useMaxWidth);let r;try{var y=o.valueFormat||",";if("$0,0"===y)r=me(t=>"$"+rv(",")(t),"valueFormat");else if(y.startsWith("$")&&y.includes(",")){let t=/\.\d+/.exec(y),e=t?t[0]:"";r=me(t=>"$"+rv(","+e)(t),"valueFormat")}else if(y.startsWith("$")){let e=y.substring(1);r=me(t=>"$"+rv(e||"")(t),"valueFormat")}else r=rv(y)}catch(t){D.error("Error creating format function:",t),r=rv(",")}let e=yx().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),n=yx().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),i=yx().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);c&&d.append("text").attr("x",f/2).attr("y",s/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(c),m=d.append("g").attr("transform",`translate(0, ${s})`).attr("class","treemapContainer"),y=Gv(h).sum(t=>t.value??0).sort((t,e)=>(e.value??0)-(t.value??0)),s=(f=hx().size([p,g]).paddingTop(t=>t.children&&0<t.children.length?35:0).paddingInner(l).paddingLeft(t=>t.children&&0<t.children.length?10:0).paddingRight(t=>t.children&&0<t.children.length?10:0).paddingBottom(t=>t.children&&0<t.children.length?10:0).round(!0)(y)).descendants().filter(t=>t.children&&0<t.children.length),(p=m.selectAll(".treemapSection").data(s).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`)).append("rect").attr("width",t=>t.x1-t.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>0===t.depth?"display: none;":""),p.append("clipPath").attr("id",(t,e)=>`clip-section-${a}-`+e).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",25),p.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,e)=>"treemapSection section"+e).attr("fill",t=>e(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>n(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>0===t.depth?"display: none;":(t=Q({cssCompiledStyles:t.data.cssCompiledStyles})).nodeStyles+";"+t.borderStyles.join(";")),p.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(t=>0===t.depth?"":t.data.name).attr("font-weight","bold").attr("style",t=>0===t.depth?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+i(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+Q({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(t){if(0!==t.depth){var e=H(this),r=t.data.name,n=(e.text(r),t.x1-t.x0),t=!1!==o.showValues&&t.value?n-10-30-10-6:n-6-6,i=Math.max(15,t),a=e.node();if(a.getComputedTextLength()>i){let t=r;for(;0<t.length;){if(0===(t=r.substring(0,t.length-1)).length){e.text("..."),a.getComputedTextLength()>i&&e.text("");break}if(e.text(t+"..."),a.getComputedTextLength()<=i)break}}}}),!1!==o.showValues&&p.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?r(t.value):"").attr("font-style","italic").attr("style",t=>0===t.depth?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+i(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+Q({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")),g=f.leaves(),(y=m.selectAll(".treemapLeafGroup").data(g).enter().append("g").attr("class",(t,e)=>`treemapNode treemapLeafGroup leaf${e}${t.data.classSelector?" "+t.data.classSelector:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`)).append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?e(t.parent.data.name):e(t.data.name)).attr("style",t=>Q({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?e(t.parent.data.name):e(t.data.name)).attr("stroke-width",3),y.append("clipPath").attr("id",(t,e)=>`clip-${a}-`+e).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),y.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+i(t.data.name)+";"+Q({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,e)=>`url(#clip-${a}-${e})`).text(t=>t.data.name).each(function(t){var n=H(this),e=t.x1-t.x0,t=t.y1-t.y0,i=n.node(),a=e-8,s=t-8;if(a<10||s<10)n.style("display","none");else{let t=parseInt(n.style("font-size"),10);for(;i.getComputedTextLength()>a&&8<t;)t--,n.style("font-size",t+"px");let e=Math.max(6,Math.min(28,Math.round(.6*t))),r=t+2+e;for(;r>s&&8<t&&(t--,!((e=Math.max(6,Math.min(28,Math.round(.6*t))))<6&&8===t));)n.style("font-size",t+"px"),r=t+2+e,e<=6&&r;n.style("font-size",t+"px"),(i.getComputedTextLength()>a||t<8||s<t)&&n.style("display","none")}}),!1!==o.showValues&&y.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+i(t.data.name)+";"+Q({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,e)=>`url(#clip-${a}-${e})`).text(t=>t.value?r(t.value):"").each(function(t){var e,r,n=H(this),i=this.parentNode;!i||(i=H(i).select(".treemapLabel")).empty()||"none"===i.style("display")||(i=parseFloat(i.style("font-size")),e=Math.max(6,Math.min(28,Math.round(.6*i))),n.style("font-size",e+"px"),i=(t.y1-t.y0)/2+i/2+2,n.attr("y",i),r=t.x1-t.x0,t=t.y1-t.y0-4,r-=8,n.node().getComputedTextLength()>r)||t<i+e||e<6?n.style("display","none"):n.style("display",null)}),s=o.diagramPadding??8,Vlt(d,s,"flowchart",o?.useMaxWidth||!1)}},"draw"),DBt=me(function(t,e){return e.db.getClasses()},"getClasses"),OBt={draw:MBt,getClasses:DBt}}),UBt=b(()=>{iS(),PBt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},BBt=me(({treemap:t}={})=>` + .treemapNode.section { + stroke: ${(t=SC(PBt,t)).sectionStrokeColor}; + stroke-width: ${t.sectionStrokeWidth}; + fill: ${t.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${t.leafStrokeColor}; + stroke-width: ${t.leafStrokeWidth}; + fill: ${t.leafFillColor}; + } + .treemapLabel { + fill: ${t.labelColor}; + font-size: ${t.labelFontSize}; + } + .treemapValue { + fill: ${t.valueColor}; + font-size: ${t.valueFontSize}; + } + .treemapTitle { + fill: ${t.titleColor}; + font-size: ${t.titleFontSize}; + } + `,"getStyles"),$Bt=BBt}),qBt={};KBt(qBt,{diagram:()=>jBt});var jBt,WBt,YBt=b(()=>{ABt(),zBt(),GBt(),UBt(),jBt={parser:RBt,get db(){return new SBt},renderer:OBt,styles:$Bt}}),HBt=(KBt(WBt={},{default:()=>szt}),Pc(),nh(),sh(),{id:"c4",detector:me(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:me(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(IS(),LS))).diagram}),"loader")}),VBt={id:"flowchart",detector:me((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:me(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(wct(),mct))).diagram}),"loader")},XBt="flowchart-v2",b=me((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),KBt=me(async()=>{var t=(await Promise.resolve().then(()=>(wct(),mct))).diagram;return{id:XBt,diagram:t}},"loader"),ZBt={id:XBt,detector:b,loader:KBt},QBt={id:"er",detector:me(t=>/^\s*erDiagram/.test(t),"detector"),loader:me(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(Mct(),Ict))).diagram}),"loader")},JBt={id:"gitGraph",detector:me(t=>/^\s*gitGraph/.test(t),"detector"),loader:me(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(jkt(),zkt))).diagram}),"loader")},t$t={id:"gantt",detector:me(t=>/^\s*gantt/.test(t),"detector"),loader:me(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(P7t(),S7t))).diagram}),"loader")},e$t={id:"info",detector:me(t=>/^\s*info/.test(t),"detector"),loader:me(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(l8t(),U7t))).diagram}),"loader")},r$t={id:"pie",detector:me(t=>/^\s*pie/.test(t),"detector"),loader:me(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(x8t(),p8t))).diagram}),"loader")},n$t="quadrantChart",b=me(t=>/^\s*quadrantChart/.test(t),"detector"),KBt=me(async()=>{var t=(await Promise.resolve().then(()=>(tEt(),K8t))).diagram;return{id:n$t,diagram:t}},"loader"),i$t={id:n$t,detector:b,loader:KBt},a$t={id:"xychart",detector:me(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:me(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(yCt(),hCt))).diagram}),"loader")},s$t="requirement",b=me(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),KBt=me(async()=>{var t=(await Promise.resolve().then(()=>(wSt(),ECt))).diagram;return{id:s$t,diagram:t}},"loader"),o$t={id:s$t,detector:b,loader:KBt},l$t={id:"sequence",detector:me(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:me(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(u_t(),XSt))).diagram}),"loader")},c$t={id:"class",detector:me((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:me(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(x_t(),y_t))).diagram}),"loader")},h$t="classDiagram",b=me((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),KBt=me(async()=>{var t=(await Promise.resolve().then(()=>(oAt(),b_t))).diagram;return{id:h$t,diagram:t}},"loader"),u$t={id:h$t,detector:b,loader:KBt},d$t={id:"state",detector:me((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:me(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(a9t(),n9t))).diagram}),"loader")},p$t="stateDiagram",b=me((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&"dagre-wrapper"===e?.state?.defaultRenderer),"detector"),KBt=me(async()=>{var t=(await Promise.resolve().then(()=>($9t(),s9t))).diagram;return{id:p$t,diagram:t}},"loader"),g$t={id:p$t,detector:b,loader:KBt},f$t={id:"journey",detector:me(t=>/^\s*journey/.test(t),"detector"),loader:me(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(sLt(),rLt))).diagram}),"loader")},m$t=(t(),z7t(),lh(),b={draw:me((t,e,r)=>{D.debug(`rendering svg for syntax error +`);var n=(e=M7t(e)).append("g");e.attr("viewBox","0 0 2412 512"),Zc(e,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r)},"draw")}),y$t={db:{},renderer:b,parser:{parse:me(()=>{},"parse")}},v$t="flowchart-elk",KBt=me((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),b=me(async()=>{var t=(await Promise.resolve().then(()=>(wct(),mct))).diagram;return{id:v$t,diagram:t}},"loader"),x$t={id:v$t,detector:KBt,loader:b},b$t={id:"timeline",detector:me(t=>/^\s*timeline/.test(t),"detector"),loader:me(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(nNt(),JLt))).diagram}),"loader")},w$t={id:"mindmap",detector:me(t=>/^\s*mindmap/.test(t),"detector"),loader:me(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(eIt(),LNt))).diagram}),"loader")},k$t={id:"kanban",detector:me(t=>/^\s*kanban/.test(t),"detector"),loader:me(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(kIt(),sIt))).diagram}),"loader")},T$t={id:"sankey",detector:me(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:me(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(VRt(),ORt))).diagram}),"loader")},E$t={id:"packet",detector:me(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:me(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(yMt(),JRt))).diagram}),"loader")},C$t={id:"radar",detector:me(t=>/^\s*radar-beta/.test(t),"detector"),loader:me(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>($Mt(),DMt))).diagram}),"loader")},S$t={id:"block",detector:me(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:me(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(nBt(),CPt))).diagram}),"loader")},_$t="architecture",KBt=me(t=>/^\s*architecture/.test(t),"detector"),b=me(async()=>{var t=(await Promise.resolve().then(()=>(_Bt(),EBt))).diagram;return{id:_$t,diagram:t}},"loader"),A$t={id:_$t,detector:KBt,loader:b},L$t=(sh(),Tu(),{id:"treemap",detector:me(t=>/^\s*treemap/.test(t),"detector"),loader:me(async()=>({id:"treemap",diagram:(await Promise.resolve().then(()=>(YBt(),qBt))).diagram}),"loader")}),N$t=!1,I$t=me(()=>{N$t||(N$t=!0,Nh("error",y$t,t=>"error"===t.toLowerCase().trim()),Nh("---",{db:{clear:me(()=>{},"clear")},styles:{},renderer:{draw:me(()=>{},"draw")},parser:{parse:me(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:me(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),jc(x$t,w$t,A$t),jc(HBt,k$t,u$t,c$t,QBt,t$t,e$t,r$t,o$t,l$t,ZBt,VBt,b$t,JBt,g$t,d$t,f$t,i$t,T$t,E$t,a$t,S$t,C$t,L$t))},"addDiagrams"),R$t=(t(),sh(),Tu(),me(async()=>{D.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(Uc).map(async([t,{detector:e,loader:r}])=>{if(r)try{Ih(t)}catch{try{var{diagram:n,id:i}=await r();Nh(i,n,e)}catch(e){throw D.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Uc[t],e}}}))).filter(t=>"rejected"===t.status);if(0<t.length){D.error(`Failed to load ${t.length} external diagrams`);for(var e of t)D.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams")),M$t=(t(),i6(),"comm"),D$t="rule",O$t="decl",P$t=Math.abs,B$t=String.fromCharCode;function $$t(t){return t.trim()}function F$t(t,e,r){return t.replace(e,r)}function z$t(t,e,r){return t.indexOf(e,r)}function G$t(t,e){return 0|t.charCodeAt(e)}function U$t(t,e,r){return t.slice(e,r)}function q$t(t){return t.length}function j$t(t){return t.length}function W$t(t,e){return e.push(t),t}me($$t,"trim"),me(F$t,"replace"),me(z$t,"indexof"),me(G$t,"charat"),me(U$t,"substr"),me(q$t,"strlen"),me(j$t,"sizeof"),me(W$t,"append");var Y$t=1,H$t=1,V$t=0,X$t=0,K$t=0,Z$t="";function Q$t(t,e,r,n,i,a,s,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:Y$t,column:H$t,length:s,return:"",siblings:o}}function J$t(){return K$t=0<X$t?G$t(Z$t,--X$t):0,H$t--,10===K$t&&(H$t=1,Y$t--),K$t}function tFt(){return K$t=X$t<V$t?G$t(Z$t,X$t++):0,H$t++,10===K$t&&(H$t=1,Y$t++),K$t}function eFt(){return G$t(Z$t,X$t)}function rFt(t,e){return U$t(Z$t,t,e)}function nFt(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function iFt(t){return Y$t=H$t=1,V$t=q$t(Z$t=t),X$t=0,[]}function aFt(t){return Z$t="",t}function sFt(t){return $$t(rFt(X$t-1,cFt(91===t?t+2:40===t?t+1:t)))}function oFt(t){for(;(K$t=eFt())&&K$t<33;)tFt();return 2<nFt(t)||3<nFt(K$t)?"":" "}function lFt(t,e){for(;--e&&tFt()&&!(K$t<48||102<K$t||57<K$t&&K$t<65||70<K$t&&K$t<97););return rFt(t,X$t+(e<6&&32==eFt()&&32==tFt()))}function cFt(t){for(;tFt();)switch(K$t){case t:return X$t;case 34:case 39:34!==t&&39!==t&&cFt(K$t);break;case 40:41===t&&cFt(t);break;case 92:tFt()}return X$t}function hFt(t,e){for(;tFt()&&t+K$t!==57&&(t+K$t!==84||47!==eFt()););return"/*"+rFt(e,X$t-1)+"*"+B$t(47===t?t:tFt())}function uFt(t){for(;!nFt(eFt());)tFt();return rFt(t,X$t)}function dFt(t){return aFt(pFt("",null,null,null,[""],t=iFt(t),0,[0],t))}function pFt(t,e,r,n,i,a,s,o,l){for(var c,h,u,d=0,p=0,g=s,f=0,m=0,y=1,v=1,x=1,b=0,w="",k=i,T=w;v;)switch(c=b,b=tFt()){case 40:if(108!=c&&58==G$t(T,g-1)){-1!=z$t(T+=F$t(sFt(b),"&","&\f"),"&\f",P$t(d?o[d-1]:0))&&(x=-1);break}case 34:case 39:case 91:T+=sFt(b);break;case 9:case 10:case 13:case 32:T+=oFt(c);break;case 92:T+=lFt(X$t-1,7);continue;case 47:switch(eFt()){case 42:case 47:W$t(fFt(hFt(tFt(),X$t),e,r,l),l),5!=nFt(c||1)&&5!=nFt(eFt()||1)||!q$t(T)||" "===U$t(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*y:o[d++]=q$t(T)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+p:-1==x&&(T=F$t(T,/\f/g,"")),0<m&&(q$t(T)-g||0===y&&47===c)&&W$t(32<m?mFt(T+";",n,r,g-1,l):mFt(F$t(T," ","")+";",n,r,g-2,l),l);break;case 59:T+=";";default:if(W$t(u=gFt(T,e,r,d,p,i,o,w,k=[],h=[],g,a),a),123===b)if(0===p)pFt(T,e,u,u,k,a,g,o,h);else{switch(f){case 99:if(110===G$t(T,3))break;case 108:if(97===G$t(T,2))break;default:p=0;case 100:case 109:case 115:}p?pFt(t,u,u,n&&W$t(gFt(t,u,u,0,0,i,o,w,i,k=[],g,h),h),i,h,g,o,n?k:h):pFt(T,u,u,u,[""],h,0,o,h)}}d=p=m=0,y=x=1,w=T="",g=s;break;case 58:g=1+q$t(T),m=c;default:if(y<1)if(123==b)--y;else if(125==b&&0==y++&&125==J$t())continue;switch(T+=B$t(b),b*y){case 38:x=0<p?1:(T+="\f",-1);break;case 44:o[d++]=(q$t(T)-1)*x,x=1;break;case 64:45===eFt()&&(T+=sFt(tFt())),f=eFt(),p=g=q$t(w=T+=uFt(X$t)),b++;break;case 45:45===c&&2==q$t(T)&&(y=0)}}return a}function gFt(t,e,r,n,i,a,s,o,l,c,h,u){for(var d,p=i-1,g=0===i?a:[""],f=j$t(g),m=0,y=0;m<n;++m)for(var v,x=0,b=U$t(t,p+1,p=P$t(d=s[m]));x<f;++x)(v=$$t(0<d?g[x]+" "+b:F$t(b,/&\f/g,g[x])))&&(l[y++]=v);return Q$t(t,e,r,0===i?D$t:o,l,c,h,u)}function fFt(t,e,r,n){return Q$t(t,e,r,M$t,B$t(K$t),U$t(t,2,-2),0,n)}function mFt(t,e,r,n,i){return Q$t(t,e,r,O$t,U$t(t,0,n),U$t(t,n+1,-1),n,i)}function yFt(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function vFt(t,e,r,n){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case"@namespace":case O$t:return t.return=t.return||t.value;case M$t:return"";case"@keyframes":return t.return=t.value+"{"+yFt(t.children,n)+"}";case D$t:if(!q$t(t.value=t.props.join(",")))return""}return q$t(r=yFt(t.children,n))?t.return=t.value+"{"+r+"}":""}function xFt(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function bFt(t,e,r,n){var i;void 0!==t.insert&&(r&&(t.attr("aria-describedby",i="chart-desc-"+n),t.insert("desc",":first-child").attr("id",i).text(r)),e)&&(t.attr("aria-labelledby",i="chart-title-"+n),t.insert("title",":first-child").attr("id",i).text(e))}me(Q$t,"node"),me(function(){return K$t},"char"),me(J$t,"prev"),me(tFt,"next"),me(eFt,"peek"),me(function(){return X$t},"caret"),me(rFt,"slice"),me(nFt,"token"),me(iFt,"alloc"),me(aFt,"dealloc"),me(sFt,"delimit"),me(oFt,"whitespace"),me(lFt,"escaping"),me(cFt,"delimiter"),me(hFt,"commenter"),me(uFt,"identifier"),me(dFt,"compile"),me(pFt,"parse"),me(gFt,"ruleset"),me(fFt,"comment"),me(mFt,"declaration"),me(yFt,"serialize"),me(vFt,"stringify"),oi(),wj(),$7t(),me(xFt,"setA11yDiagramInfo"),me(bFt,"addSVGa11yTitleDescription"),mr(),rn(),rn(),Tu(),sh(),ah(),iS();var wFt=class ozt{constructor(t,e,r,n,i){this.type=t,this.text=e,this.db=r,this.parser=n,this.renderer=i}static{me(this,"Diagram")}static async fromText(t,e={}){var r=ar(),n=qc(t,r);t=eS(t)+` +`;try{Ih(n)}catch{if(!(i=Yc(n)))throw new Gc(`Diagram ${n} not found.`);var{id:i,diagram:a}=await i();Nh(i,a)}var{db:i,parser:a,renderer:s,init:o}=Ih(n);return a.parser&&(a.parser.yy=i),i.clear?.(),o?.(r),e.title&&i.setDiagramTitle?.(e.title),await a.parse(t),new ozt(n,t,i,a,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},kFt=(Oc(),[]),TFt=me(()=>{kFt.forEach(t=>{t()}),kFt=[]},"attachFunctions"),EFt=(t(),me(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function CFt(t){var e,r,n=t.match($c);return n?(r={},(e="object"!=typeof(e=$9(n[1],{schema:B9})??{})||Array.isArray(e)?{}:e).displayMode&&(r.displayMode=e.displayMode.toString()),e.title&&(r.title=e.title.toString()),e.config&&(r.config=e.config),{text:t.slice(n[0].length),metadata:r}):{text:t,metadata:{}}}ih(),F9(),me(CFt,"extractFrontMatter"),iS();var SFt=me(t=>t.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),_Ft=me(t=>{var{text:t,metadata:e}=CFt(t),{displayMode:e,title:r,config:n={}}=e;return e&&(n.gantt||(n.gantt={}),n.gantt.displayMode=e),{title:r,config:n,text:t}},"processFrontmatter"),AFt=me(t=>{var e=tS.detectInit(t)??{},r=tS.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:OC(t),directive:e}},"processDirectives");function LFt(t){var e=SFt(t),e=_Ft(e),r=AFt(e.text),n=SC(e.config,r.directive);return{code:t=EFt(r.text),title:e.title,config:n}}function NFt(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}me(LFt,"preprocessDiagram"),ch(),Qr(),iS(),me(NFt,"toBase64");var IFt=["foreignobject"],RFt=["dominant-baseline"];function MFt(t){return t=LFt(t),lr(),or(t.config??{}),t}async function DFt(t,e){I$t();try{var{code:r,config:n}=MFt(t);return{diagramType:(await jFt(r)).type,config:n}}catch(t){if(e?.suppressErrors)return!1;throw t}}me(MFt,"processAndSetConfigs"),me(DFt,"parse");var OFt=me((t,e,r=[])=>` +.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),PFt=me((e,r=new Map)=>{let n="";if(void 0!==e.themeCSS&&(n+=` +`+e.themeCSS),void 0!==e.fontFamily&&(n+=` +:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=` +:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let t=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(e=>{bj(e.styles)||t.forEach(t=>{n+=OFt(e.id,t,e.styles)}),bj(e.textStyles)||(n+=OFt(e.id,"tspan",(e?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return n},"createCssStyles"),BFt=me((t,e,r,n)=>(r=PFt(t,r),yFt(dFt(n+`{${rh(e,r,t.themeVariables)}}`),vFt)),"createUserStyles"),$Ft=me((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(n=rS(n)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),FFt=me((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${NFt(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups"> + The "iframe" tag is not supported by your browser. +</iframe>`,"putIntoIFrame"),zFt=me((t,e,r,n,i)=>{var a=t.append("div"),r=(a.attr("id",r),n&&a.attr("style",n),a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return i&&r.attr("xmlns:xlink",i),r.append("g"),t},"appendDivSvgG");function GFt(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}me(GFt,"sandboxedIframe");var UFt=me((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),KBt=me(async function(t,e,r){I$t();var n=MFt(e),i=(e=n.code,ar());D.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+t,s="i"+t,o="#"+s,l="d"+t,c="#"+l,h=me(()=>{var t=H(d?o:c).node();t&&"remove"in t&&t.remove()},"removeTempElements"),u=H("body"),d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,g=i.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=GFt(H(r),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H(r),zFt(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(UFt(document,t,l,s),d?(y=GFt(H("body"),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H("body"),zFt(u,t,l));let f,m;try{f=await wFt.fromText(e,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await wFt.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(n=r.firstChild).firstChild,v=f.renderer.getClasses?.(e,f),v=BFt(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(e,t,L7t.version,f)}catch(r){throw i.suppressErrorRendering?h():m$t.draw(e,t,L7t.version),r}WFt(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=u.select(c).node().innerHTML;if(D.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),b=$Ft(b,d,fc(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=FFt(b,v)):p||(b=si.sanitize(b,{ADD_TAGS:IFt,ADD_ATTR:RFt,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),TFt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function qFt(t={}){(t=At({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),er(t),t?.theme&&t.theme in ze?t.themeVariables=ze[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ze.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?tr(t):nr(),It(t.logLevel),I$t()}me(qFt,"initialize");var jFt=me((t,e={})=>(t=LFt(t).code,wFt.fromText(t,e)),"getDiagramFromText");function WFt(t,e,r,n){xFt(e,t),bFt(e,r,n,e.attr("id"))}me(WFt,"addA11yInfo");var YFt=Object.freeze({render:KBt,parse:DFt,getDiagramFromText:jFt,initialize:qFt,getConfig:ar,setConfig:ir,getSiteConfig:nr,updateSiteConfig:rr,reset:me(()=>{lr()},"reset"),globalReset:me(()=>{lr(Ve)},"globalReset"),defaultConfig:Ve}),HFt=(It(ar().logLevel),lr(ar()),cct(),iS(),me((t,e,r)=>{D.warn(t),CC(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError")),VFt=me(async function(e={querySelector:".mermaid"}){try{await XFt(e)}catch(t){if(CC(t)&&D.error(t.str),azt.parseError&&azt.parseError(t),!e.suppressErrors)throw D.error("Use the suppressErrors option to suppress these errors"),t}},"run"),XFt=me(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var n=YFt.getConfig();D.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}D.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(D.debug("Start On Load: "+n?.startOnLoad),YFt.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,s=new tS.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o=[];for(a of Array.from(i))if(D.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=a.innerHTML,h=(c=Bc(tS.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>"),tS.detectInit(c));h&&D.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await nzt(l,c,a);a.innerHTML=u,t&&await t(l),d&&d(a)}catch(t){HFt(t,o,azt.parseError)}}if(0<o.length)throw o[0]},"runThrowsErrors"),KFt=me(function(t){YFt.initialize(t)},"initialize"),b=me(async function(t,e,r){D.warn("mermaid.init is deprecated. Please use run instead."),t&&KFt(t),t={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof e?t.querySelector=e:e&&(e instanceof HTMLElement?t.nodes=[e]:t.nodes=e),await VFt(t)},"init"),KBt=me(async(t,{lazyLoad:e=!0}={})=>{I$t(),jc(...t),!1===e&&await R$t()},"registerExternalDiagrams"),ZFt=me(function(){azt.startOnLoad&&YFt.getConfig().startOnLoad&&azt.run().catch(t=>D.error("Mermaid failed to initialize",t))},"contentLoaded"),QFt=(typeof document<"u"&&window.addEventListener("load",ZFt,!1),me(function(t){azt.parseError=t},"setParseErrorHandler")),JFt=[],tzt=!1,ezt=me(async()=>{if(!tzt){for(tzt=!0;0<JFt.length;){var t=JFt.shift();if(t)try{await t()}catch(t){D.error("Error executing queue",t)}}tzt=!1}},"executeQueue"),rzt=me(async(a,s)=>new Promise((n,i)=>{var t=me(()=>new Promise((e,r)=>{YFt.parse(a,s).then(t=>{e(t),n(t)},t=>{D.error("Error parsing",t),azt.parseError?.(t),r(t),i(t)})}),"performCall");JFt.push(t),ezt().catch(i)}),"parse"),nzt=me((a,s,o)=>new Promise((n,i)=>{var t=me(()=>new Promise((e,r)=>{YFt.render(a,s,o).then(t=>{e(t),n(t)},t=>{D.error("Error parsing",t),azt.parseError?.(t),r(t),i(t)})}),"performCall");JFt.push(t),ezt().catch(i)}),"render"),izt=me(()=>Object.keys(Uc).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),azt={startOnLoad:!0,mermaidAPI:YFt,parse:rzt,render:nzt,init:b,run:VFt,registerExternalDiagrams:KBt,registerLayoutLoaders:Wlt,initialize:KFt,parseError:void 0,contentLoaded:ZFt,setParseErrorHandler:QFt,detectType:qc,registerIconPacks:Ic,getRegisteredDiagramsMetadata:izt},szt=azt,rzt=WBt;return G(R({},"__esModule",{value:!0}),rzt)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default; diff --git a/themes/tabi-lean/static/js/searchElasticlunr.js b/themes/tabi-lean/static/js/searchElasticlunr.js new file mode 100644 index 0000000..9ad09e1 --- /dev/null +++ b/themes/tabi-lean/static/js/searchElasticlunr.js @@ -0,0 +1,3201 @@ +/** + * elasticlunr - http://weixsong.github.io + * Lightweight full-text search engine in Javascript for browser search and offline search. - 0.9.5 + * + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + * MIT Licensed + * @license + */ +(function () { + /*! + * elasticlunr.js + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + */ + + /** + * Convenience function for instantiating a new elasticlunr index and configuring it + * with the default pipeline functions and the passed config function. + * + * When using this convenience function a new index will be created with the + * following functions already in the pipeline: + * + * 1. elasticlunr.trimmer - trim non-word character + * 2. elasticlunr.StopWordFilter - filters out any stop words before they enter the + * index + * 3. elasticlunr.stemmer - stems the tokens before entering the index. + * + * + * Example: + * + * var idx = elasticlunr(function () { + * this.addField('id'); + * this.addField('title'); + * this.addField('body'); + * + * //this.setRef('id'); // default ref is 'id' + * + * this.pipeline.add(function () { + * // some custom pipeline function + * }); + * }); + * + * idx.addDoc({ + * id: 1, + * title: 'Oracle released database 12g', + * body: 'Yestaday, Oracle has released their latest database, named 12g, more robust. this product will increase Oracle profit.' + * }); + * + * idx.addDoc({ + * id: 2, + * title: 'Oracle released annual profit report', + * body: 'Yestaday, Oracle has released their annual profit report of 2015, total profit is 12.5 Billion.' + * }); + * + * # simple search + * idx.search('oracle database'); + * + * # search with query-time boosting + * idx.search('oracle database', {fields: {title: {boost: 2}, body: {boost: 1}}}); + * + * @param {Function} config A function that will be called with the new instance + * of the elasticlunr.Index as both its context and first parameter. It can be used to + * customize the instance of new elasticlunr.Index. + * @namespace + * @module + * @return {elasticlunr.Index} + * + */ + const elasticlunr = function (config) { + const idx = new elasticlunr.Index(); + + idx.pipeline.add( + elasticlunr.trimmer, + elasticlunr.stopWordFilter, + elasticlunr.stemmer + ); + + if (config) config.call(idx, idx); + + return idx; + }; + + elasticlunr.version = '0.9.5'; + + // only used this to make elasticlunr.js compatible with lunr-languages + // this is a trick to define a global alias of elasticlunr + lunr = elasticlunr; + + /*! + * elasticlunr.utils + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + */ + + /** + * A namespace containing utils for the rest of the elasticlunr library + */ + elasticlunr.utils = {}; + + /** + * Print a warning message to the console. + * + * @param {String} message The message to be printed. + * @memberOf Utils + */ + elasticlunr.utils.warn = (function (global) { + return function (message) { + if (global.console && console.warn) { + console.warn(message); + } + }; + })(this); + + /** + * Convert an object to string. + * + * In the case of `null` and `undefined` the function returns + * an empty string, in all other cases the result of calling + * `toString` on the passed object is returned. + * + * @param {object} obj The object to convert to a string. + * @return {String} string representation of the passed object. + * @memberOf Utils + */ + elasticlunr.utils.toString = function (obj) { + if (obj === void 0 || obj === null) { + return ''; + } + + return obj.toString(); + }; + /*! + * elasticlunr.EventEmitter + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + */ + + /** + * elasticlunr.EventEmitter is an event emitter for elasticlunr. + * It manages adding and removing event handlers and triggering events and their handlers. + * + * Each event could has multiple corresponding functions, + * these functions will be called as the sequence that they are added into the event. + * + * @constructor + */ + elasticlunr.EventEmitter = function () { + this.events = {}; + }; + + /** + * Binds a handler function to a specific event(s). + * + * Can bind a single function to many different events in one call. + * + * @param {String} [eventName] The name(s) of events to bind this function to. + * @param {Function} fn The function to call when an event is fired. + * @memberOf EventEmitter + */ + elasticlunr.EventEmitter.prototype.addListener = function () { + const args = Array.prototype.slice.call(arguments); + const fn = args.pop(); + const names = args; + + if (typeof fn !== 'function') + throw new TypeError('last argument must be a function'); + + names.forEach(function (name) { + if (!this.hasHandler(name)) this.events[name] = []; + this.events[name].push(fn); + }, this); + }; + + /** + * Removes a handler function from a specific event. + * + * @param {String} eventName The name of the event to remove this function from. + * @param {Function} fn The function to remove from an event. + * @memberOf EventEmitter + */ + elasticlunr.EventEmitter.prototype.removeListener = function (name, fn) { + if (!this.hasHandler(name)) return; + + const fnIndex = this.events[name].indexOf(fn); + if (fnIndex === -1) return; + + this.events[name].splice(fnIndex, 1); + + if (this.events[name].length === 0) delete this.events[name]; + }; + + /** + * Call all functions that bounded to the given event. + * + * Additional data can be passed to the event handler as arguments to `emit` + * after the event name. + * + * @param {String} eventName The name of the event to emit. + * @memberOf EventEmitter + */ + elasticlunr.EventEmitter.prototype.emit = function (name) { + if (!this.hasHandler(name)) return; + + const args = Array.prototype.slice.call(arguments, 1); + + this.events[name].forEach(function (fn) { + fn.apply(undefined, args); + }, this); + }; + + /** + * Checks whether a handler has ever been stored against an event. + * + * @param {String} eventName The name of the event to check. + * @private + * @memberOf EventEmitter + */ + elasticlunr.EventEmitter.prototype.hasHandler = function (name) { + return name in this.events; + }; + /*! + * elasticlunr.tokenizer + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + */ + + /** + * A function for splitting a string into tokens. + * Currently English is supported as default. + * Uses `elasticlunr.tokenizer.seperator` to split strings, you could change + * the value of this property to set how you want strings are split into tokens. + * IMPORTANT: use elasticlunr.tokenizer.seperator carefully, if you are not familiar with + * text process, then you'd better not change it. + * + * @module + * @param {String} str The string that you want to tokenize. + * @see elasticlunr.tokenizer.seperator + * @return {Array} + */ + elasticlunr.tokenizer = function (str) { + if (!arguments.length || str === null || str === undefined) return []; + if (Array.isArray(str)) { + let arr = str.filter(function (token) { + if (token === null || token === undefined) { + return false; + } + + return true; + }); + + arr = arr.map(function (t) { + return elasticlunr.utils.toString(t).toLowerCase(); + }); + + let out = []; + arr.forEach(function (item) { + const tokens = item.split(elasticlunr.tokenizer.seperator); + out = out.concat(tokens); + }, this); + + return out; + } + + return str + .toString() + .trim() + .toLowerCase() + .split(elasticlunr.tokenizer.seperator); + }; + + /** + * Default string seperator. + */ + elasticlunr.tokenizer.defaultSeperator = /[\s-]+/; + + /** + * The sperator used to split a string into tokens. Override this property to change the behaviour of + * `elasticlunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens. + * + * @static + * @see elasticlunr.tokenizer + */ + elasticlunr.tokenizer.seperator = elasticlunr.tokenizer.defaultSeperator; + + /** + * Set up customized string seperator + * + * @param {Object} sep The customized seperator that you want to use to tokenize a string. + */ + elasticlunr.tokenizer.setSeperator = function (sep) { + if (sep !== null && sep !== undefined && typeof sep === 'object') { + elasticlunr.tokenizer.seperator = sep; + } + }; + + /** + * Reset string seperator + * + */ + elasticlunr.tokenizer.resetSeperator = function () { + elasticlunr.tokenizer.seperator = elasticlunr.tokenizer.defaultSeperator; + }; + + /** + * Get string seperator + * + */ + elasticlunr.tokenizer.getSeperator = function () { + return elasticlunr.tokenizer.seperator; + }; + /*! + * elasticlunr.Pipeline + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + */ + + /** + * elasticlunr.Pipelines maintain an ordered list of functions to be applied to + * both documents tokens and query tokens. + * + * An instance of elasticlunr.Index will contain a pipeline + * with a trimmer, a stop word filter, an English stemmer. Extra + * functions can be added before or after either of these functions or these + * default functions can be removed. + * + * When run the pipeline, it will call each function in turn. + * + * The output of the functions in the pipeline will be passed to the next function + * in the pipeline. To exclude a token from entering the index the function + * should return undefined, the rest of the pipeline will not be called with + * this token. + * + * For serialisation of pipelines to work, all functions used in an instance of + * a pipeline should be registered with elasticlunr.Pipeline. Registered functions can + * then be loaded. If trying to load a serialised pipeline that uses functions + * that are not registered an error will be thrown. + * + * If not planning on serialising the pipeline then registering pipeline functions + * is not necessary. + * + * @constructor + */ + elasticlunr.Pipeline = function () { + this._queue = []; + }; + + elasticlunr.Pipeline.registeredFunctions = {}; + + /** + * Register a function in the pipeline. + * + * Functions that are used in the pipeline should be registered if the pipeline + * needs to be serialised, or a serialised pipeline needs to be loaded. + * + * Registering a function does not add it to a pipeline, functions must still be + * added to instances of the pipeline for them to be used when running a pipeline. + * + * @param {Function} fn The function to register. + * @param {String} label The label to register this function with + * @memberOf Pipeline + */ + elasticlunr.Pipeline.registerFunction = function (fn, label) { + if (label in elasticlunr.Pipeline.registeredFunctions) { + elasticlunr.utils.warn( + 'Overwriting existing registered function: ' + label + ); + } + + fn.label = label; + elasticlunr.Pipeline.registeredFunctions[label] = fn; + }; + + /** + * Get a registered function in the pipeline. + * + * @param {String} label The label of registered function. + * @return {Function} + * @memberOf Pipeline + */ + elasticlunr.Pipeline.getRegisteredFunction = function (label) { + if (label in elasticlunr.Pipeline.registeredFunctions !== true) { + return null; + } + + return elasticlunr.Pipeline.registeredFunctions[label]; + }; + + /** + * Warns if the function is not registered as a Pipeline function. + * + * @param {Function} fn The function to check for. + * @private + * @memberOf Pipeline + */ + elasticlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) { + const isRegistered = fn.label && fn.label in this.registeredFunctions; + + if (!isRegistered) { + elasticlunr.utils.warn( + 'Function is not registered with pipeline. This may cause problems when serialising the index.\n', + fn + ); + } + }; + + /** + * Loads a previously serialised pipeline. + * + * All functions to be loaded must already be registered with elasticlunr.Pipeline. + * If any function from the serialised data has not been registered then an + * error will be thrown. + * + * @param {Object} serialised The serialised pipeline to load. + * @return {elasticlunr.Pipeline} + * @memberOf Pipeline + */ + elasticlunr.Pipeline.load = function (serialised) { + const pipeline = new elasticlunr.Pipeline(); + + serialised.forEach(function (fnName) { + const fn = elasticlunr.Pipeline.getRegisteredFunction(fnName); + + if (fn) { + pipeline.add(fn); + } else { + throw new Error('Cannot load un-registered function: ' + fnName); + } + }); + + return pipeline; + }; + + /** + * Adds new functions to the end of the pipeline. + * + * Logs a warning if the function has not been registered. + * + * @param {Function} functions Any number of functions to add to the pipeline. + * @memberOf Pipeline + */ + elasticlunr.Pipeline.prototype.add = function () { + const fns = Array.prototype.slice.call(arguments); + + fns.forEach(function (fn) { + elasticlunr.Pipeline.warnIfFunctionNotRegistered(fn); + this._queue.push(fn); + }, this); + }; + + /** + * Adds a single function after a function that already exists in the + * pipeline. + * + * Logs a warning if the function has not been registered. + * If existingFn is not found, throw an Exception. + * + * @param {Function} existingFn A function that already exists in the pipeline. + * @param {Function} newFn The new function to add to the pipeline. + * @memberOf Pipeline + */ + elasticlunr.Pipeline.prototype.after = function (existingFn, newFn) { + elasticlunr.Pipeline.warnIfFunctionNotRegistered(newFn); + + const pos = this._queue.indexOf(existingFn); + if (pos === -1) { + throw new Error('Cannot find existingFn'); + } + + this._queue.splice(pos + 1, 0, newFn); + }; + + /** + * Adds a single function before a function that already exists in the + * pipeline. + * + * Logs a warning if the function has not been registered. + * If existingFn is not found, throw an Exception. + * + * @param {Function} existingFn A function that already exists in the pipeline. + * @param {Function} newFn The new function to add to the pipeline. + * @memberOf Pipeline + */ + elasticlunr.Pipeline.prototype.before = function (existingFn, newFn) { + elasticlunr.Pipeline.warnIfFunctionNotRegistered(newFn); + + const pos = this._queue.indexOf(existingFn); + if (pos === -1) { + throw new Error('Cannot find existingFn'); + } + + this._queue.splice(pos, 0, newFn); + }; + + /** + * Removes a function from the pipeline. + * + * @param {Function} fn The function to remove from the pipeline. + * @memberOf Pipeline + */ + elasticlunr.Pipeline.prototype.remove = function (fn) { + const pos = this._queue.indexOf(fn); + if (pos === -1) { + return; + } + + this._queue.splice(pos, 1); + }; + + /** + * Runs the current list of functions that registered in the pipeline against the + * input tokens. + * + * @param {Array} tokens The tokens to run through the pipeline. + * @return {Array} + * @memberOf Pipeline + */ + elasticlunr.Pipeline.prototype.run = function (tokens) { + const out = []; + const tokenLength = tokens.length; + const pipelineLength = this._queue.length; + + for (let i = 0; i < tokenLength; i++) { + let token = tokens[i]; + + for (let j = 0; j < pipelineLength; j++) { + token = this._queue[j](token, i, tokens); + if (token === void 0 || token === null) break; + } + + if (token !== void 0 && token !== null) out.push(token); + } + + return out; + }; + + /** + * Resets the pipeline by removing any existing processors. + * + * @memberOf Pipeline + */ + elasticlunr.Pipeline.prototype.reset = function () { + this._queue = []; + }; + + /** + * Get the pipeline if user want to check the pipeline. + * + * @memberOf Pipeline + */ + elasticlunr.Pipeline.prototype.get = function () { + return this._queue; + }; + + /** + * Returns a representation of the pipeline ready for serialisation. + * Only serialize pipeline function's name. Not storing function, so when + * loading the archived JSON index file, corresponding pipeline function is + * added by registered function of elasticlunr.Pipeline.registeredFunctions + * + * Logs a warning if the function has not been registered. + * + * @return {Array} + * @memberOf Pipeline + */ + elasticlunr.Pipeline.prototype.toJSON = function () { + return this._queue.map(function (fn) { + elasticlunr.Pipeline.warnIfFunctionNotRegistered(fn); + return fn.label; + }); + }; + /*! + * elasticlunr.Index + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + */ + + /** + * elasticlunr.Index is object that manages a search index. It contains the indexes + * and stores all the tokens and document lookups. It also provides the main + * user facing API for the library. + * + * @constructor + */ + elasticlunr.Index = function () { + this._fields = []; + this._ref = 'id'; + this.pipeline = new elasticlunr.Pipeline(); + this.documentStore = new elasticlunr.DocumentStore(); + this.index = {}; + this.eventEmitter = new elasticlunr.EventEmitter(); + this._idfCache = {}; + + this.on( + 'add', + 'remove', + 'update', + function () { + this._idfCache = {}; + }.bind(this) + ); + }; + + /** + * Bind a handler to events being emitted by the index. + * + * The handler can be bound to many events at the same time. + * + * @param {String} [eventName] The name(s) of events to bind the function to. + * @param {Function} fn The serialised set to load. + * @memberOf Index + */ + elasticlunr.Index.prototype.on = function () { + const args = Array.prototype.slice.call(arguments); + return this.eventEmitter.addListener.apply(this.eventEmitter, args); + }; + + /** + * Removes a handler from an event being emitted by the index. + * + * @param {String} eventName The name of events to remove the function from. + * @param {Function} fn The serialised set to load. + * @memberOf Index + */ + elasticlunr.Index.prototype.off = function (name, fn) { + return this.eventEmitter.removeListener(name, fn); + }; + + /** + * Loads a previously serialised index. + * + * Issues a warning if the index being imported was serialised + * by a different version of elasticlunr. + * + * @param {Object} serialisedData The serialised set to load. + * @return {elasticlunr.Index} + * @memberOf Index + */ + elasticlunr.Index.load = function (serialisedData) { + if (serialisedData.version !== elasticlunr.version) { + elasticlunr.utils.warn( + 'version mismatch: current ' + + elasticlunr.version + + ' importing ' + + serialisedData.version + ); + } + + const idx = new this(); + + idx._fields = serialisedData.fields; + idx._ref = serialisedData.ref; + idx.documentStore = elasticlunr.DocumentStore.load( + serialisedData.documentStore + ); + idx.pipeline = elasticlunr.Pipeline.load(serialisedData.pipeline); + idx.index = {}; + for (const field in serialisedData.index) { + idx.index[field] = elasticlunr.InvertedIndex.load( + serialisedData.index[field] + ); + } + + return idx; + }; + + /** + * Adds a field to the list of fields that will be searchable within documents in the index. + * + * Remember that inner index is build based on field, which means each field has one inverted index. + * + * Fields should be added before any documents are added to the index, fields + * that are added after documents are added to the index will only apply to new + * documents added to the index. + * + * @param {String} fieldName The name of the field within the document that should be indexed + * @return {elasticlunr.Index} + * @memberOf Index + */ + elasticlunr.Index.prototype.addField = function (fieldName) { + this._fields.push(fieldName); + this.index[fieldName] = new elasticlunr.InvertedIndex(); + return this; + }; + + /** + * Sets the property used to uniquely identify documents added to the index, + * by default this property is 'id'. + * + * This should only be changed before adding documents to the index, changing + * the ref property without resetting the index can lead to unexpected results. + * + * @param {String} refName The property to use to uniquely identify the + * documents in the index. + * @param {Boolean} emitEvent Whether to emit add events, defaults to true + * @return {elasticlunr.Index} + * @memberOf Index + */ + elasticlunr.Index.prototype.setRef = function (refName) { + this._ref = refName; + return this; + }; + + /** + * + * Set if the JSON format original documents are save into elasticlunr.DocumentStore + * + * Defaultly save all the original JSON documents. + * + * @param {Boolean} save Whether to save the original JSON documents. + * @return {elasticlunr.Index} + * @memberOf Index + */ + elasticlunr.Index.prototype.saveDocument = function (save) { + this.documentStore = new elasticlunr.DocumentStore(save); + return this; + }; + + /** + * Add a JSON format document to the index. + * + * This is the way new documents enter the index, this function will run the + * fields from the document through the index's pipeline and then add it to + * the index, it will then show up in search results. + * + * An 'add' event is emitted with the document that has been added and the index + * the document has been added to. This event can be silenced by passing false + * as the second argument to add. + * + * @param {Object} doc The JSON format document to add to the index. + * @param {Boolean} emitEvent Whether or not to emit events, default true. + * @memberOf Index + */ + elasticlunr.Index.prototype.addDoc = function (doc, emitEvent) { + if (!doc) return; + var emitEvent = emitEvent === undefined ? true : emitEvent; + + const docRef = doc[this._ref]; + + this.documentStore.addDoc(docRef, doc); + this._fields.forEach(function (field) { + const fieldTokens = this.pipeline.run(elasticlunr.tokenizer(doc[field])); + this.documentStore.addFieldLength(docRef, field, fieldTokens.length); + + const tokenCount = {}; + fieldTokens.forEach(function (token) { + if (token in tokenCount) tokenCount[token] += 1; + else tokenCount[token] = 1; + }, this); + + for (const token in tokenCount) { + let termFrequency = tokenCount[token]; + termFrequency = Math.sqrt(termFrequency); + this.index[field].addToken(token, { ref: docRef, tf: termFrequency }); + } + }, this); + + if (emitEvent) this.eventEmitter.emit('add', doc, this); + }; + + /** + * Removes a document from the index by doc ref. + * + * To make sure documents no longer show up in search results they can be + * removed from the index using this method. + * + * A 'remove' event is emitted with the document that has been removed and the index + * the document has been removed from. This event can be silenced by passing false + * as the second argument to remove. + * + * If user setting DocumentStore not storing the documents, then remove doc by docRef is not allowed. + * + * @param {String|Integer} docRef The document ref to remove from the index. + * @param {Boolean} emitEvent Whether to emit remove events, defaults to true + * @memberOf Index + */ + elasticlunr.Index.prototype.removeDocByRef = function (docRef, emitEvent) { + if (!docRef) return; + if (this.documentStore.isDocStored() === false) { + return; + } + + if (!this.documentStore.hasDoc(docRef)) return; + const doc = this.documentStore.getDoc(docRef); + this.removeDoc(doc, false); + }; + + /** + * Removes a document from the index. + * This remove operation could work even the original doc is not store in the DocumentStore. + * + * To make sure documents no longer show up in search results they can be + * removed from the index using this method. + * + * A 'remove' event is emitted with the document that has been removed and the index + * the document has been removed from. This event can be silenced by passing false + * as the second argument to remove. + * + * + * @param {Object} doc The document ref to remove from the index. + * @param {Boolean} emitEvent Whether to emit remove events, defaults to true + * @memberOf Index + */ + elasticlunr.Index.prototype.removeDoc = function (doc, emitEvent) { + if (!doc) return; + + var emitEvent = emitEvent === undefined ? true : emitEvent; + + const docRef = doc[this._ref]; + if (!this.documentStore.hasDoc(docRef)) return; + + this.documentStore.removeDoc(docRef); + + this._fields.forEach(function (field) { + const fieldTokens = this.pipeline.run(elasticlunr.tokenizer(doc[field])); + fieldTokens.forEach(function (token) { + this.index[field].removeToken(token, docRef); + }, this); + }, this); + + if (emitEvent) this.eventEmitter.emit('remove', doc, this); + }; + + /** + * Updates a document in the index. + * + * When a document contained within the index gets updated, fields changed, + * added or removed, to make sure it correctly matched against search queries, + * it should be updated in the index. + * + * This method is just a wrapper around `remove` and `add` + * + * An 'update' event is emitted with the document that has been updated and the index. + * This event can be silenced by passing false as the second argument to update. Only + * an update event will be fired, the 'add' and 'remove' events of the underlying calls + * are silenced. + * + * @param {Object} doc The document to update in the index. + * @param {Boolean} emitEvent Whether to emit update events, defaults to true + * @see Index.prototype.remove + * @see Index.prototype.add + * @memberOf Index + */ + elasticlunr.Index.prototype.updateDoc = function (doc, emitEvent) { + var emitEvent = emitEvent === undefined ? true : emitEvent; + + this.removeDocByRef(doc[this._ref], false); + this.addDoc(doc, false); + + if (emitEvent) this.eventEmitter.emit('update', doc, this); + }; + + /** + * Calculates the inverse document frequency for a token within the index of a field. + * + * @param {String} token The token to calculate the idf of. + * @param {String} field The field to compute idf. + * @see Index.prototype.idf + * @private + * @memberOf Index + */ + elasticlunr.Index.prototype.idf = function (term, field) { + const cacheKey = '@' + field + '/' + term; + if (Object.prototype.hasOwnProperty.call(this._idfCache, cacheKey)) + return this._idfCache[cacheKey]; + + const df = this.index[field].getDocFreq(term); + const idf = 1 + Math.log(this.documentStore.length / (df + 1)); + this._idfCache[cacheKey] = idf; + + return idf; + }; + + /** + * get fields of current index instance + * + * @return {Array} + */ + elasticlunr.Index.prototype.getFields = function () { + return this._fields.slice(); + }; + + /** + * Searches the index using the passed query. + * Queries should be a string, multiple words are allowed. + * + * If config is null, will search all fields defaultly, and lead to OR based query. + * If config is specified, will search specified with query time boosting. + * + * All query tokens are passed through the same pipeline that document tokens + * are passed through, so any language processing involved will be run on every + * query term. + * + * Each query term is expanded, so that the term 'he' might be expanded to + * 'hello' and 'help' if those terms were already included in the index. + * + * Matching documents are returned as an array of objects, each object contains + * the matching document ref, as set for this index, and the similarity score + * for this document against the query. + * + * @param {String} query The query to search the index with. + * @param {JSON} userConfig The user query config, JSON format. + * @return {Object} + * @see Index.prototype.idf + * @see Index.prototype.documentVector + * @memberOf Index + */ + elasticlunr.Index.prototype.search = function (query, userConfig) { + if (!query) return []; + if (typeof query === 'string') { + query = { any: query }; + } else { + query = JSON.parse(JSON.stringify(query)); + } + + let configStr = null; + if (userConfig != null) { + configStr = JSON.stringify(userConfig); + } + + const config = new elasticlunr.Configuration(configStr, this.getFields()).get(); + + const queryTokens = {}; + const queryFields = Object.keys(query); + + for (let i = 0; i < queryFields.length; i++) { + const key = queryFields[i]; + + queryTokens[key] = this.pipeline.run(elasticlunr.tokenizer(query[key])); + } + + const queryResults = {}; + + for (const field in config) { + const tokens = queryTokens[field] || queryTokens.any; + if (!tokens) { + continue; + } + + const fieldSearchResults = this.fieldSearch(tokens, field, config); + const fieldBoost = config[field].boost; + + for (var docRef in fieldSearchResults) { + fieldSearchResults[docRef] = fieldSearchResults[docRef] * fieldBoost; + } + + for (var docRef in fieldSearchResults) { + if (docRef in queryResults) { + queryResults[docRef] += fieldSearchResults[docRef]; + } else { + queryResults[docRef] = fieldSearchResults[docRef]; + } + } + } + + const results = []; + let result; + for (var docRef in queryResults) { + result = { ref: docRef, score: queryResults[docRef] }; + if (this.documentStore.hasDoc(docRef)) { + result.doc = this.documentStore.getDoc(docRef); + } + results.push(result); + } + + results.sort(function (a, b) { + return b.score - a.score; + }); + return results; + }; + + /** + * search queryTokens in specified field. + * + * @param {Array} queryTokens The query tokens to query in this field. + * @param {String} field Field to query in. + * @param {elasticlunr.Configuration} config The user query config, JSON format. + * @return {Object} + */ + elasticlunr.Index.prototype.fieldSearch = function ( + queryTokens, + fieldName, + config + ) { + const booleanType = config[fieldName].bool; + const expand = config[fieldName].expand; + const boost = config[fieldName].boost; + let scores = null; + const docTokens = {}; + + // Do nothing if the boost is 0 + if (boost === 0) { + return; + } + + queryTokens.forEach(function (token) { + let tokens = [token]; + if (expand === true) { + tokens = this.index[fieldName].expandToken(token); + } + // Consider every query token in turn. If expanded, each query token + // corresponds to a set of tokens, which is all tokens in the + // index matching the pattern queryToken* . + // For the set of tokens corresponding to a query token, find and score + // all matching documents. Store those scores in queryTokenScores, + // keyed by docRef. + // Then, depending on the value of booleanType, combine the scores + // for this query token with previous scores. If booleanType is OR, + // then merge the scores by summing into the accumulated total, adding + // new document scores are required (effectively a union operator). + // If booleanType is AND, accumulate scores only if the document + // has previously been scored by another query token (an intersection + // operation0. + // Furthermore, since when booleanType is AND, additional + // query tokens can't add new documents to the result set, use the + // current document set to limit the processing of each new query + // token for efficiency (i.e., incremental intersection). + + const queryTokenScores = {}; + tokens.forEach(function (key) { + let docs = this.index[fieldName].getDocs(key); + const idf = this.idf(key, fieldName); + + if (scores && booleanType === 'AND') { + // special case, we can rule out documents that have been + // already been filtered out because they weren't scored + // by previous query token passes. + const filteredDocs = {}; + for (var docRef in scores) { + if (docRef in docs) { + filteredDocs[docRef] = docs[docRef]; + } + } + docs = filteredDocs; + } + // only record appeared token for retrieved documents for the + // original token, not for expaned token. + // beause for doing coordNorm for a retrieved document, coordNorm only care how many + // query token appear in that document. + // so expanded token should not be added into docTokens, if added, this will pollute the + // coordNorm + if (key === token) { + this.fieldSearchStats(docTokens, key, docs); + } + + for (var docRef in docs) { + const tf = this.index[fieldName].getTermFrequency(key, docRef); + const fieldLength = this.documentStore.getFieldLength( + docRef, + fieldName + ); + let fieldLengthNorm = 1; + if (fieldLength !== 0) { + fieldLengthNorm = 1 / Math.sqrt(fieldLength); + } + + let penality = 1; + if (key !== token) { + // currently I'm not sure if this penality is enough, + // need to do verification + penality = + (1 - (key.length - token.length) / key.length) * 0.15; + } + + const score = tf * idf * fieldLengthNorm * penality; + + if (docRef in queryTokenScores) { + queryTokenScores[docRef] += score; + } else { + queryTokenScores[docRef] = score; + } + } + }, this); + + scores = this.mergeScores(scores, queryTokenScores, booleanType); + }, this); + + scores = this.coordNorm(scores, docTokens, queryTokens.length); + return scores; + }; + + /** + * Merge the scores from one set of tokens into an accumulated score table. + * Exact operation depends on the op parameter. If op is 'AND', then only the + * intersection of the two score lists is retained. Otherwise, the union of + * the two score lists is returned. For internal use only. + * + * @param {Object} bool accumulated scores. Should be null on first call. + * @param {String} scores new scores to merge into accumScores. + * @param {Object} op merge operation (should be 'AND' or 'OR'). + * + */ + + elasticlunr.Index.prototype.mergeScores = function (accumScores, scores, op) { + if (!accumScores) { + return scores; + } + if (op === 'AND') { + const intersection = {}; + for (var docRef in scores) { + if (docRef in accumScores) { + intersection[docRef] = accumScores[docRef] + scores[docRef]; + } + } + return intersection; + } else { + for (var docRef in scores) { + if (docRef in accumScores) { + accumScores[docRef] += scores[docRef]; + } else { + accumScores[docRef] = scores[docRef]; + } + } + return accumScores; + } + }; + + /** + * Record the occuring query token of retrieved doc specified by doc field. + * Only for inner user. + * + * @param {Object} docTokens a data structure stores which token appears in the retrieved doc. + * @param {String} token query token + * @param {Object} docs the retrieved documents of the query token + * + */ + elasticlunr.Index.prototype.fieldSearchStats = function (docTokens, token, docs) { + for (const doc in docs) { + if (doc in docTokens) { + docTokens[doc].push(token); + } else { + docTokens[doc] = [token]; + } + } + }; + + /** + * coord norm the score of a doc. + * if a doc contain more query tokens, then the score will larger than the doc + * contains less query tokens. + * + * only for inner use. + * + * @param {Object} results first results + * @param {Object} docs field search results of a token + * @param {Integer} n query token number + * @return {Object} + */ + elasticlunr.Index.prototype.coordNorm = function (scores, docTokens, n) { + for (const doc in scores) { + if (!(doc in docTokens)) continue; + const tokens = docTokens[doc].length; + scores[doc] = (scores[doc] * tokens) / n; + } + + return scores; + }; + + /** + * Returns a representation of the index ready for serialisation. + * + * @return {Object} + * @memberOf Index + */ + elasticlunr.Index.prototype.toJSON = function () { + const indexJson = {}; + this._fields.forEach(function (field) { + indexJson[field] = this.index[field].toJSON(); + }, this); + + return { + version: elasticlunr.version, + fields: this._fields, + ref: this._ref, + documentStore: this.documentStore.toJSON(), + index: indexJson, + pipeline: this.pipeline.toJSON(), + }; + }; + + /** + * Applies a plugin to the current index. + * + * A plugin is a function that is called with the index as its context. + * Plugins can be used to customise or extend the behaviour the index + * in some way. A plugin is just a function, that encapsulated the custom + * behaviour that should be applied to the index. + * + * The plugin function will be called with the index as its argument, additional + * arguments can also be passed when calling use. The function will be called + * with the index as its context. + * + * Example: + * + * var myPlugin = function (idx, arg1, arg2) { + * // `this` is the index to be extended + * // apply any extensions etc here. + * } + * + * var idx = elasticlunr(function () { + * this.use(myPlugin, 'arg1', 'arg2') + * }) + * + * @param {Function} plugin The plugin to apply. + * @memberOf Index + */ + elasticlunr.Index.prototype.use = function (plugin) { + const args = Array.prototype.slice.call(arguments, 1); + args.unshift(this); + plugin.apply(this, args); + }; + /*! + * elasticlunr.DocumentStore + * Copyright (C) 2017 Wei Song + */ + + /** + * elasticlunr.DocumentStore is a simple key-value document store used for storing sets of tokens for + * documents stored in index. + * + * elasticlunr.DocumentStore store original JSON format documents that you could build search snippet by this original JSON document. + * + * user could choose whether original JSON format document should be store, if no configuration then document will be stored defaultly. + * If user care more about the index size, user could select not store JSON documents, then this will has some defects, such as user + * could not use JSON document to generate snippets of search results. + * + * @param {Boolean} save If the original JSON document should be stored. + * @constructor + * @module + */ + elasticlunr.DocumentStore = function (save) { + if (save === null || save === undefined) { + this._save = true; + } else { + this._save = save; + } + + this.docs = {}; + this.docInfo = {}; + this.length = 0; + }; + + /** + * Loads a previously serialised document store + * + * @param {Object} serialisedData The serialised document store to load. + * @return {elasticlunr.DocumentStore} + */ + elasticlunr.DocumentStore.load = function (serialisedData) { + const store = new this(); + + store.length = serialisedData.length; + store.docs = serialisedData.docs; + store.docInfo = serialisedData.docInfo; + store._save = serialisedData.save; + + return store; + }; + + /** + * check if current instance store the original doc + * + * @return {Boolean} + */ + elasticlunr.DocumentStore.prototype.isDocStored = function () { + return this._save; + }; + + /** + * Stores the given doc in the document store against the given id. + * If docRef already exist, then update doc. + * + * Document is store by original JSON format, then you could use original document to generate search snippets. + * + * @param {Integer|String} docRef The key used to store the JSON format doc. + * @param {Object} doc The JSON format doc. + */ + elasticlunr.DocumentStore.prototype.addDoc = function (docRef, doc) { + if (!this.hasDoc(docRef)) this.length++; + + if (this._save === true) { + this.docs[docRef] = clone(doc); + } else { + this.docs[docRef] = null; + } + }; + + /** + * Retrieves the JSON doc from the document store for a given key. + * + * If docRef not found, return null. + * If user set not storing the documents, return null. + * + * @param {Integer|String} docRef The key to lookup and retrieve from the document store. + * @return {Object} + * @memberOf DocumentStore + */ + elasticlunr.DocumentStore.prototype.getDoc = function (docRef) { + if (this.hasDoc(docRef) === false) return null; + return this.docs[docRef]; + }; + + /** + * Checks whether the document store contains a key (docRef). + * + * @param {Integer|String} docRef The id to look up in the document store. + * @return {Boolean} + * @memberOf DocumentStore + */ + elasticlunr.DocumentStore.prototype.hasDoc = function (docRef) { + return docRef in this.docs; + }; + + /** + * Removes the value for a key in the document store. + * + * @param {Integer|String} docRef The id to remove from the document store. + * @memberOf DocumentStore + */ + elasticlunr.DocumentStore.prototype.removeDoc = function (docRef) { + if (!this.hasDoc(docRef)) return; + + delete this.docs[docRef]; + delete this.docInfo[docRef]; + this.length--; + }; + + /** + * Add field length of a document's field tokens from pipeline results. + * The field length of a document is used to do field length normalization even without the original JSON document stored. + * + * @param {Integer|String} docRef document's id or reference + * @param {String} fieldName field name + * @param {Integer} length field length + */ + elasticlunr.DocumentStore.prototype.addFieldLength = function ( + docRef, + fieldName, + length + ) { + if (docRef === null || docRef === undefined) return; + if (this.hasDoc(docRef) == false) return; + + if (!this.docInfo[docRef]) this.docInfo[docRef] = {}; + this.docInfo[docRef][fieldName] = length; + }; + + /** + * Update field length of a document's field tokens from pipeline results. + * The field length of a document is used to do field length normalization even without the original JSON document stored. + * + * @param {Integer|String} docRef document's id or reference + * @param {String} fieldName field name + * @param {Integer} length field length + */ + elasticlunr.DocumentStore.prototype.updateFieldLength = function ( + docRef, + fieldName, + length + ) { + if (docRef === null || docRef === undefined) return; + if (this.hasDoc(docRef) == false) return; + + this.addFieldLength(docRef, fieldName, length); + }; + + /** + * get field length of a document by docRef + * + * @param {Integer|String} docRef document id or reference + * @param {String} fieldName field name + * @return {Integer} field length + */ + elasticlunr.DocumentStore.prototype.getFieldLength = function (docRef, fieldName) { + if (docRef === null || docRef === undefined) return 0; + + if (!(docRef in this.docs)) return 0; + if (!(fieldName in this.docInfo[docRef])) return 0; + return this.docInfo[docRef][fieldName]; + }; + + /** + * Returns a JSON representation of the document store used for serialisation. + * + * @return {Object} JSON format + * @memberOf DocumentStore + */ + elasticlunr.DocumentStore.prototype.toJSON = function () { + return { + docs: this.docs, + docInfo: this.docInfo, + length: this.length, + save: this._save, + }; + }; + + /** + * Cloning object + * + * @param {Object} object in JSON format + * @return {Object} copied object + */ + function clone(obj) { + if (obj === null || typeof obj !== 'object') return obj; + + const copy = obj.constructor(); + + for (const attr in obj) { + if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr]; + } + + return copy; + } + /*! + * elasticlunr.stemmer + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + */ + + /** + * elasticlunr.stemmer is an english language stemmer, this is a JavaScript + * implementation of the PorterStemmer taken from http://tartarus.org/~martin + * + * @module + * @param {String} str The string to stem + * @return {String} + * @see elasticlunr.Pipeline + */ + elasticlunr.stemmer = (function () { + const step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log', + }; + + const step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '', + }; + + const c = '[^aeiou]'; // consonant + const v = '[aeiouy]'; // vowel + const C = c + '[^aeiouy]*'; // consonant sequence + const V = v + '[aeiou]*'; // vowel sequence + + const mgr0 = '^(' + C + ')?' + V + C; // [C]VC... is m>0 + const meq1 = '^(' + C + ')?' + V + C + '(' + V + ')?$'; // [C]VC[V] is m=1 + const mgr1 = '^(' + C + ')?' + V + C + V + C; // [C]VCVC... is m>1 + const s_v = '^(' + C + ')?' + v; // vowel in stem + + const re_mgr0 = new RegExp(mgr0); + const re_mgr1 = new RegExp(mgr1); + const re_meq1 = new RegExp(meq1); + const re_s_v = new RegExp(s_v); + + const re_1a = /^(.+?)(ss|i)es$/; + const re2_1a = /^(.+?)([^s])s$/; + const re_1b = /^(.+?)eed$/; + const re2_1b = /^(.+?)(ed|ing)$/; + const re_1b_2 = /.$/; + const re2_1b_2 = /(at|bl|iz)$/; + const re3_1b_2 = new RegExp('([^aeiouylsz])\\1$'); + const re4_1b_2 = new RegExp('^' + C + v + '[^aeiouwxy]$'); + + const re_1c = /^(.+?[^aeiou])y$/; + const re_2 = + /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + + const re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + + const re_4 = + /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + const re2_4 = /^(.+?)(s|t)(ion)$/; + + const re_5 = /^(.+?)e$/; + const re_5_1 = /ll$/; + const re3_5 = new RegExp('^' + C + v + '[^aeiouwxy]$'); + + const porterStemmer = function porterStemmer(w) { + let stem, suffix, firstch, re, re2, re3, re4; + + if (w.length < 3) { + return w; + } + + firstch = w.substr(0, 1); + if (firstch == 'y') { + w = firstch.toUpperCase() + w.substr(1); + } + + // Step 1a + re = re_1a; + re2 = re2_1a; + + if (re.test(w)) { + w = w.replace(re, '$1$2'); + } else if (re2.test(w)) { + w = w.replace(re2, '$1$2'); + } + + // Step 1b + re = re_1b; + re2 = re2_1b; + if (re.test(w)) { + var fp = re.exec(w); + re = re_mgr0; + if (re.test(fp[1])) { + re = re_1b_2; + w = w.replace(re, ''); + } + } else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = re_s_v; + if (re2.test(stem)) { + w = stem; + re2 = re2_1b_2; + re3 = re3_1b_2; + re4 = re4_1b_2; + if (re2.test(w)) { + w = w + 'e'; + } else if (re3.test(w)) { + re = re_1b_2; + w = w.replace(re, ''); + } else if (re4.test(w)) { + w = w + 'e'; + } + } + } + + // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say) + re = re_1c; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem + 'i'; + } + + // Step 2 + re = re_2; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = re_mgr0; + if (re.test(stem)) { + w = stem + step2list[suffix]; + } + } + + // Step 3 + re = re_3; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = re_mgr0; + if (re.test(stem)) { + w = stem + step3list[suffix]; + } + } + + // Step 4 + re = re_4; + re2 = re2_4; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = re_mgr1; + if (re.test(stem)) { + w = stem; + } + } else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = re_mgr1; + if (re2.test(stem)) { + w = stem; + } + } + + // Step 5 + re = re_5; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = re_mgr1; + re2 = re_meq1; + re3 = re3_5; + if (re.test(stem) || (re2.test(stem) && !re3.test(stem))) { + w = stem; + } + } + + re = re_5_1; + re2 = re_mgr1; + if (re.test(w) && re2.test(w)) { + re = re_1b_2; + w = w.replace(re, ''); + } + + // and turn initial Y back to y + + if (firstch == 'y') { + w = firstch.toLowerCase() + w.substr(1); + } + + return w; + }; + + return porterStemmer; + })(); + + elasticlunr.Pipeline.registerFunction(elasticlunr.stemmer, 'stemmer'); + /*! + * elasticlunr.stopWordFilter + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + */ + + /** + * elasticlunr.stopWordFilter is an English language stop words filter, any words + * contained in the stop word list will not be passed through the filter. + * + * This is intended to be used in the Pipeline. If the token does not pass the + * filter then undefined will be returned. + * Currently this StopwordFilter using dictionary to do O(1) time complexity stop word filtering. + * + * @module + * @param {String} token The token to pass through the filter + * @return {String} + * @see elasticlunr.Pipeline + */ + elasticlunr.stopWordFilter = function (token) { + if (token && elasticlunr.stopWordFilter.stopWords[token] !== true) { + return token; + } + }; + + /** + * Remove predefined stop words + * if user want to use customized stop words, user could use this function to delete + * all predefined stopwords. + * + * @return {null} + */ + elasticlunr.clearStopWords = function () { + elasticlunr.stopWordFilter.stopWords = {}; + }; + + /** + * Add customized stop words + * user could use this function to add customized stop words + * + * @params {Array} words customized stop words + * @return {null} + */ + elasticlunr.addStopWords = function (words) { + if (words == null || Array.isArray(words) === false) return; + + words.forEach(function (word) { + elasticlunr.stopWordFilter.stopWords[word] = true; + }, this); + }; + + /** + * Reset to default stop words + * user could use this function to restore default stop words + * + * @return {null} + */ + elasticlunr.resetStopWords = function () { + elasticlunr.stopWordFilter.stopWords = elasticlunr.defaultStopWords; + }; + + elasticlunr.defaultStopWords = { + '': true, + a: true, + able: true, + about: true, + across: true, + after: true, + all: true, + almost: true, + also: true, + am: true, + among: true, + an: true, + and: true, + any: true, + are: true, + as: true, + at: true, + be: true, + because: true, + been: true, + but: true, + by: true, + can: true, + cannot: true, + could: true, + dear: true, + did: true, + do: true, + does: true, + either: true, + else: true, + ever: true, + every: true, + for: true, + from: true, + get: true, + got: true, + had: true, + has: true, + have: true, + he: true, + her: true, + hers: true, + him: true, + his: true, + how: true, + however: true, + i: true, + if: true, + in: true, + into: true, + is: true, + it: true, + its: true, + just: true, + least: true, + let: true, + like: true, + likely: true, + may: true, + me: true, + might: true, + most: true, + must: true, + my: true, + neither: true, + no: true, + nor: true, + not: true, + of: true, + off: true, + often: true, + on: true, + only: true, + or: true, + other: true, + our: true, + own: true, + rather: true, + said: true, + say: true, + says: true, + she: true, + should: true, + since: true, + so: true, + some: true, + than: true, + that: true, + the: true, + their: true, + them: true, + then: true, + there: true, + these: true, + they: true, + this: true, + tis: true, + to: true, + too: true, + twas: true, + us: true, + wants: true, + was: true, + we: true, + were: true, + what: true, + when: true, + where: true, + which: true, + while: true, + who: true, + whom: true, + why: true, + will: true, + with: true, + would: true, + yet: true, + you: true, + your: true, + }; + + elasticlunr.stopWordFilter.stopWords = elasticlunr.defaultStopWords; + + elasticlunr.Pipeline.registerFunction(elasticlunr.stopWordFilter, 'stopWordFilter'); + /*! + * elasticlunr.trimmer + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + */ + + /** + * elasticlunr.trimmer is a pipeline function for trimming non word + * characters from the begining and end of tokens before they + * enter the index. + * + * This implementation may not work correctly for non latin + * characters and should either be removed or adapted for use + * with languages with non-latin characters. + * + * @module + * @param {String} token The token to pass through the filter + * @return {String} + * @see elasticlunr.Pipeline + */ + elasticlunr.trimmer = function (token) { + if (token === null || token === undefined) { + throw new Error('token should not be undefined'); + } + + return token.replace(/^\W+/, '').replace(/\W+$/, ''); + }; + + elasticlunr.Pipeline.registerFunction(elasticlunr.trimmer, 'trimmer'); + /*! + * elasticlunr.InvertedIndex + * Copyright (C) 2017 Wei Song + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + */ + + /** + * elasticlunr.InvertedIndex is used for efficiently storing and + * lookup of documents that contain a given token. + * + * @constructor + */ + elasticlunr.InvertedIndex = function () { + this.root = { docs: {}, df: 0 }; + }; + + /** + * Loads a previously serialised inverted index. + * + * @param {Object} serialisedData The serialised inverted index to load. + * @return {elasticlunr.InvertedIndex} + */ + elasticlunr.InvertedIndex.load = function (serialisedData) { + const idx = new this(); + idx.root = serialisedData.root; + + return idx; + }; + + /** + * Adds a {token: tokenInfo} pair to the inverted index. + * If the token already exist, then update the tokenInfo. + * + * tokenInfo format: { ref: 1, tf: 2} + * tokenInfor should contains the document's ref and the tf(token frequency) of that token in + * the document. + * + * By default this function starts at the root of the current inverted index, however + * it can start at any node of the inverted index if required. + * + * @param {String} token + * @param {Object} tokenInfo format: { ref: 1, tf: 2} + * @param {Object} root An optional node at which to start looking for the + * correct place to enter the doc, by default the root of this elasticlunr.InvertedIndex + * is used. + * @memberOf InvertedIndex + */ + elasticlunr.InvertedIndex.prototype.addToken = function (token, tokenInfo, root) { + var root = root || this.root; + let idx = 0; + + while (idx <= token.length - 1) { + const key = token[idx]; + + if (!(key in root)) root[key] = { docs: {}, df: 0 }; + idx += 1; + root = root[key]; + } + + const docRef = tokenInfo.ref; + if (!root.docs[docRef]) { + // if this doc not exist, then add this doc + root.docs[docRef] = { tf: tokenInfo.tf }; + root.df += 1; + } else { + // if this doc already exist, then update tokenInfo + root.docs[docRef] = { tf: tokenInfo.tf }; + } + }; + + /** + * Checks whether a token is in this elasticlunr.InvertedIndex. + * + * + * @param {String} token The token to be checked + * @return {Boolean} + * @memberOf InvertedIndex + */ + elasticlunr.InvertedIndex.prototype.hasToken = function (token) { + if (!token) return false; + + let node = this.root; + + for (let i = 0; i < token.length; i++) { + if (!node[token[i]]) return false; + node = node[token[i]]; + } + + return true; + }; + + /** + * Retrieve a node from the inverted index for a given token. + * If token not found in this InvertedIndex, return null. + * + * + * @param {String} token The token to get the node for. + * @return {Object} + * @see InvertedIndex.prototype.get + * @memberOf InvertedIndex + */ + elasticlunr.InvertedIndex.prototype.getNode = function (token) { + if (!token) return null; + + let node = this.root; + + for (let i = 0; i < token.length; i++) { + if (!node[token[i]]) return null; + node = node[token[i]]; + } + + return node; + }; + + /** + * Retrieve the documents of a given token. + * If token not found, return {}. + * + * + * @param {String} token The token to get the documents for. + * @return {Object} + * @memberOf InvertedIndex + */ + elasticlunr.InvertedIndex.prototype.getDocs = function (token) { + const node = this.getNode(token); + if (node == null) { + return {}; + } + + return node.docs; + }; + + /** + * Retrieve term frequency of given token in given docRef. + * If token or docRef not found, return 0. + * + * + * @param {String} token The token to get the documents for. + * @param {String|Integer} docRef + * @return {Integer} + * @memberOf InvertedIndex + */ + elasticlunr.InvertedIndex.prototype.getTermFrequency = function (token, docRef) { + const node = this.getNode(token); + + if (node == null) { + return 0; + } + + if (!(docRef in node.docs)) { + return 0; + } + + return node.docs[docRef].tf; + }; + + /** + * Retrieve the document frequency of given token. + * If token not found, return 0. + * + * + * @param {String} token The token to get the documents for. + * @return {Object} + * @memberOf InvertedIndex + */ + elasticlunr.InvertedIndex.prototype.getDocFreq = function (token) { + const node = this.getNode(token); + + if (node == null) { + return 0; + } + + return node.df; + }; + + /** + * Remove the document identified by document's ref from the token in the inverted index. + * + * + * @param {String} token Remove the document from which token. + * @param {String} ref The ref of the document to remove from given token. + * @memberOf InvertedIndex + */ + elasticlunr.InvertedIndex.prototype.removeToken = function (token, ref) { + if (!token) return; + const node = this.getNode(token); + + if (node == null) return; + + if (ref in node.docs) { + delete node.docs[ref]; + node.df -= 1; + } + }; + + /** + * Find all the possible suffixes of given token using tokens currently in the inverted index. + * If token not found, return empty Array. + * + * @param {String} token The token to expand. + * @return {Array} + * @memberOf InvertedIndex + */ + elasticlunr.InvertedIndex.prototype.expandToken = function (token, memo, root) { + if (token == null || token == '') return []; + var memo = memo || []; + + if (root == void 0) { + root = this.getNode(token); + if (root == null) return memo; + } + + if (root.df > 0) memo.push(token); + + for (const key in root) { + if (key === 'docs') continue; + if (key === 'df') continue; + this.expandToken(token + key, memo, root[key]); + } + + return memo; + }; + + /** + * Returns a representation of the inverted index ready for serialisation. + * + * @return {Object} + * @memberOf InvertedIndex + */ + elasticlunr.InvertedIndex.prototype.toJSON = function () { + return { + root: this.root, + }; + }; + + /*! + * elasticlunr.Configuration + * Copyright (C) 2017 Wei Song + */ + + /** + * elasticlunr.Configuration is used to analyze the user search configuration. + * + * By elasticlunr.Configuration user could set query-time boosting, boolean model in each field. + * + * Currently configuration supports: + * 1. query-time boosting, user could set how to boost each field. + * 2. boolean model chosing, user could choose which boolean model to use for each field. + * 3. token expandation, user could set token expand to True to improve Recall. Default is False. + * + * Query time boosting must be configured by field category, "boolean" model could be configured + * by both field category or globally as the following example. Field configuration for "boolean" + * will overwrite global configuration. + * Token expand could be configured both by field category or golbally. Local field configuration will + * overwrite global configuration. + * + * configuration example: + * { + * fields:{ + * title: {boost: 2}, + * body: {boost: 1} + * }, + * bool: "OR" + * } + * + * "bool" field configuation overwrite global configuation example: + * { + * fields:{ + * title: {boost: 2, bool: "AND"}, + * body: {boost: 1} + * }, + * bool: "OR" + * } + * + * "expand" example: + * { + * fields:{ + * title: {boost: 2, bool: "AND"}, + * body: {boost: 1} + * }, + * bool: "OR", + * expand: true + * } + * + * "expand" example for field category: + * { + * fields:{ + * title: {boost: 2, bool: "AND", expand: true}, + * body: {boost: 1} + * }, + * bool: "OR" + * } + * + * setting the boost to 0 ignores the field (this will only search the title): + * { + * fields:{ + * title: {boost: 1}, + * body: {boost: 0} + * } + * } + * + * then, user could search with configuration to do query-time boosting. + * idx.search('oracle database', {fields: {title: {boost: 2}, body: {boost: 1}}}); + * + * + * @constructor + * + * @param {String} config user configuration + * @param {Array} fields fields of index instance + * @module + */ + elasticlunr.Configuration = function (config, fields) { + var config = config || ''; + + if (fields == undefined || fields == null) { + throw new Error('fields should not be null'); + } + + this.config = {}; + + let userConfig; + try { + userConfig = JSON.parse(config); + this.buildUserConfig(userConfig, fields); + } catch (error) { + elasticlunr.utils.warn( + 'user configuration parse failed, will use default configuration' + ); + this.buildDefaultConfig(fields); + } + }; + + /** + * Build default search configuration. + * + * @param {Array} fields fields of index instance + */ + elasticlunr.Configuration.prototype.buildDefaultConfig = function (fields) { + this.reset(); + fields.forEach(function (field) { + this.config[field] = { + boost: 1, + bool: 'OR', + expand: false, + }; + }, this); + }; + + /** + * Build user configuration. + * + * @param {JSON} config User JSON configuratoin + * @param {Array} fields fields of index instance + */ + elasticlunr.Configuration.prototype.buildUserConfig = function (config, fields) { + let global_bool = 'OR'; + let global_expand = false; + + this.reset(); + if ('bool' in config) { + global_bool = config.bool || global_bool; + } + + if ('expand' in config) { + global_expand = config.expand || global_expand; + } + + if ('fields' in config) { + for (const field in config.fields) { + if (fields.indexOf(field) > -1) { + const field_config = config.fields[field]; + let field_expand = global_expand; + if (field_config.expand != undefined) { + field_expand = field_config.expand; + } + + this.config[field] = { + boost: + field_config.boost || field_config.boost === 0 + ? field_config.boost + : 1, + bool: field_config.bool || global_bool, + expand: field_expand, + }; + } else { + elasticlunr.utils.warn( + 'field name in user configuration not found in index instance fields' + ); + } + } + } else { + this.addAllFields2UserConfig(global_bool, global_expand, fields); + } + }; + + /** + * Add all fields to user search configuration. + * + * @param {String} bool Boolean model + * @param {String} expand Expand model + * @param {Array} fields fields of index instance + */ + elasticlunr.Configuration.prototype.addAllFields2UserConfig = function ( + bool, + expand, + fields + ) { + fields.forEach(function (field) { + this.config[field] = { + boost: 1, + bool, + expand, + }; + }, this); + }; + + /** + * get current user configuration + */ + elasticlunr.Configuration.prototype.get = function () { + return this.config; + }; + + /** + * reset user search configuration. + */ + elasticlunr.Configuration.prototype.reset = function () { + this.config = {}; + }; + /** + * sorted_set.js is added only to make elasticlunr.js compatible with lunr-languages. + * if elasticlunr.js support different languages by default, this will make elasticlunr.js + * much bigger that not good for browser usage. + * + */ + + /*! + * lunr.SortedSet + * Copyright (C) 2017 Oliver Nightingale + */ + + /** + * lunr.SortedSets are used to maintain an array of uniq values in a sorted + * order. + * + * @constructor + */ + lunr.SortedSet = function () { + this.length = 0; + this.elements = []; + }; + + /** + * Loads a previously serialised sorted set. + * + * @param {Array} serialisedData The serialised set to load. + * @returns {lunr.SortedSet} + * @memberOf SortedSet + */ + lunr.SortedSet.load = function (serialisedData) { + const set = new this(); + + set.elements = serialisedData; + set.length = serialisedData.length; + + return set; + }; + + /** + * Inserts new items into the set in the correct position to maintain the + * order. + * + * @param {Object} The objects to add to this set. + * @memberOf SortedSet + */ + lunr.SortedSet.prototype.add = function () { + let i, element; + + for (i = 0; i < arguments.length; i++) { + element = arguments[i]; + if (~this.indexOf(element)) continue; + this.elements.splice(this.locationFor(element), 0, element); + } + + this.length = this.elements.length; + }; + + /** + * Converts this sorted set into an array. + * + * @returns {Array} + * @memberOf SortedSet + */ + lunr.SortedSet.prototype.toArray = function () { + return this.elements.slice(); + }; + + /** + * Creates a new array with the results of calling a provided function on every + * element in this sorted set. + * + * Delegates to Array.prototype.map and has the same signature. + * + * @param {Function} fn The function that is called on each element of the + * set. + * @param {Object} ctx An optional object that can be used as the context + * for the function fn. + * @returns {Array} + * @memberOf SortedSet + */ + lunr.SortedSet.prototype.map = function (fn, ctx) { + return this.elements.map(fn, ctx); + }; + + /** + * Executes a provided function once per sorted set element. + * + * Delegates to Array.prototype.forEach and has the same signature. + * + * @param {Function} fn The function that is called on each element of the + * set. + * @param {Object} ctx An optional object that can be used as the context + * @memberOf SortedSet + * for the function fn. + */ + lunr.SortedSet.prototype.forEach = function (fn, ctx) { + return this.elements.forEach(fn, ctx); + }; + + /** + * Returns the index at which a given element can be found in the + * sorted set, or -1 if it is not present. + * + * @param {Object} elem The object to locate in the sorted set. + * @returns {Number} + * @memberOf SortedSet + */ + lunr.SortedSet.prototype.indexOf = function (elem) { + let start = 0; + let end = this.elements.length; + let sectionLength = end - start; + let pivot = start + Math.floor(sectionLength / 2); + let pivotElem = this.elements[pivot]; + + while (sectionLength > 1) { + if (pivotElem === elem) return pivot; + + if (pivotElem < elem) start = pivot; + if (pivotElem > elem) end = pivot; + + sectionLength = end - start; + pivot = start + Math.floor(sectionLength / 2); + pivotElem = this.elements[pivot]; + } + + if (pivotElem === elem) return pivot; + + return -1; + }; + + /** + * Returns the position within the sorted set that an element should be + * inserted at to maintain the current order of the set. + * + * This function assumes that the element to search for does not already exist + * in the sorted set. + * + * @param {Object} elem The elem to find the position for in the set + * @returns {Number} + * @memberOf SortedSet + */ + lunr.SortedSet.prototype.locationFor = function (elem) { + let start = 0; + let end = this.elements.length; + let sectionLength = end - start; + let pivot = start + Math.floor(sectionLength / 2); + let pivotElem = this.elements[pivot]; + + while (sectionLength > 1) { + if (pivotElem < elem) start = pivot; + if (pivotElem > elem) end = pivot; + + sectionLength = end - start; + pivot = start + Math.floor(sectionLength / 2); + pivotElem = this.elements[pivot]; + } + + if (pivotElem > elem) return pivot; + if (pivotElem < elem) return pivot + 1; + }; + + /** + * Creates a new lunr.SortedSet that contains the elements in the intersection + * of this set and the passed set. + * + * @param {lunr.SortedSet} otherSet The set to intersect with this set. + * @returns {lunr.SortedSet} + * @memberOf SortedSet + */ + lunr.SortedSet.prototype.intersect = function (otherSet) { + const intersectSet = new lunr.SortedSet(); + let i = 0; + let j = 0; + const a_len = this.length; + const b_len = otherSet.length; + const a = this.elements; + const b = otherSet.elements; + + while (true) { + if (i > a_len - 1 || j > b_len - 1) break; + + if (a[i] === b[j]) { + intersectSet.add(a[i]); + i++, j++; + continue; + } + + if (a[i] < b[j]) { + i++; + continue; + } + + if (a[i] > b[j]) { + j++; + continue; + } + } + + return intersectSet; + }; + + /** + * Makes a copy of this set + * + * @returns {lunr.SortedSet} + * @memberOf SortedSet + */ + lunr.SortedSet.prototype.clone = function () { + const clone = new lunr.SortedSet(); + + clone.elements = this.toArray(); + clone.length = clone.elements.length; + + return clone; + }; + + /** + * Creates a new lunr.SortedSet that contains the elements in the union + * of this set and the passed set. + * + * @param {lunr.SortedSet} otherSet The set to union with this set. + * @returns {lunr.SortedSet} + * @memberOf SortedSet + */ + lunr.SortedSet.prototype.union = function (otherSet) { + let longSet, shortSet, unionSet; + + if (this.length >= otherSet.length) { + (longSet = this), (shortSet = otherSet); + } else { + (longSet = otherSet), (shortSet = this); + } + + unionSet = longSet.clone(); + + for ( + let i = 0, shortSetElements = shortSet.toArray(); + i < shortSetElements.length; + i++ + ) { + unionSet.add(shortSetElements[i]); + } + + return unionSet; + }; + + /** + * Returns a representation of the sorted set ready for serialisation. + * + * @returns {Array} + * @memberOf SortedSet + */ + lunr.SortedSet.prototype.toJSON = function () { + return this.toArray(); + }; + /** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ + (function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory); + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like enviroments that support module.exports, + * like Node. + */ + module.exports = factory(); + } else { + // Browser globals (root is window) + root.elasticlunr = factory(); + } + })(this, function () { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return elasticlunr; + }); +})(); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // +// End of elasticlunr code (http://elasticlunr.com/elasticlunr.js) // +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // + +window.onload = function () { + if (!document.body.contains(document.getElementById('searchModal'))) { + return; + } + + const lang = document.documentElement.lang; + const searchInput = document.getElementById('searchInput'); + const searchModal = document.getElementById('searchModal'); + const searchButton = document.getElementById('search-button'); + const clearSearchButton = document.getElementById('clear-search'); + const resultsContainer = document.getElementById('results-container'); + const results = document.getElementById('results'); + // Get all spans holding the translated strings, even if they are only used on one language. + const zeroResultsSpan = document.getElementById('zero_results'); + const oneResultsSpan = document.getElementById('one_results'); + const twoResultsSpan = document.getElementById('two_results'); + const fewResultsSpan = document.getElementById('few_results'); + const manyResultsSpan = document.getElementById('many_results'); + + // Static mapping of keys to spans. + const resultSpans = { + zero_results: zeroResultsSpan, + one_results: oneResultsSpan, + two_results: twoResultsSpan, + few_results: fewResultsSpan, + many_results: manyResultsSpan, + }; + + // Replace $SHORTCUT in search icon title with actual OS-specific shortcut. + function getShortcut() { + const userAgent = window.navigator.userAgent.toLowerCase(); + if (userAgent.includes('mac')) { + return 'Cmd + K'; + } else { + return 'Ctrl + K'; + } + } + + function setAttributes(element, attributeNames) { + const shortcut = getShortcut(); + attributeNames.forEach((attributeName) => { + let attributeValue = element.getAttribute(attributeName); + if (attributeValue) { + attributeValue = attributeValue.replace('$SHORTCUT', shortcut); + element.setAttribute(attributeName, attributeValue); + } + }); + } + setAttributes(searchButton, ['title', 'aria-label']); + + // Make search button keyboard accessible. + searchButton.addEventListener('keydown', function (event) { + if (event.key === 'Enter' || event.key === ' ') { + searchButton.click(); + } + }); + + let lastFocusedElement; + function openSearchModal() { + lastFocusedElement = document.activeElement; + loadSearchIndex(); + searchModal.style.display = 'block'; + searchInput.focus(); + } + + function closeModal() { + searchModal.style.display = 'none'; + clearSearch(); + if (lastFocusedElement && document.body.contains(lastFocusedElement)) { + lastFocusedElement.focus(); + } + } + + function toggleModalVisibility() { + const isModalOpen = searchModal.style.display === 'block'; + if (isModalOpen) { + closeModal(); + } else { + openSearchModal(); + } + } + + // Function to remove 'selected' class from all divs except the one passed. + function clearSelected(exceptDiv = null) { + const divs = results.querySelectorAll('#results > div'); + divs.forEach((div) => { + if (div !== exceptDiv) { + div.setAttribute('aria-selected', 'false'); + } + }); + } + + function updateSelection(div) { + if (div.getAttribute('aria-selected') !== 'true') { + clearSelected(div); + div.setAttribute('aria-selected', 'true'); + } + searchInput.setAttribute('aria-activedescendant', div.id); + } + + function clearSearch() { + searchInput.value = ''; + results.innerHTML = ''; + resultsContainer.style.display = 'none'; + searchInput.removeAttribute('aria-activedescendant'); + clearSearchButton.style.display = 'none'; + } + + // Close modal when clicking/tapping outside. + function handleModalInteraction(event) { + if (event.target === searchModal) { + closeModal(); + } + event.stopPropagation(); // Prevents tapping through the modal. + } + searchModal.addEventListener('click', handleModalInteraction); + searchModal.addEventListener('touchend', handleModalInteraction, { passive: true }); + + // Close modal when pressing escape. + document.addEventListener('keydown', function (event) { + if (event.key === 'Escape') { + closeModal(); + } + }); + + clearSearchButton.addEventListener('click', function () { + clearSearch(); + searchInput.focus(); + }); + clearSearchButton.addEventListener('keydown', function (event) { + if (event.key === 'Enter' || event.key === ' ') { + clearSearch(); + searchInput.focus(); + event.preventDefault(); + } + }); + + // The index loads on mouseover/tap. + // Clicking/tapping the search button opens the modal. + searchButton.addEventListener('mouseover', loadSearchIndex); + searchButton.addEventListener('click', openSearchModal); + searchButton.addEventListener('touchstart', openSearchModal, { passive: true }); + + let searchIndexPromise = null; + function loadSearchIndex() { + if (!searchIndexPromise) { + // Check if the search index is already loaded in the window object + if (window.searchIndex) { + // If the index is pre-loaded, use it directly. + searchIndexPromise = Promise.resolve( + elasticlunr.Index.load(window.searchIndex) + ); + } else { + // If the index is not pre-loaded, fetch it from the JSON file. + const language = document.documentElement + .getAttribute('lang') + .substring(0, 2); + let basePath = document + .querySelector("meta[name='base']") + .getAttribute('content'); + if (basePath.endsWith('/')) { + basePath = basePath.slice(0, -1); + } + + searchIndexPromise = fetch( + basePath + '/search_index.' + language + '.json' + ) + .then((response) => response.json()) + .then((json) => elasticlunr.Index.load(json)); + } + } + } + + function getByteByBinary(binaryCode) { + // Binary system, starts with `0b` in ES6 + // Octal number system, starts with `0` in ES5 and starts with `0o` in ES6 + // Hexadecimal, starts with `0x` in both ES5 and ES6 + var byteLengthDatas = [0, 1, 2, 3, 4]; + var len = byteLengthDatas[Math.ceil(binaryCode.length / 8)]; + return len; + } + + function getByteByHex(hexCode) { + return getByteByBinary(parseInt(hexCode, 16).toString(2)); + } + + function substringByByte(str, maxLength) { + let result = ''; + let flag = false; + let len = 0; + let length = 0; + let length2 = 0; + for (let i = 0; i < str.length; i++) { + const code = str.codePointAt(i).toString(16); + if (code.length > 4) { + i++; + if (i + 1 < str.length) { + flag = str.codePointAt(i + 1).toString(16) === '200d'; + } + } + if (flag) { + len += getByteByHex(code); + if (i == str.length - 1) { + length += len; + if (length <= maxLength) { + result += str.substr(length2, i - length2 + 1); + } else { + break; + } + } + } else { + if (len != 0) { + length += len; + length += getByteByHex(code); + if (length <= maxLength) { + result += str.substr(length2, i - length2 + 1); + length2 = i + 1; + } else { + break; + } + len = 0; + continue; + } + length += getByteByHex(code); + if (length <= maxLength) { + if (code.length <= 4) { + result += str[i]; + } else { + result += str[i - 1] + str[i]; + } + length2 = i + 1; + } else { + break; + } + } + } + return result; + } + + function generateSnippet(text, searchTerms) { + const BASE_SCORE = 2; + const FIRST_WORD_SCORE = 8; + const HIGHLIGHT_SCORE = 40; + const PRE_MATCH_CONTEXT_WORDS = 4; + const SNIPPET_LENGTH = 150; + const WINDOW_SIZE = 30; + + const stemmedTerms = searchTerms.map(function (term) { + return elasticlunr.stemmer(term.toLowerCase()); + }); + + let totalLength = 0; + const tokenScores = []; + const sentences = text.toLowerCase().split('. '); + + for (const sentence of sentences) { + const words = sentence.split(/[\s\n]/); + let isFirstWord = true; + + for (const word of words) { + if (word.length > 0) { + let score = isFirstWord ? FIRST_WORD_SCORE : BASE_SCORE; + for (const stemmedTerm of stemmedTerms) { + if (elasticlunr.stemmer(word).startsWith(stemmedTerm)) { + score = HIGHLIGHT_SCORE; + } + } + tokenScores.push([word, score, totalLength]); + isFirstWord = false; + } + totalLength += word.length + 1; + } + totalLength += 1; + } + + if (tokenScores.length === 0) { + return text.length > SNIPPET_LENGTH + ? text.substring(0, SNIPPET_LENGTH) + '…' + : text; + } + + const scores = []; + let windowScore = 0; + + for (var i = 0; i < Math.min(tokenScores.length, WINDOW_SIZE); i++) { + windowScore += tokenScores[i][1]; + } + scores.push(windowScore); + + // Slide the window and update the score. + for (var i = 1; i <= tokenScores.length - WINDOW_SIZE; i++) { + windowScore -= tokenScores[i - 1][1]; + windowScore += tokenScores[i + WINDOW_SIZE - 1][1]; + scores.push(windowScore); + } + + let maxScoreIndex = 0; + let maxScore = 0; + for (var i = scores.length - 1; i >= 0; i--) { + if (maxScore < scores[i]) { + maxScore = scores[i]; + maxScoreIndex = i; + } + } + + const snippet = []; + // From my testing, the context is more clear if we start a few words back. + let start = adjustStartPos( + text, + tokenScores[maxScoreIndex][2], + PRE_MATCH_CONTEXT_WORDS + ); + + function adjustStartPos(text, matchStartIndex, numWordsBack) { + let spaceCount = 0; + let index = matchStartIndex - 1; + while (index >= 0 && spaceCount < numWordsBack) { + if (text[index] === ' ' && text[index - 1] !== '.') { + spaceCount++; + } else if (text[index] === '.' && text[index + 1] === ' ') { + // Stop if the match is at the start of a sentence. + break; + } + index--; + } + return spaceCount === numWordsBack ? index + 1 : matchStartIndex; + } + const re = /^[\x00-\xff]+$/; // Regular expression for ASCII check. + for ( + var i = maxScoreIndex; + i < maxScoreIndex + WINDOW_SIZE && i < tokenScores.length; + i++ + ) { + const wordData = tokenScores[i]; + if (start < wordData[2]) { + snippet.push(text.substring(start, wordData[2])); + start = wordData[2]; + } + + if (wordData[1] === HIGHLIGHT_SCORE) { + snippet.push('<b>'); + } + const end = wordData[2] + wordData[0].length; + // Handle non-ASCII characters. + if (!re.test(wordData[0]) && wordData[0].length >= 12) { + const strBefore = text.substring(wordData[2], end); + const strAfter = substringByByte(strBefore, 12); + snippet.push(strAfter); + } else { + snippet.push(text.substring(wordData[2], end)); + } + + if (wordData[1] === HIGHLIGHT_SCORE) { + snippet.push('</b>'); + } + start = end; + } + + snippet.push('…'); + const joinedSnippet = snippet.join(''); + let truncatedSnippet = joinedSnippet; + if (joinedSnippet.replace(/<[^>]+>/g, '').length > SNIPPET_LENGTH) { + truncatedSnippet = joinedSnippet.substring(0, SNIPPET_LENGTH) + '…'; + } + + return truncatedSnippet; + } + + // Handle input in the search box. + searchInput.addEventListener( + 'input', + async function () { + const inputValue = this.value; + const searchTerm = inputValue.trim(); + const searchIndex = await searchIndexPromise; + results.innerHTML = ''; + + // Use the raw input so the "clear" button appears even if there's only spaces. + clearSearchButton.style.display = inputValue.length > 0 ? 'block' : 'none'; + resultsContainer.style.display = searchTerm.length > 0 ? 'block' : 'none'; + + // Perform the search and store the results. + const searchResults = searchIndex.search(searchTerm, { + bool: 'OR', + fields: { + title: { boost: 3 }, + body: { boost: 2 }, + description: { boost: 1 }, + path: { boost: 1 }, + }, + }); + + // Update the number of results. + updateResultText(searchResults.length); + + // Display the results. + let resultIdCounter = 0; // Counter to generate unique IDs. + searchResults.forEach(function (result) { + if (result.doc.title || result.doc.path || result.doc.id) { + const resultDiv = document.createElement('div'); + resultDiv.setAttribute('role', 'option'); + resultDiv.id = 'result-' + resultIdCounter++; + resultDiv.innerHTML = '<a href><span></span><span></span></a>'; + const linkElement = resultDiv.querySelector('a'); + const titleElement = resultDiv.querySelector('span:first-child'); + const snippetElement = resultDiv.querySelector('span:nth-child(2)'); + + // Determine the text for the title. + titleElement.textContent = + result.doc.title || result.doc.path || result.doc.id; + + // Determine if the body or description is available for the snippet. + let snippetText = result.doc.body + ? generateSnippet(result.doc.body, searchTerm.split(/\s+/)) + : result.doc.description + ? result.doc.description + : ''; + snippetElement.innerHTML = snippetText; + + // Create the hyperlink. + let href = result.ref; + if (result.doc.body) { + // Include text fragment if body is available. + const encodedSearchTerm = encodeURIComponent(searchTerm); + href += `#:~:text=${encodedSearchTerm}`; + } + linkElement.href = href; + + results.appendChild(resultDiv); + } + }); + + searchInput.setAttribute( + 'aria-expanded', + resultIdCounter > 0 ? 'true' : 'false' + ); + + if (results.firstChild) { + updateSelection(results.firstChild); + } + + results.addEventListener('mouseover', function (event) { + if (event.target.closest('div[role="option"]')) { + updateSelection(event.target.closest('div[role="option"]')); + } + }); + + results.addEventListener('click', function(event) { + const clickedElement = event.target.closest('a'); + if (clickedElement) { + const clickedHref = clickedElement.getAttribute('href'); + const currentPageUrl = window.location.href; + + // Normalise URLs by removing the text fragment and trailing slash. + const normalizeUrl = (url) => url.split('#')[0].replace(/\/$/, ''); + + // Check if the clicked link matches the current page. + // If using Ctrl+click or Cmd+click, don't close the modal. + if (normalizeUrl(clickedHref) === normalizeUrl(currentPageUrl) && + !event.ctrlKey && !event.metaKey) { + closeModal(); + } + } + }); + + // Add touch events to the results. + setupTouchEvents(); + }, + true + ); + + function updateResultText(count) { + // Determine the correct pluralization key based on count and language. + const pluralizationKey = getPluralizationKey(count, lang); + + // Hide all result text spans. + Object.values(resultSpans).forEach((span) => { + if (span) span.style.display = 'none'; + }); + + // Show the relevant result text span, replacing $NUMBER with the actual count. + const activeSpan = resultSpans[pluralizationKey]; + if (activeSpan) { + activeSpan.style.display = 'inline'; + activeSpan.textContent = activeSpan.textContent.replace( + '$NUMBER', + count.toString() + ); + } + } + + function getPluralizationKey(count, lang) { + let key = ''; + const slavicLangs = ['uk', 'be', 'bs', 'hr', 'ru', 'sr']; + + // Common cases: zero, one. + if (count === 0) { + key = 'zero_results'; + } else if (count === 1) { + key = 'one_results'; + } else { + // Arabic. + if (lang === 'ar') { + let modulo = count % 100; + if (count === 2) { + key = 'two_results'; + } else if (modulo >= 3 && modulo <= 10) { + key = 'few_results'; + } else { + key = 'many_results'; + } + } else if (slavicLangs.includes(lang)) { + // Slavic languages. + let modulo10 = count % 10; + let modulo100 = count % 100; + if (modulo10 === 1 && modulo100 !== 11) { + key = 'one_results'; + } else if ( + modulo10 >= 2 && + modulo10 <= 4 && + !(modulo100 >= 12 && modulo100 <= 14) + ) { + key = 'few_results'; + } else { + key = 'many_results'; + } + } else { + key = 'many_results'; // Default plural. + } + } + + return key; + } + + function setupTouchEvents() { + const resultDivs = document.querySelectorAll('#results > div'); + resultDivs.forEach((div) => { + // Remove existing listener to avoid duplicates. + div.removeEventListener('touchstart', handleTouchStart); + div.addEventListener('touchstart', handleTouchStart, { passive: true }); + }); + } + + function handleTouchStart() { + updateSelection(this); + } + + // Handle keyboard navigation. + document.addEventListener('keydown', function (event) { + // Add handling for the modal open/close shortcut. + const isMac = navigator.userAgent.toLowerCase().includes('mac'); + const MODAL_SHORTCUT_KEY = 'k'; + const modalShortcutModifier = isMac ? event.metaKey : event.ctrlKey; + + if (event.key === MODAL_SHORTCUT_KEY && modalShortcutModifier) { + event.preventDefault(); + toggleModalVisibility(); + return; + } + + const activeElement = document.activeElement; + if ( + event.key === 'Tab' && + (activeElement === searchInput || activeElement === clearSearchButton) + ) { + event.preventDefault(); + const nextFocusableElement = + activeElement === searchInput ? clearSearchButton : searchInput; + nextFocusableElement.focus(); + return; + } + + function updateResultSelection(newIndex, divsArray) { + updateSelection(divsArray[newIndex]); + divsArray[newIndex].scrollIntoView({ block: 'nearest', inline: 'start' }); + } + + const resultDivs = results.querySelectorAll('#results > div'); + if (resultDivs.length === 0) return; + + const divsArray = Array.from(resultDivs); + let activeDiv = results.querySelector('[aria-selected="true"]'); + let activeDivIndex = divsArray.indexOf(activeDiv); + + if ( + ['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'].includes( + event.key + ) + ) { + event.preventDefault(); + let newIndex = activeDivIndex; + + switch (event.key) { + case 'ArrowUp': + newIndex = Math.max(activeDivIndex - 1, 0); + break; + case 'ArrowDown': + newIndex = Math.min(activeDivIndex + 1, divsArray.length - 1); + break; + case 'Home': + newIndex = 0; + break; + case 'End': + newIndex = divsArray.length - 1; + break; + case 'PageUp': + newIndex = Math.max(activeDivIndex - 3, 0); + break; + case 'PageDown': + newIndex = Math.min(activeDivIndex + 3, divsArray.length - 1); + break; + } + + if (newIndex !== activeDivIndex) { + updateResultSelection(newIndex, divsArray); + } + } + + if (event.key === 'Enter' && activeDiv) { + event.preventDefault(); + event.stopImmediatePropagation(); + const anchorTag = activeDiv.querySelector('a'); + if (anchorTag) { + window.location.href = anchorTag.getAttribute('href'); + } + closeModal(); // Necessary when linking to the current page. + } + }); +}; diff --git a/themes/tabi-lean/static/js/searchElasticlunr.min.js b/themes/tabi-lean/static/js/searchElasticlunr.min.js new file mode 100644 index 0000000..291bc7a --- /dev/null +++ b/themes/tabi-lean/static/js/searchElasticlunr.min.js @@ -0,0 +1 @@ +!function(){function g(e){var t=new g.Index;return t.pipeline.add(g.trimmer,g.stopWordFilter,g.stemmer),e&&e.call(t,t),t}var t;g.version="0.9.5",(lunr=g).utils={},g.utils.warn=(t=this,function(e){t.console&&console.warn&&console.warn(e)}),g.utils.toString=function(e){return null==e?"":e.toString()},(g.EventEmitter=function(){this.events={}}).prototype.addListener=function(){var e=Array.prototype.slice.call(arguments);const t=e.pop();if("function"!=typeof t)throw new TypeError("last argument must be a function");e.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},g.EventEmitter.prototype.removeListener=function(e,t){this.hasHandler(e)&&-1!==(t=this.events[e].indexOf(t))&&(this.events[e].splice(t,1),0===this.events[e].length)&&delete this.events[e]},g.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){const t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},g.EventEmitter.prototype.hasHandler=function(e){return e in this.events},(g.tokenizer=function(n){if(!arguments.length||null==n)return[];if(Array.isArray(n)){let e=n.filter(function(e){return null!=e}),t=(e=e.map(function(e){return g.utils.toString(e).toLowerCase()}),[]);return e.forEach(function(e){e=e.split(g.tokenizer.seperator),t=t.concat(e)},this),t}return n.toString().trim().toLowerCase().split(g.tokenizer.seperator)}).defaultSeperator=/[\s-]+/,g.tokenizer.seperator=g.tokenizer.defaultSeperator,g.tokenizer.setSeperator=function(e){null!=e&&"object"==typeof e&&(g.tokenizer.seperator=e)},g.tokenizer.resetSeperator=function(){g.tokenizer.seperator=g.tokenizer.defaultSeperator},g.tokenizer.getSeperator=function(){return g.tokenizer.seperator},(g.Pipeline=function(){this._queue=[]}).registeredFunctions={},g.Pipeline.registerFunction=function(e,t){t in g.Pipeline.registeredFunctions&&g.utils.warn("Overwriting existing registered function: "+t),e.label=t,g.Pipeline.registeredFunctions[t]=e},g.Pipeline.getRegisteredFunction=function(e){return e in g.Pipeline.registeredFunctions!=1?null:g.Pipeline.registeredFunctions[e]},g.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||g.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},g.Pipeline.load=function(e){const n=new g.Pipeline;return e.forEach(function(e){var t=g.Pipeline.getRegisteredFunction(e);if(!t)throw new Error("Cannot load un-registered function: "+e);n.add(t)}),n},g.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){g.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},g.Pipeline.prototype.after=function(e,t){if(g.Pipeline.warnIfFunctionNotRegistered(t),-1===(e=this._queue.indexOf(e)))throw new Error("Cannot find existingFn");this._queue.splice(e+1,0,t)},g.Pipeline.prototype.before=function(e,t){if(g.Pipeline.warnIfFunctionNotRegistered(t),-1===(e=this._queue.indexOf(e)))throw new Error("Cannot find existingFn");this._queue.splice(e,0,t)},g.Pipeline.prototype.remove=function(e){-1!==(e=this._queue.indexOf(e))&&this._queue.splice(e,1)},g.Pipeline.prototype.run=function(o){var e=[],t=o.length,i=this._queue.length;for(let n=0;n<t;n++){let t=o[n];for(let e=0;e<i&&void 0!==(t=this._queue[e](t,n,o))&&null!==t;e++);void 0!==t&&null!==t&&e.push(t)}return e},g.Pipeline.prototype.reset=function(){this._queue=[]},g.Pipeline.prototype.get=function(){return this._queue},g.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return g.Pipeline.warnIfFunctionNotRegistered(e),e.label})},(g.Index=function(){this._fields=[],this._ref="id",this.pipeline=new g.Pipeline,this.documentStore=new g.DocumentStore,this.index={},this.eventEmitter=new g.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))}).prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},g.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},g.Index.load=function(e){e.version!==g.version&&g.utils.warn("version mismatch: current "+g.version+" importing "+e.version);var t=new this;t._fields=e.fields,t._ref=e.ref,t.documentStore=g.DocumentStore.load(e.documentStore),t.pipeline=g.Pipeline.load(e.pipeline),t.index={};for(const n in e.index)t.index[n]=g.InvertedIndex.load(e.index[n]);return t},g.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new g.InvertedIndex,this},g.Index.prototype.setRef=function(e){return this._ref=e,this},g.Index.prototype.saveDocument=function(e){return this.documentStore=new g.DocumentStore(e),this},g.Index.prototype.addDoc=function(r,e){if(r){e=void 0===e||e;const s=r[this._ref];this.documentStore.addDoc(s,r),this._fields.forEach(function(e){var t=this.pipeline.run(g.tokenizer(r[e]));this.documentStore.addFieldLength(s,e,t.length);const n={};t.forEach(function(e){e in n?n[e]+=1:n[e]=1},this);for(const i in n){var o=n[i],o=Math.sqrt(o);this.index[e].addToken(i,{ref:s,tf:o})}},this),e&&this.eventEmitter.emit("add",r,this)}},g.Index.prototype.removeDocByRef=function(e,t){e&&!1!==this.documentStore.isDocStored()&&this.documentStore.hasDoc(e)&&(e=this.documentStore.getDoc(e),this.removeDoc(e,!1))},g.Index.prototype.removeDoc=function(e,t){if(e){t=void 0===t||t;const n=e[this._ref];this.documentStore.hasDoc(n)&&(this.documentStore.removeDoc(n),this._fields.forEach(function(t){this.pipeline.run(g.tokenizer(e[t])).forEach(function(e){this.index[t].removeToken(e,n)},this)},this),t)&&this.eventEmitter.emit("remove",e,this)}},g.Index.prototype.updateDoc=function(e,t){t=void 0===t||t,this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},g.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;return Object.prototype.hasOwnProperty.call(this._idfCache,n)?this._idfCache[n]:(t=this.index[t].getDocFreq(e),e=1+Math.log(this.documentStore.length/(t+1)),this._idfCache[n]=e)},g.Index.prototype.getFields=function(){return this._fields.slice()},g.Index.prototype.search=function(t,e){if(!t)return[];t="string"==typeof t?{any:t}:JSON.parse(JSON.stringify(t));let n=null;null!=e&&(n=JSON.stringify(e));var o=new g.Configuration(n,this.getFields()).get(),i={},r=Object.keys(t);for(let e=0;e<r.length;e++){var s=r[e];i[s]=this.pipeline.run(g.tokenizer(t[s]))}var l={};for(const p in o){var u=i[p]||i.any;if(u){var a=this.fieldSearch(u,p,o),c=o[p].boost;for(h in a)a[h]=a[h]*c;for(h in a)h in l?l[h]+=a[h]:l[h]=a[h]}}var d,h,f=[];for(h in l)d={ref:h,score:l[h]},this.documentStore.hasDoc(h)&&(d.doc=this.documentStore.getDoc(h)),f.push(d);return f.sort(function(e,t){return t.score-e.score}),f},g.Index.prototype.fieldSearch=function(e,a,t){const c=t[a].bool,n=t[a].expand;t=t[a].boost;let d=null;const h={};if(0!==t)return e.forEach(function(l){let e=[l];!0===n&&(e=this.index[a].expandToken(l));const u={};e.forEach(function(n){let e=this.index[a].getDocs(n);var o=this.idf(n,a);if(d&&"AND"===c){var i,t={};for(i in d)i in e&&(t[i]=e[i]);e=t}for(i in n===l&&this.fieldSearchStats(h,n,e),e){var r=this.index[a].getTermFrequency(n,i),s=this.documentStore.getFieldLength(i,a);let e=1,t=(0!==s&&(e=1/Math.sqrt(s)),1);n!==l&&(t=.15*(1-(n.length-l.length)/n.length)),s=r*o*e*t,i in u?u[i]+=s:u[i]=s}},this),d=this.mergeScores(d,u,c)},this),d=this.coordNorm(d,h,e.length)},g.Index.prototype.mergeScores=function(e,t,n){if(!e)return t;if("AND"===n){var o={};for(i in t)i in e&&(o[i]=e[i]+t[i]);return o}for(var i in t)i in e?e[i]+=t[i]:e[i]=t[i];return e},g.Index.prototype.fieldSearchStats=function(e,t,n){for(const o in n)o in e?e[o].push(t):e[o]=[t]},g.Index.prototype.coordNorm=function(e,t,n){for(const i in e){var o;i in t&&(o=t[i].length,e[i]=e[i]*o/n)}return e},g.Index.prototype.toJSON=function(){const t={};return this._fields.forEach(function(e){t[e]=this.index[e].toJSON()},this),{version:g.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),index:t,pipeline:this.pipeline.toJSON()}},g.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},(g.DocumentStore=function(e){this._save=null==e||e,this.docs={},this.docInfo={},this.length=0}).load=function(e){var t=new this;return t.length=e.length,t.docs=e.docs,t.docInfo=e.docInfo,t._save=e.save,t},g.DocumentStore.prototype.isDocStored=function(){return this._save},g.DocumentStore.prototype.addDoc=function(e,t){this.hasDoc(e)||this.length++,!0===this._save?this.docs[e]=function(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(t):this.docs[e]=null},g.DocumentStore.prototype.getDoc=function(e){return!1===this.hasDoc(e)?null:this.docs[e]},g.DocumentStore.prototype.hasDoc=function(e){return e in this.docs},g.DocumentStore.prototype.removeDoc=function(e){this.hasDoc(e)&&(delete this.docs[e],delete this.docInfo[e],this.length--)},g.DocumentStore.prototype.addFieldLength=function(e,t,n){null!=e&&0!=this.hasDoc(e)&&(this.docInfo[e]||(this.docInfo[e]={}),this.docInfo[e][t]=n)},g.DocumentStore.prototype.updateFieldLength=function(e,t,n){null!=e&&0!=this.hasDoc(e)&&this.addFieldLength(e,t,n)},g.DocumentStore.prototype.getFieldLength=function(e,t){return null!=e&&e in this.docs&&t in this.docInfo[e]?this.docInfo[e][t]:0},g.DocumentStore.prototype.toJSON=function(){return{docs:this.docs,docInfo:this.docInfo,length:this.length,save:this._save}},g.stemmer=function(){const a={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},c={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""};var e="[aeiouy]",t="[^aeiou][^aeiouy]*";const d=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),h=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),f=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$"),p=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy]"),g=/^(.+?)(ss|i)es$/,y=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,v=/^(.+?)(ed|ing)$/,w=/.$/,S=/(at|bl|iz)$/,b=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+t+e+"[^aeiouwxy]$"),E=/^(.+?[^aeiou])y$/,I=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,k=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,D=/^(.+?)(s|t)(ion)$/,F=/^(.+?)e$/,A=/ll$/,P=new RegExp("^"+t+e+"[^aeiouwxy]$");return function(e){let t,n,o,i,r,s,l;var u;return e.length<3||("y"==(o=e.substr(0,1))&&(e=o.toUpperCase()+e.substr(1)),i=g,r=y,i.test(e)?e=e.replace(i,"$1$2"):r.test(e)&&(e=e.replace(r,"$1$2")),i=m,r=v,i.test(e)?(u=i.exec(e),(i=d).test(u[1])&&(i=w,e=e.replace(i,""))):r.test(e)&&(u=r.exec(e),t=u[1],(r=p).test(t))&&(e=t,r=S,s=b,l=x,r.test(e)?e+="e":s.test(e)?(i=w,e=e.replace(i,"")):l.test(e)&&(e+="e")),(i=E).test(e)&&(u=i.exec(e),e=(t=u[1])+"i"),(i=I).test(e)&&(u=i.exec(e),t=u[1],n=u[2],(i=d).test(t))&&(e=t+a[n]),(i=k).test(e)&&(u=i.exec(e),t=u[1],n=u[2],(i=d).test(t))&&(e=t+c[n]),i=_,r=D,i.test(e)?(u=i.exec(e),t=u[1],(i=h).test(t)&&(e=t)):r.test(e)&&(u=r.exec(e),t=u[1]+u[2],(r=h).test(t))&&(e=t),(i=F).test(e)&&(u=i.exec(e),t=u[1],i=h,r=f,s=P,i.test(t)||r.test(t)&&!s.test(t))&&(e=t),i=A,r=h,i.test(e)&&r.test(e)&&(i=w,e=e.replace(i,"")),"y"==o&&(e=o.toLowerCase()+e.substr(1))),e}}(),g.Pipeline.registerFunction(g.stemmer,"stemmer"),g.stopWordFilter=function(e){if(e&&!0!==g.stopWordFilter.stopWords[e])return e},g.clearStopWords=function(){g.stopWordFilter.stopWords={}},g.addStopWords=function(e){null!=e&&!1!==Array.isArray(e)&&e.forEach(function(e){g.stopWordFilter.stopWords[e]=!0},this)},g.resetStopWords=function(){g.stopWordFilter.stopWords=g.defaultStopWords},g.stopWordFilter.stopWords=g.defaultStopWords={"":!0,a:!0,able:!0,about:!0,across:!0,after:!0,all:!0,almost:!0,also:!0,am:!0,among:!0,an:!0,and:!0,any:!0,are:!0,as:!0,at:!0,be:!0,because:!0,been:!0,but:!0,by:!0,can:!0,cannot:!0,could:!0,dear:!0,did:!0,do:!0,does:!0,either:!0,else:!0,ever:!0,every:!0,for:!0,from:!0,get:!0,got:!0,had:!0,has:!0,have:!0,he:!0,her:!0,hers:!0,him:!0,his:!0,how:!0,however:!0,i:!0,if:!0,in:!0,into:!0,is:!0,it:!0,its:!0,just:!0,least:!0,let:!0,like:!0,likely:!0,may:!0,me:!0,might:!0,most:!0,must:!0,my:!0,neither:!0,no:!0,nor:!0,not:!0,of:!0,off:!0,often:!0,on:!0,only:!0,or:!0,other:!0,our:!0,own:!0,rather:!0,said:!0,say:!0,says:!0,she:!0,should:!0,since:!0,so:!0,some:!0,than:!0,that:!0,the:!0,their:!0,them:!0,then:!0,there:!0,these:!0,they:!0,this:!0,tis:!0,to:!0,too:!0,twas:!0,us:!0,wants:!0,was:!0,we:!0,were:!0,what:!0,when:!0,where:!0,which:!0,while:!0,who:!0,whom:!0,why:!0,will:!0,with:!0,would:!0,yet:!0,you:!0,your:!0},g.Pipeline.registerFunction(g.stopWordFilter,"stopWordFilter"),g.Pipeline.registerFunction(g.trimmer=function(e){if(null==e)throw new Error("token should not be undefined");return e.replace(/^\W+/,"").replace(/\W+$/,"")},"trimmer"),(g.InvertedIndex=function(){this.root={docs:{},df:0}}).load=function(e){var t=new this;return t.root=e.root,t},g.InvertedIndex.prototype.addToken=function(e,t,n){n=n||this.root;let o=0;for(;o<=e.length-1;){var i=e[o];i in n||(n[i]={docs:{},df:0}),o+=1,n=n[i]}var r=t.ref;n.docs[r]?n.docs[r]={tf:t.tf}:(n.docs[r]={tf:t.tf},n.df+=1)},g.InvertedIndex.prototype.hasToken=function(t){if(!t)return!1;let n=this.root;for(let e=0;e<t.length;e++){if(!n[t[e]])return!1;n=n[t[e]]}return!0},g.InvertedIndex.prototype.getNode=function(t){if(!t)return null;let n=this.root;for(let e=0;e<t.length;e++){if(!n[t[e]])return null;n=n[t[e]]}return n},g.InvertedIndex.prototype.getDocs=function(e){return null==(e=this.getNode(e))?{}:e.docs},g.InvertedIndex.prototype.getTermFrequency=function(e,t){return null!=(e=this.getNode(e))&&t in e.docs?e.docs[t].tf:0},g.InvertedIndex.prototype.getDocFreq=function(e){return null==(e=this.getNode(e))?0:e.df},g.InvertedIndex.prototype.removeToken=function(e,t){e&&null!=(e=this.getNode(e))&&t in e.docs&&(delete e.docs[t],--e.df)},g.InvertedIndex.prototype.expandToken=function(e,t,n){if(null==e||""==e)return[];if(t=t||[],null!=n||null!=(n=this.getNode(e))){0<n.df&&t.push(e);for(const o in n)"docs"!==o&&"df"!==o&&this.expandToken(e+o,t,n[o])}return t},g.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},(g.Configuration=function(e,t){var n,e=e||"";if(null==t)throw new Error("fields should not be null");this.config={};try{n=JSON.parse(e),this.buildUserConfig(n,t)}catch(e){g.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(t)}}).prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},g.Configuration.prototype.buildUserConfig=function(t,e){let n="OR",o=!1;if(this.reset(),"bool"in t&&(n=t.bool||n),"expand"in t&&(o=t.expand||o),"fields"in t)for(const r in t.fields)if(-1<e.indexOf(r)){var i=t.fields[r];let e=o;null!=i.expand&&(e=i.expand),this.config[r]={boost:i.boost||0===i.boost?i.boost:1,bool:i.bool||n,expand:e}}else g.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(n,o,e)},g.Configuration.prototype.addAllFields2UserConfig=function(t,n,e){e.forEach(function(e){this.config[e]={boost:1,bool:t,expand:n}},this)},g.Configuration.prototype.get=function(){return this.config},g.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){let e,t;for(e=0;e<arguments.length;e++)t=arguments[e],~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t);this.length=this.elements.length},lunr.SortedSet.prototype.toArray=function(){return this.elements.slice()},lunr.SortedSet.prototype.map=function(e,t){return this.elements.map(e,t)},lunr.SortedSet.prototype.forEach=function(e,t){return this.elements.forEach(e,t)},lunr.SortedSet.prototype.indexOf=function(e){let t=0,n=this.elements.length,o=n-t,i=t+Math.floor(o/2),r=this.elements[i];for(;1<o;){if(r===e)return i;r<e&&(t=i),r>e&&(n=i),o=n-t,i=t+Math.floor(o/2),r=this.elements[i]}return r===e?i:-1},lunr.SortedSet.prototype.locationFor=function(e){let t=0,n=this.elements.length,o=n-t,i=t+Math.floor(o/2),r=this.elements[i];for(;1<o;)r<e&&(t=i),r>e&&(n=i),o=n-t,i=t+Math.floor(o/2),r=this.elements[i];return r>e?i:r<e?i+1:void 0},lunr.SortedSet.prototype.intersect=function(e){var t=new lunr.SortedSet;let n=0,o=0;for(var i=this.length,r=e.length,s=this.elements,l=e.elements;!(n>i-1||o>r-1);)s[n]===l[o]?(t.add(s[n]),n++,o++):s[n]<l[o]?n++:s[n]>l[o]&&o++;return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){let t,n,o;n=this.length>=e.length?(t=this,e):(t=e,this),o=t.clone();for(let e=0,t=n.toArray();e<t.length;e++)o.add(t[e]);return o},lunr.SortedSet.prototype.toJSON=function(){return this.toArray()},"function"==typeof define&&define.amd?define(function(){return g}):"object"==typeof exports?module.exports=g:this.elasticlunr=g}(),window.onload=function(){if(document.body.contains(document.getElementById("searchModal"))){const d=document.documentElement.lang,h=document.getElementById("searchInput"),f=document.getElementById("searchModal"),s=document.getElementById("search-button"),p=document.getElementById("clear-search"),g=document.getElementById("results-container"),y=document.getElementById("results"),m={zero_results:document.getElementById("zero_results"),one_results:document.getElementById("one_results"),two_results:document.getElementById("two_results"),few_results:document.getElementById("few_results"),many_results:document.getElementById("many_results")};{var n=s;const v=window.navigator.userAgent.toLowerCase().includes("mac")?"Cmd + K":"Ctrl + K";["title","aria-label"].forEach(e=>{let t=n.getAttribute(e);t&&(t=t.replace("$SHORTCUT",v),n.setAttribute(e,t))})}s.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||s.click()});let e,r=(f.addEventListener("click",o),f.addEventListener("touchend",o,{passive:!0}),document.addEventListener("keydown",function(e){"Escape"===e.key&&u()}),p.addEventListener("click",function(){t(),h.focus()}),p.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(t(),h.focus(),e.preventDefault())}),s.addEventListener("mouseover",i),s.addEventListener("click",l),s.addEventListener("touchstart",l,{passive:!0}),null);function l(){e=document.activeElement,i(),f.style.display="block",h.focus()}function u(){f.style.display="none",t(),e&&document.body.contains(e)&&e.focus()}function a(e){var t;"true"!==e.getAttribute("aria-selected")&&([t=null]=[e],y.querySelectorAll("#results > div").forEach(e=>{e!==t&&e.setAttribute("aria-selected","false")}),e.setAttribute("aria-selected","true")),h.setAttribute("aria-activedescendant",e.id)}function t(){h.value="",y.innerHTML="",g.style.display="none",h.removeAttribute("aria-activedescendant"),p.style.display="none"}function o(e){e.target===f&&u(),e.stopPropagation()}function i(){if(!r)if(window.searchIndex)r=Promise.resolve(elasticlunr.Index.load(window.searchIndex));else{var t=document.documentElement.getAttribute("lang").substring(0,2);let e=document.querySelector("meta[name='base']").getAttribute("content");e.endsWith("/")&&(e=e.slice(0,-1)),r=fetch(e+"/search_index."+t+".json").then(e=>e.json()).then(e=>elasticlunr.Index.load(e))}}function S(e){return e=parseInt(e,16).toString(2),[0,1,2,3,4][Math.ceil(e.length/8)]}function c(){a(this)}h.addEventListener("input",async function(){var e=this.value;const s=e.trim();var t=await r;y.innerHTML="",p.style.display=0<e.length?"block":"none",g.style.display=0<s.length?"block":"none";var n,o=t=(e=t.search(s,{bool:"OR",fields:{title:{boost:3},body:{boost:2},description:{boost:1},path:{boost:1}}})).length,i=d,o=0===o?"zero_results":1===o?"one_results":"ar"===i?(n=o%100,2===o?"two_results":3<=n&&n<=10?"few_results":"many_results"):["uk","be","bs","hr","ru","sr"].includes(i)?(n=o%100,1==(i=o%10)&&11!=n?"one_results":2<=i&&i<=4&&!(12<=n&&n<=14)?"few_results":"many_results"):"many_results";Object.values(m).forEach(e=>{e&&(e.style.display="none")}),(o=m[o])&&(o.style.display="inline",o.textContent=o.textContent.replace("$NUMBER",t.toString()));let l=0;e.forEach(function(t){if(t.doc.title||t.doc.path||t.doc.id){var n=document.createElement("div"),o=(n.setAttribute("role","option"),n.id="result-"+l++,n.innerHTML="<a href><span></span><span></span></a>",n.querySelector("a")),i=n.querySelector("span:first-child"),r=n.querySelector("span:nth-child(2)"),i=(i.textContent=t.doc.title||t.doc.path||t.doc.id,t.doc.body?function(e,t){var n=t.map(function(e){return elasticlunr.stemmer(e.toLowerCase())});let o=0;var i=[];for(const m of e.toLowerCase().split(". ")){let t=!0;for(const v of m.split(/[\s\n]/)){if(0<v.length){let e=t?8:2;for(const w of n)elasticlunr.stemmer(v).startsWith(w)&&(e=40);i.push([v,e,o]),t=!1}o+=v.length+1}o+=1}if(0===i.length)return 150<e.length?e.substring(0,150)+"…":e;var r=[];let s=0;for(var l=0;l<Math.min(i.length,30);l++)s+=i[l][1];for(r.push(s),l=1;l<=i.length-30;l++)s=(s-=i[l-1][1])+i[l+30-1][1],r.push(s);let u=0,a=0;for(l=r.length-1;0<=l;l--)a<r[l]&&(a=r[l],u=l);var c=[];let d=function(e,t){let n=0,o=t-1;for(;0<=o&&n<4;){if(" "===e[o]&&"."!==e[o-1])n++;else if("."===e[o]&&" "===e[o+1])break;o--}return 4===n?o+1:t}(e,i[u][2]);for(var h=/^[\x00-\xff]+$/,l=u;l<u+30&&l<i.length;l++){var f,p=i[l],g=(d<p[2]&&(c.push(e.substring(d,p[2])),d=p[2]),40===p[1]&&c.push("<b>"),p[2]+p[0].length);!h.test(p[0])&&12<=p[0].length?(f=function(t){let n="",o=!1,i=0,r=0,s=0;for(let e=0;e<t.length;e++){var l=t.codePointAt(e).toString(16);if(o=4<l.length&&++e+1<t.length?"200d"===t.codePointAt(e+1).toString(16):o){if(i+=S(l),e==t.length-1){if(!((r+=i)<=12))break;n+=t.substr(s,e-s+1)}}else if(0!=i){if(!((r=(r+=i)+S(l))<=12))break;n+=t.substr(s,e-s+1),s=e+1,i=0}else{if(!((r+=S(l))<=12))break;l.length<=4?n+=t[e]:n+=t[e-1]+t[e],s=e+1}}return n}(e.substring(p[2],g)),c.push(f)):c.push(e.substring(p[2],g)),40===p[1]&&c.push("</b>"),d=g}c.push("…");var y=t=c.join("");return 150<t.replace(/<[^>]+>/g,"").length?t.substring(0,150)+"…":y}(t.doc.body,s.split(/\s+/)):t.doc.description||"");r.innerHTML=i;let e=t.ref;t.doc.body&&(r=encodeURIComponent(s),e+="#:~:text="+r),o.href=e,y.appendChild(n)}}),h.setAttribute("aria-expanded",0<l?"true":"false"),y.firstChild&&a(y.firstChild),y.addEventListener("mouseover",function(e){e.target.closest('div[role="option"]')&&a(e.target.closest('div[role="option"]'))}),y.addEventListener("click",function(e){var t,n,o=e.target.closest("a");o&&(o=o.getAttribute("href"),t=window.location.href,(n=e=>e.split("#")[0].replace(/\/$/,""))(o)!==n(t)||e.ctrlKey||e.metaKey||u())}),document.querySelectorAll("#results > div").forEach(e=>{e.removeEventListener("touchstart",c),e.addEventListener("touchstart",c,{passive:!0})})},!0),document.addEventListener("keydown",function(t){var e=navigator.userAgent.toLowerCase().includes("mac")?t.metaKey:t.ctrlKey;if("k"===t.key&&e)t.preventDefault(),("block"===f.style.display?u:l)();else if(e=document.activeElement,"Tab"!==t.key||e!==h&&e!==p){if(0!==(r=y.querySelectorAll("#results > div")).length){var n,o,i=Array.from(r),r=y.querySelector('[aria-selected="true"]'),s=i.indexOf(r);if(["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)){t.preventDefault();let e=s;switch(t.key){case"ArrowUp":e=Math.max(s-1,0);break;case"ArrowDown":e=Math.min(s+1,i.length-1);break;case"Home":e=0;break;case"End":e=i.length-1;break;case"PageUp":e=Math.max(s-3,0);break;case"PageDown":e=Math.min(s+3,i.length-1)}e!==s&&(a((o=i)[n=e]),o[n].scrollIntoView({block:"nearest",inline:"start"}))}"Enter"===t.key&&r&&(t.preventDefault(),t.stopImmediatePropagation(),(o=r.querySelector("a"))&&(window.location.href=o.getAttribute("href")),u())}}else t.preventDefault(),(e===h?p:h).focus()})}}; diff --git a/themes/tabi-lean/static/js/sortTable.js b/themes/tabi-lean/static/js/sortTable.js new file mode 100644 index 0000000..16e02e9 --- /dev/null +++ b/themes/tabi-lean/static/js/sortTable.js @@ -0,0 +1,119 @@ +// Select the table and table headers. +var table = document.querySelector('#sitemapTable'); +var headers = Array.from(table.querySelectorAll('th')); + +// Create and append the live region for accessibility announcements. +var liveRegion = document.createElement('div'); +liveRegion.setAttribute('aria-live', 'polite'); +liveRegion.setAttribute('aria-atomic', 'true'); +liveRegion.classList.add('visually-hidden'); +document.body.appendChild(liveRegion); + +// Initialise headers with click and keyboard listeners. +initializeHeaders(); +addSortText(); // Add text for screen readers for initial sort direction. +updateSortIndicators(headers[0], 'asc'); // Set initial sort indicators. + +function updateSortIndicators(header, direction) { + removeSortArrows(header); + var arrow = document.createElement('span'); + arrow.classList.add('sort-arrow'); + arrow.textContent = direction === 'asc' ? ' ▲' : ' ▼'; + arrow.setAttribute('aria-hidden', 'true'); + header.appendChild(arrow); +} + +function removeSortArrows(header) { + var arrows = header.querySelectorAll('.sort-arrow'); + arrows.forEach(function (arrow) { + arrow.remove(); + }); +} + +function initializeHeaders() { + headers.forEach(function (header, index) { + header.classList.add('sortable'); + header.setAttribute('tabindex', '0'); + header.sortDirection = 'asc'; // Default sort direction. + var sortAttribute = index === 0 ? 'ascending' : 'none'; + header.setAttribute('aria-sort', sortAttribute); + header.addEventListener('click', function () { + sortTable(index); + }); + header.addEventListener('keydown', function (e) { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + sortTable(index); + } + }); + }); +} + +function announceSort(header, direction) { + var columnTitle = header.querySelector('.columntitle').textContent; + liveRegion.textContent = + 'Column ' + columnTitle + ' is now sorted in ' + direction + ' order'; +} + +function sortTable(index) { + var header = headers[index]; + var direction = header.sortDirection === 'asc' ? 'desc' : 'asc'; + var tbody = table.querySelector('tbody'); + var rows = Array.from(tbody.querySelectorAll('tr')); + sortRows(rows, index, direction); + refreshTableBody(tbody, rows); + updateHeaderAttributes(header, direction); + announceSort(header, direction === 'asc' ? 'ascending' : 'descending'); +} + +function sortRows(rows, index, direction) { + rows.sort(function (rowA, rowB) { + var cellA = rowA.querySelectorAll('td')[index].textContent; + var cellB = rowB.querySelectorAll('td')[index].textContent; + return direction === 'asc' + ? cellA.localeCompare(cellB) + : cellB.localeCompare(cellA); + }); +} + +function refreshTableBody(tbody, rows) { + tbody.innerHTML = ''; // Clear existing rows. + rows.forEach(function (row) { + tbody.appendChild(row); + }); +} + +function updateHeaderAttributes(header, direction) { + headers.forEach(function (otherHeader) { + if (otherHeader !== header) { + otherHeader.setAttribute('aria-sort', 'none'); + removeSortArrows(otherHeader); + } + }); + header.setAttribute('aria-sort', direction === 'asc' ? 'ascending' : 'descending'); + header.sortDirection = direction; + updateSortIndicators(header, direction); + updateAnnounceText(header); +} + +// Update screen reader text for sorting. +function updateAnnounceText(header) { + var span = header.querySelector('.visually-hidden'); + span.textContent = + 'Click to sort in ' + + (header.sortDirection === 'asc' ? 'descending' : 'ascending') + + ' order'; +} + +// Add text for screen readers regarding sort order. +function addSortText() { + headers.forEach(function (header) { + var span = document.createElement('span'); + span.classList.add('visually-hidden'); + span.textContent = 'Click to sort in descending order'; + header.appendChild(span); + }); +} + +headers[0].sortDirection = 'asc'; +headers[0].setAttribute('aria-sort', 'ascending'); diff --git a/themes/tabi-lean/static/js/sortTable.min.js b/themes/tabi-lean/static/js/sortTable.min.js new file mode 100644 index 0000000..de423a8 --- /dev/null +++ b/themes/tabi-lean/static/js/sortTable.min.js @@ -0,0 +1 @@ +var table=document.querySelector("#sitemapTable"),headers=Array.from(table.querySelectorAll("th")),liveRegion=document.createElement("div");function updateSortIndicators(e,t){removeSortArrows(e);var r=document.createElement("span");r.classList.add("sort-arrow"),r.textContent="asc"===t?" ▲":" ▼",r.setAttribute("aria-hidden","true"),e.appendChild(r)}function removeSortArrows(e){e.querySelectorAll(".sort-arrow").forEach(function(e){e.remove()})}function initializeHeaders(){headers.forEach(function(e,t){e.classList.add("sortable"),e.setAttribute("tabindex","0"),e.sortDirection="asc",e.setAttribute("aria-sort",0===t?"ascending":"none"),e.addEventListener("click",function(){sortTable(t)}),e.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),sortTable(t))})})}function announceSort(e,t){e=e.querySelector(".columntitle").textContent;liveRegion.textContent="Column "+e+" is now sorted in "+t+" order"}function sortTable(e){var t=headers[e],r="asc"===t.sortDirection?"desc":"asc",n=table.querySelector("tbody"),o=Array.from(n.querySelectorAll("tr"));sortRows(o,e,r),refreshTableBody(n,o),updateHeaderAttributes(t,r),announceSort(t,"asc"==r?"ascending":"descending")}function sortRows(e,r,n){e.sort(function(e,t){e=e.querySelectorAll("td")[r].textContent,t=t.querySelectorAll("td")[r].textContent;return"asc"===n?e.localeCompare(t):t.localeCompare(e)})}function refreshTableBody(t,e){t.innerHTML="",e.forEach(function(e){t.appendChild(e)})}function updateHeaderAttributes(t,e){headers.forEach(function(e){e!==t&&(e.setAttribute("aria-sort","none"),removeSortArrows(e))}),t.setAttribute("aria-sort","asc"===e?"ascending":"descending"),t.sortDirection=e,updateSortIndicators(t,e),updateAnnounceText(t)}function updateAnnounceText(e){e.querySelector(".visually-hidden").textContent="Click to sort in "+("asc"===e.sortDirection?"descending":"ascending")+" order"}function addSortText(){headers.forEach(function(e){var t=document.createElement("span");t.classList.add("visually-hidden"),t.textContent="Click to sort in descending order",e.appendChild(t)})}liveRegion.setAttribute("aria-live","polite"),liveRegion.setAttribute("aria-atomic","true"),liveRegion.classList.add("visually-hidden"),document.body.appendChild(liveRegion),initializeHeaders(),addSortText(),updateSortIndicators(headers[0],"asc"),headers[0].sortDirection="asc",headers[0].setAttribute("aria-sort","ascending"); diff --git a/themes/tabi-lean/static/js/themeSwitcher.js b/themes/tabi-lean/static/js/themeSwitcher.js new file mode 100644 index 0000000..c5ddf95 --- /dev/null +++ b/themes/tabi-lean/static/js/themeSwitcher.js @@ -0,0 +1,74 @@ +// Get the theme switcher button elements. +const themeSwitcher = document.querySelector('.theme-switcher'); +const themeResetter = document.querySelector('.theme-resetter'); +const defaultTheme = document.documentElement.getAttribute('data-default-theme'); + +function getSystemThemePreference() { + return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; +} + +// Determine the initial theme. +let currentTheme = + localStorage.getItem('theme') || + document.documentElement.getAttribute('data-theme') || + getSystemThemePreference(); + +function setTheme(theme, saveToLocalStorage = false) { + document.documentElement.setAttribute('data-theme', theme); + currentTheme = theme; + themeSwitcher.setAttribute('aria-pressed', theme === 'dark'); + + if (saveToLocalStorage) { + localStorage.setItem('theme', theme); + themeResetter.classList.add('has-custom-theme'); + } else { + localStorage.removeItem('theme'); + themeResetter.classList.remove('has-custom-theme'); + } + + // Dispatch a custom event for comment systems. + window.dispatchEvent(new CustomEvent('themeChanged', { detail: { theme } })); +} + +function resetTheme() { + setTheme(defaultTheme || getSystemThemePreference()); +} + +// Function to switch between dark and light themes. +function switchTheme() { + setTheme(currentTheme === 'dark' ? 'light' : 'dark', true); +} + +// Initialize the theme switcher button. +themeSwitcher.addEventListener('click', switchTheme); +themeResetter.addEventListener('click', resetTheme); + +// Update the theme based on system preference if necessary. +if (!defaultTheme) { + window + .matchMedia('(prefers-color-scheme: dark)') + .addEventListener('change', (e) => { + setTheme(e.matches ? 'dark' : 'light'); + }); +} + +// Set initial ARIA attribute and custom theme class. +themeSwitcher.setAttribute('aria-pressed', currentTheme === 'dark'); +if (localStorage.getItem('theme')) { + themeResetter.classList.add('has-custom-theme'); +} + +// Function to handle keydown event on theme toggler buttons. +function handleThemeTogglerKeydown(event) { + if (event.key === 'Enter' || event.key === ' ') { + event.preventDefault(); + if (event.target === themeSwitcher) { + switchTheme(); + } else if (event.target === themeResetter) { + resetTheme(); + } + } +} + +themeSwitcher.addEventListener('keydown', handleThemeTogglerKeydown); +themeResetter.addEventListener('keydown', handleThemeTogglerKeydown); diff --git a/themes/tabi-lean/static/js/themeSwitcher.min.js b/themes/tabi-lean/static/js/themeSwitcher.min.js new file mode 100644 index 0000000..e563ad3 --- /dev/null +++ b/themes/tabi-lean/static/js/themeSwitcher.min.js @@ -0,0 +1 @@ +const a=document.querySelector(".theme-switcher"),r=document.querySelector(".theme-resetter"),e=document.documentElement.getAttribute("data-default-theme");function t(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}let d=localStorage.getItem("theme")||document.documentElement.getAttribute("data-theme")||t();function n(e,t=!1){document.documentElement.setAttribute("data-theme",e),d=e,a.setAttribute("aria-pressed","dark"===e),t?(localStorage.setItem("theme",e),r.classList.add("has-custom-theme")):(localStorage.removeItem("theme"),r.classList.remove("has-custom-theme")),window.dispatchEvent(new CustomEvent("themeChanged",{detail:{theme:e}}))}function c(){n(e||t())}function m(){n("dark"===d?"light":"dark",!0)}function o(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.target===a?m():e.target===r&&c())}a.addEventListener("click",m),r.addEventListener("click",c),e||window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{n(e.matches?"dark":"light")}),a.setAttribute("aria-pressed","dark"===d),localStorage.getItem("theme")&&r.classList.add("has-custom-theme"),a.addEventListener("keydown",o),r.addEventListener("keydown",o); diff --git a/themes/tabi-lean/static/js/utterances.js b/themes/tabi-lean/static/js/utterances.js new file mode 100644 index 0000000..ddfa35a --- /dev/null +++ b/themes/tabi-lean/static/js/utterances.js @@ -0,0 +1,64 @@ +function setUtterancesTheme(newTheme) { + // Get the frame with class "utterances-frame". + const frame = document.querySelector('.utterances-frame'); + + if (frame) { + // If the iframe exists, send a message to set the theme. + frame.contentWindow.postMessage( + { type: 'set-theme', theme: newTheme }, + 'https://utteranc.es' + ); + } +} + +function initUtterances() { + // Get the comments div. + const commentsDiv = document.querySelector('.comments'); + + // Check if the comments div exists. + if (commentsDiv) { + // Get all necessary attributes for initializing Utterances. + const repo = commentsDiv.getAttribute('data-repo'); + const issueTerm = commentsDiv.getAttribute('data-issue-term'); + const label = commentsDiv.getAttribute('data-label'); + const lightTheme = commentsDiv.getAttribute('data-light-theme'); + const darkTheme = commentsDiv.getAttribute('data-dark-theme'); + const lazyLoading = commentsDiv.getAttribute('data-lazy-loading'); + + // Create a new script element. + const script = document.createElement('script'); + script.src = 'https://utteranc.es/client.js'; + script.async = true; + script.setAttribute('repo', repo); + script.setAttribute('issue-term', issueTerm); + script.setAttribute('label', label); + + // Set the initial theme. + const currentTheme = + document.documentElement.getAttribute('data-theme') || 'light'; + const selectedTheme = currentTheme === 'dark' ? darkTheme : lightTheme; + script.setAttribute('theme', selectedTheme); + + script.setAttribute('crossorigin', 'anonymous'); + + // Enable lazy loading if specified. + if (lazyLoading === 'true') { + script.setAttribute('data-loading', 'lazy'); + } + + // Append the script to the comments div. + commentsDiv.appendChild(script); + + // Listen for themeChanged event to update the theme. + window.addEventListener('themeChanged', (event) => { + // Determine the new theme based on the event detail. + const selectedTheme = + event.detail.theme === 'dark' ? darkTheme : lightTheme; + // Set the new theme. + setUtterancesTheme(selectedTheme); + }); + } +} + +// Initialize Utterances. +initUtterances(); diff --git a/themes/tabi-lean/static/js/utterances.min.js b/themes/tabi-lean/static/js/utterances.min.js new file mode 100644 index 0000000..992de3b --- /dev/null +++ b/themes/tabi-lean/static/js/utterances.min.js @@ -0,0 +1 @@ +function setUtterancesTheme(t){var e=document.querySelector(".utterances-frame");e&&e.contentWindow.postMessage({type:"set-theme",theme:t},"https://utteranc.es")}function initUtterances(){var t=document.querySelector(".comments");if(t){const a=t.getAttribute("data-repo"),r=t.getAttribute("data-issue-term"),n=t.getAttribute("data-label"),i=t.getAttribute("data-light-theme"),s=t.getAttribute("data-dark-theme"),u=t.getAttribute("data-lazy-loading"),d=document.createElement("script");d.src="https://utteranc.es/client.js",d.async=!0,d.setAttribute("repo",a),d.setAttribute("issue-term",r),d.setAttribute("label",n);var e="dark"===(document.documentElement.getAttribute("data-theme")||"light")?s:i;d.setAttribute("theme",e),d.setAttribute("crossorigin","anonymous"),"true"===u&&d.setAttribute("data-loading","lazy"),t.appendChild(d),window.addEventListener("themeChanged",t=>{setUtterancesTheme("dark"===t.detail.theme?s:i)})}}initUtterances(); diff --git a/themes/tabi-lean/static/js/webmention.js b/themes/tabi-lean/static/js/webmention.js new file mode 100644 index 0000000..261b238 --- /dev/null +++ b/themes/tabi-lean/static/js/webmention.js @@ -0,0 +1,412 @@ +/* webmention.js + +Simple thing for embedding webmentions from webmention.io into a page, client-side. + +(c)2018-2022 fluffy (http://beesbuzz.biz) +2025 mmai (https://misc.rhumbs.fr) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Basic usage: + +<script src="/path/to/webmention.js" data-param="val" ... async /> +<div id="webmentions"></div> + +Allowed parameters: + + page-url: + + The base URL to use for this page. Defaults to window.location + + add-urls: + + Additional URLs to check, separated by |s + + id: + + The HTML ID for the object to fill in with the webmention data. + Defaults to "webmentions" + + wordcount: + + The maximum number of words to render in reply mentions. + + max-webmentions: + + The maximum number of mentions to retrieve. Defaults to 30. + + prevent-spoofing: + + By default, Webmentions render using the mf2 'url' element, which plays + nicely with webmention bridges (such as brid.gy and telegraph) + but allows certain spoofing attacks. If you would like to prevent + spoofing, set this to a non-empty string (e.g. "true"). + + sort-by: + + What to order the responses by; defaults to 'published'. See + https://github.com/aaronpk/webmention.io#api + + sort-dir: + + The order to sort the responses by; defaults to 'up' (i.e. oldest + first). See https://github.com/aaronpk/webmention.io#api + + comments-are-reactions: + + If set to a non-empty string (e.g. "true"), will display comment-type responses + (replies/mentions/etc.) as being part of the reactions + (favorites/bookmarks/etc.) instead of in a separate comment list. + +A more detailed example: + +<!-- If you want to translate the UI --> +<script src="/path/to/umd/i18next.js"></script> +<script> + // Setup i18next as described in https://www.i18next.com/overview/getting-started#basic-sample +</script> +<!-- Otherwise, only using the following is fine --> +<script src="/path/to/webmention.min.js" + data-id="webmentionContainer" + data-wordcount="30" + data-prevent-spoofing="true" + data-comments-are-reactions="true" + /> + +*/ + +// Begin LibreJS code licensing +// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt + +(function () { + "use strict"; + + // Shim i18next + window.i18next = window.i18next || { + t: function t(/** @type {string} */key) { return key; } + } + const t = window.i18next.t.bind(window.i18next); + + /** + * Read the configuration value. + * + * @param {string} key The configuration key. + * @param {string} dfl The default value. + * @returns {string} + */ + function getCfg(key, dfl) { + return document.currentScript.getAttribute("data-" + key) || dfl; + } + + const refurl = getCfg("page-url", window.location.href.replace(/#.*$/, "")); + const addurls = getCfg("add-urls", undefined); + const containerID = getCfg("id", "webmentions"); + /** @type {Number} */ + const textMaxWords = getCfg("wordcount"); + const maxWebmentions = getCfg("max-webmentions", 30); + const mentionSource = getCfg("prevent-spoofing") ? "wm-source" : "url"; + const sortBy = getCfg("sort-by", "published"); + const sortDir = getCfg("sort-dir", "up"); + + /** + * Strip the protocol off a URL. + * + * @param {string} url The URL to strip protocol off. + * @returns {string} + */ + function stripurl(url) { + return url.substr(url.indexOf('//')); + } + + /** + * Deduplicate multiple mentions from the same source URL. + * + * @param {Array<Reaction>} mentions Mentions of the source URL. + * @return {Array<Reaction>} + */ + function dedupe(mentions) { + /** @type {Array<Reaction>} */ + const filtered = []; + /** @type {Record<string, boolean>} */ + const seen = {}; + + mentions.forEach(function (r) { + // Strip off the protocol (i.e. treat http and https the same) + const source = stripurl(r.url); + if (!seen[source]) { + filtered.push(r); + seen[source] = true; + } + }); + + return filtered; + } + + /** + * Format comments as HTML. + * + * @param {Array<Reaction>} comments The comments to format. + * @returns string + */ + function formatComments(type, comments) { + + let html = ` + <div class="webcomments"> + <h3 id="replies-header">` + getIcon('comment') + ` <span>` + comments.length + `</span> ` + type + `s </h3> + <ol aria-labelledby="replies-header" role="list">`; + comments.forEach(function (comment) { + let content = ''; + if (comment.hasOwnProperty('content')) { + if (comment.content.hasOwnProperty('html')) { + content = comment.content.html; + } else if (comment.content.hasOwnProperty('text')) { + content = comment.content.text; + } + } + + html += ` + <li class="comment h-entry"> + <div> + <a class="comment_author u-author" + href="`+ comment.author.url + `" + target="_blank" + title="`+ comment.author.name + `" + rel="noreferrer"> + <img + src="`+ comment.author.photo + `" + alt="" + class="u-photo" + loading="lazy" + decoding="async" + width="48" + height="48" + > + <span class="p-author">`+ comment.author.name + `</span> + </a>`; + if (comment.published) { + const published = new Date(comment.published); + html += ` + <time class="dt-published" datetime="`+ comment.published + `">` + published.toLocaleString(undefined, { dateStyle: "medium", timeStyle: "short" }) + `</time>`; + } + html += ` + </div> + + <p class="e-entry">`+ content + ` + <a class="u-url" + href="`+ comment.url + `" + target="_blank" + rel="noreferrer"> + source + </a> + </p> + </li> +`; + }); + html += ` + </ol > + </div > + `; + + return html; + } + + /** + * @typedef {Object} Reaction + * @property {string} url + * @property {Object?} author + * @property {string?} author.name + * @property {string?} author.photo + * @property {Object?} content + * @property {string?} content.text + * @property {RSVPEmoji?} rsvp + * @property {MentionType?} wm-property + * @property {string?} wm-source + */ + + function getIcon(name) { + + if (name == 'like') { + return `<svg focusable = "false" width = "24" height = "24" viewBox = "0 0 192 192" xmlns = "http://www.w3.org/2000/svg" > <path d="M95.997 41.986l-.026-.035C85.746 28.36 68.428 21.423 51.165 24.881 30.138 29.094 15.004 47.558 15 69.003c0 24.413 14.906 47.964 39.486 70.086 8.43 7.586 17.437 14.468 26.444 20.533.728.49 1.444.967 2.148 1.43l1.39.909 1.355.872 1.317.835.645.403 1.259.78 1.194.726 1.032.619 1.38.807.418.236a6 6 0 005.864 0l1.138-.654 1.154-.684 1.118-.675.614-.376 1.26-.779a212 212 0 00.644-.403l1.317-.835 1.355-.872 1.39-.909c.704-.463 1.42-.94 2.148-1.43 9.007-6.065 18.015-12.947 26.444-20.533C162.094 116.967 177 93.416 177 69.004c-.004-21.446-15.138-39.91-36.165-44.123-17.07-3.42-34.174 3.323-44.43 16.568l-.408.537zm42.48-5.338c15.421 3.09 26.52 16.63 26.523 32.357 0 19.607-12.438 39.847-33.532 59.357l-1.316 1.205c-.22.201-.443.402-.666.603-7.977 7.18-16.548 13.727-25.118 19.498l-.745.5c-.74.494-1.466.973-2.177 1.437l-1.402.906-1.359.864-.662.416-1.292.8-.732.446-.73-.446-1.292-.8-.662-.416-1.36-.864-1.4-.906a235.406 235.406 0 01-2.923-1.937c-8.57-5.77-17.14-12.319-25.118-19.498l-.666-.603-1.316-1.205C39.438 108.852 27 88.612 27 69.004c.003-15.726 11.102-29.267 26.523-32.356 15.253-3.056 30.565 4.954 36.756 19.208l.204.478c2.084 4.878 9.009 4.85 11.053-.045 6.062-14.511 21.52-22.73 36.941-19.641z" fill="currentColor" /></svg> `; + } else if (name == 'repost') { + return `<svg focusable = "false" width = "24" height = "24" viewBox = "0 0 192 192" xmlns = "http://www.w3.org/2000/svg" > <path d="M18.472 146.335l-.075-.184a5.968 5.968 0 01-.216-.684l-.014-.056a5.643 5.643 0 01-.082-.397l-.013-.083a5.886 5.886 0 01-.072-.96V144c0-.157.006-.313.018-.467l.006-.075c.012-.132.028-.261.048-.39l.016-.095c.008-.05.017-.1.027-.149.005-.019.008-.038.012-.058.028-.133.06-.264.096-.393l.026-.088a5.86 5.86 0 01.482-1.159l.043-.077a5.642 5.642 0 01.31-.49l.015-.022.076-.104.044-.059a3.856 3.856 0 01.165-.208l.052-.061c.102-.12.21-.236.321-.348l18-18a6 6 0 018.661 8.303l-.175.183L38.484 138H120c23.196 0 42-18.804 42-42a6 6 0 0112 0c0 29.525-23.696 53.516-53.107 53.993L120 150H38.486l7.757 7.757a6 6 0 01.175 8.303l-.175.183a6 6 0 01-8.303.175l-.183-.175-18-18-.145-.151a6.036 6.036 0 01-.829-1.125l-.058-.105a4.08 4.08 0 01-.06-.114l-.04-.077a4.409 4.409 0 01-.139-.3l-.014-.036zM154.06 25.582l.183.175 18 18a6.036 6.036 0 01.974 1.276l.058.105c.02.035.038.07.056.105l.043.086a4.411 4.411 0 01.14.3l.014.036a5.965 5.965 0 01.291.868l.014.056c.032.13.059.263.082.397l.013.083a5.886 5.886 0 01.067.692v.014a6.11 6.11 0 01-.013.692l-.006.075a5.856 5.856 0 01-.048.39l-.016.095c-.008.05-.017.1-.027.149-.005.019-.008.038-.012.058-.028.133-.06.264-.096.393l-.026.088a5.86 5.86 0 01-.482 1.159l-.043.077-.052.09-.029.048a6.006 6.006 0 01-.32.478l-.044.059a3.857 3.857 0 01-.165.208l-.052.061a6.34 6.34 0 01-.176.197l-.145.15-18 18a6 6 0 01-8.661-8.302l.175-.183L153.514 54H72c-23.196 0-42 18.804-42 42a6 6 0 11-12 0c0-29.525 23.696-53.516 53.107-53.993L72 42h81.516l-7.759-7.757a6 6 0 01-.175-8.303l.175-.183a6 6 0 018.303-.175z" fill="currentColor" /></svg> `; + } else if (name == 'comment') { + return `<svg width = "24" height = "24" viewBox = "0 0 150 150" xmlns = "http://www.w3.org/2000/svg" > <path d="M75-.006a75 75 0 0174.997 74.31l.003.69c0 41.422-33.579 75-75 75H11.75c-6.49 0-11.75-5.26-11.75-11.75v-63.25a75 75 0 0175-75zm0 12a63 63 0 00-63 63v63h63c34.446 0 62.435-27.645 62.992-61.93l.008-1.041-.003-.633A63 63 0 0075 11.994zm21 72a6 6 0 01.225 11.996l-.225.004H51a6 6 0 01-.225-11.996l.225-.004h45zm0-24a6 6 0 01.225 11.996l-.225.004H51a6 6 0 01-.225-11.996l.225-.004h45z" fill="currentColor" /></svg> `; + } else if (name == 'bookmark') { + return `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 24 24"> +<path d="M 6.0097656 2 C 4.9143111 2 4.0097656 2.9025988 4.0097656 3.9980469 L 4 22 L 12 19 L 20 22 L 20 20.556641 L 20 4 C 20 2.9069372 19.093063 2 18 2 L 6.0097656 2 z M 6.0097656 4 L 18 4 L 18 19.113281 L 12 16.863281 L 6.0019531 19.113281 L 6.0097656 4 z" fill="currentColor"></path> +</svg>` + } + } + + /** + * Formats a list of reactions as HTML. + * + * @param {Array<Reaction>} reacts List of reactions to format + * @returns string + */ + function formatReactions(type, reacts) { + let html = ` + <div class="color--primary" > + <h3 id=`+ type + ` - header"> ` + getIcon(type) + ` <span>` + reacts.length + `</span> ` + type + `s </h3> + + <ol class="likes" role = "list" aria - labelledby="`+ type + `-header"> `; + + reacts.forEach(function (react) { + html += ` + <li class="h-card"> + <a class="u-url" + href="`+ react.author.url + ` + target="_blank" + rel = "noreferrer" + title = "`+ react.author.name + `" > + <img + alt="" + class="lazy mentions__image u-photo" + src="`+ react.author.photo + `" + loading="lazy" + decoding="async" + width="48" + height="48" + > + <span class="p-author visually-hidden" aria-hidden="true">{{ author }}</span> + </a> + </li> + `; + }); + + html += ` + </ol > + </div > + `; + return html; + } + + /** + * @typedef WebmentionResponse + * @type {Object} + * @property {Array<Reaction>} children + */ + + /** + * Register event listener. + */ + window.addEventListener("load", async function () { + const container = document.getElementById(containerID); + if (!container) { + // no container, so do nothing + return; + } + + const pages = [stripurl(refurl)]; + if (!!addurls) { + addurls.split('|').forEach(function (url) { + pages.push(stripurl(url)); + }); + } + + let apiURL = `https://webmention.io/api/mentions.jf2?per-page=${maxWebmentions}&sort-by=${sortBy}&sort-dir=${sortDir}`; + + pages.forEach(function (path) { + apiURL += `&target[]=${encodeURIComponent('http:' + path)}&target[]=${encodeURIComponent('https:' + path)}`; + }); + + // apiURL = 'http://127.0.0.1:1111/test_webmentions.jf2'; + /** @type {WebmentionResponse} */ + let json = {}; + try { + // const response = await window.fetch(apiURL); + const response = await window.fetch(apiURL); + if (response.status >= 200 && response.status < 300) { + json = await response.json(); + } else { + console.error("Could not parse response"); + new Error(response.statusText); + } + } catch (error) { + // Purposefully not escalate further, i.e. no UI update + console.error("Request failed", error); + } + + /** @type {Array<Reaction>} */ + let comments = []; + /** @type {Array<Reaction>} */ + let mentions = []; + /** @type {Array<Reaction>} */ + const bookmarks = []; + /** @type {Array<Reaction>} */ + const likes = []; + /** @type {Array<Reaction>} */ + const reposts = []; + /** @type {Array<Reaction>} */ + const follows = []; + + /** @type {Record<MentionType, Array<Reaction>>} */ + const mapping = { + "in-reply-to": comments, + "like-of": likes, + "repost-of": reposts, + "bookmark-of": bookmarks, + "follow-of": follows, + "mention-of": mentions, + "rsvp": comments + }; + + json.children.forEach(function (child) { + // Map each mention into its respective container + const store = mapping[child['wm-property']]; + if (store) { + store.push(child); + } + }); + + // format the comment-type things + let formattedMentions = ''; + if (mentions.length > 0) { + formattedMentions = formatComments('mention', dedupe(mentions)); + } + + let formattedComments = ''; + if (comments.length > 0) { + formattedComments = formatComments('comment', dedupe(comments)); + } + + // format likes + let likesStr = ''; + if (likes.length > 0) { + likesStr = formatReactions('like', dedupe(likes)); + } + + // format reposts + let repostsStr = ''; + if (reposts.length > 0) { + repostsStr = formatReactions('repost', dedupe(reposts)); + } + + // format bookmarks + let bookmarksStr = ''; + if (bookmarks.length > 0) { + bookmarksStr = formatReactions('bookmark', dedupe(bookmarks)); + } + + container.innerHTML = `<div id="webmentions">${repostsStr}${likesStr}${bookmarksStr}${formattedComments}${formattedMentions}</div>`; + }); +}()); + +// End-of-file marker for LibreJS +// @license-end diff --git a/themes/tabi-lean/static/js/webmention.min.js b/themes/tabi-lean/static/js/webmention.min.js new file mode 100644 index 0000000..5340d7e --- /dev/null +++ b/themes/tabi-lean/static/js/webmention.min.js @@ -0,0 +1,66 @@ +(()=>{function t(t,e){return document.currentScript.getAttribute("data-"+t)||e}window.i18next=window.i18next||{t:function(t){return t}},window.i18next.t.bind(window.i18next);let m=t("page-url",window.location.href.replace(/#.*$/,"")),f=t("add-urls",void 0),e=t("id","webmentions"),g=(t("wordcount"),t("max-webmentions",30)),v=(t("prevent-spoofing"),t("sort-by","published")),b=t("sort-dir","up");function y(t){return t.substr(t.indexOf("//"))}function x(t){let l=[],a={};return t.forEach(function(t){var e=y(t.url);a[e]||(l.push(t),a[e]=!0)}),l}function L(t,e){let a=` + <div class="webcomments"> + <h3 id="replies-header">`+o("comment")+" <span>"+e.length+"</span> "+t+`s </h3> + <ol aria-labelledby="replies-header" role="list">`;return e.forEach(function(t){let e="";var l;t.hasOwnProperty("content")&&(t.content.hasOwnProperty("html")?e=t.content.html:t.content.hasOwnProperty("text")&&(e=t.content.text)),a+=` + <li class="comment h-entry"> + <div> + <a class="comment_author u-author" + href="`+t.author.url+`" + target="_blank" + title="`+t.author.name+`" + rel="noreferrer"> + <img + src="`+t.author.photo+`" + alt="" + class="u-photo" + loading="lazy" + decoding="async" + width="48" + height="48" + > + <span class="p-author">`+t.author.name+`</span> + </a>`,t.published&&(l=new Date(t.published),a+=` + <time class="dt-published" datetime="`+t.published+'">'+l.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})+"</time>"),a+=` + </div> + + <p class="e-entry">`+e+` + <a class="u-url" + href="`+t.url+`" + target="_blank" + rel="noreferrer"> + source + </a> + </p> + </li> +`}),a+=` + </ol > + </div > + `}function o(t){return"like"==t?'<svg focusable = "false" width = "24" height = "24" viewBox = "0 0 192 192" xmlns = "http://www.w3.org/2000/svg" > <path d="M95.997 41.986l-.026-.035C85.746 28.36 68.428 21.423 51.165 24.881 30.138 29.094 15.004 47.558 15 69.003c0 24.413 14.906 47.964 39.486 70.086 8.43 7.586 17.437 14.468 26.444 20.533.728.49 1.444.967 2.148 1.43l1.39.909 1.355.872 1.317.835.645.403 1.259.78 1.194.726 1.032.619 1.38.807.418.236a6 6 0 005.864 0l1.138-.654 1.154-.684 1.118-.675.614-.376 1.26-.779a212 212 0 00.644-.403l1.317-.835 1.355-.872 1.39-.909c.704-.463 1.42-.94 2.148-1.43 9.007-6.065 18.015-12.947 26.444-20.533C162.094 116.967 177 93.416 177 69.004c-.004-21.446-15.138-39.91-36.165-44.123-17.07-3.42-34.174 3.323-44.43 16.568l-.408.537zm42.48-5.338c15.421 3.09 26.52 16.63 26.523 32.357 0 19.607-12.438 39.847-33.532 59.357l-1.316 1.205c-.22.201-.443.402-.666.603-7.977 7.18-16.548 13.727-25.118 19.498l-.745.5c-.74.494-1.466.973-2.177 1.437l-1.402.906-1.359.864-.662.416-1.292.8-.732.446-.73-.446-1.292-.8-.662-.416-1.36-.864-1.4-.906a235.406 235.406 0 01-2.923-1.937c-8.57-5.77-17.14-12.319-25.118-19.498l-.666-.603-1.316-1.205C39.438 108.852 27 88.612 27 69.004c.003-15.726 11.102-29.267 26.523-32.356 15.253-3.056 30.565 4.954 36.756 19.208l.204.478c2.084 4.878 9.009 4.85 11.053-.045 6.062-14.511 21.52-22.73 36.941-19.641z" fill="currentColor" /></svg> ':"repost"==t?'<svg focusable = "false" width = "24" height = "24" viewBox = "0 0 192 192" xmlns = "http://www.w3.org/2000/svg" > <path d="M18.472 146.335l-.075-.184a5.968 5.968 0 01-.216-.684l-.014-.056a5.643 5.643 0 01-.082-.397l-.013-.083a5.886 5.886 0 01-.072-.96V144c0-.157.006-.313.018-.467l.006-.075c.012-.132.028-.261.048-.39l.016-.095c.008-.05.017-.1.027-.149.005-.019.008-.038.012-.058.028-.133.06-.264.096-.393l.026-.088a5.86 5.86 0 01.482-1.159l.043-.077a5.642 5.642 0 01.31-.49l.015-.022.076-.104.044-.059a3.856 3.856 0 01.165-.208l.052-.061c.102-.12.21-.236.321-.348l18-18a6 6 0 018.661 8.303l-.175.183L38.484 138H120c23.196 0 42-18.804 42-42a6 6 0 0112 0c0 29.525-23.696 53.516-53.107 53.993L120 150H38.486l7.757 7.757a6 6 0 01.175 8.303l-.175.183a6 6 0 01-8.303.175l-.183-.175-18-18-.145-.151a6.036 6.036 0 01-.829-1.125l-.058-.105a4.08 4.08 0 01-.06-.114l-.04-.077a4.409 4.409 0 01-.139-.3l-.014-.036zM154.06 25.582l.183.175 18 18a6.036 6.036 0 01.974 1.276l.058.105c.02.035.038.07.056.105l.043.086a4.411 4.411 0 01.14.3l.014.036a5.965 5.965 0 01.291.868l.014.056c.032.13.059.263.082.397l.013.083a5.886 5.886 0 01.067.692v.014a6.11 6.11 0 01-.013.692l-.006.075a5.856 5.856 0 01-.048.39l-.016.095c-.008.05-.017.1-.027.149-.005.019-.008.038-.012.058-.028.133-.06.264-.096.393l-.026.088a5.86 5.86 0 01-.482 1.159l-.043.077-.052.09-.029.048a6.006 6.006 0 01-.32.478l-.044.059a3.857 3.857 0 01-.165.208l-.052.061a6.34 6.34 0 01-.176.197l-.145.15-18 18a6 6 0 01-8.661-8.302l.175-.183L153.514 54H72c-23.196 0-42 18.804-42 42a6 6 0 11-12 0c0-29.525 23.696-53.516 53.107-53.993L72 42h81.516l-7.759-7.757a6 6 0 01-.175-8.303l.175-.183a6 6 0 018.303-.175z" fill="currentColor" /></svg> ':"comment"==t?'<svg width = "24" height = "24" viewBox = "0 0 150 150" xmlns = "http://www.w3.org/2000/svg" > <path d="M75-.006a75 75 0 0174.997 74.31l.003.69c0 41.422-33.579 75-75 75H11.75c-6.49 0-11.75-5.26-11.75-11.75v-63.25a75 75 0 0175-75zm0 12a63 63 0 00-63 63v63h63c34.446 0 62.435-27.645 62.992-61.93l.008-1.041-.003-.633A63 63 0 0075 11.994zm21 72a6 6 0 01.225 11.996l-.225.004H51a6 6 0 01-.225-11.996l.225-.004h45zm0-24a6 6 0 01.225 11.996l-.225.004H51a6 6 0 01-.225-11.996l.225-.004h45z" fill="currentColor" /></svg> ':"bookmark"==t?`<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 24 24"> +<path d="M 6.0097656 2 C 4.9143111 2 4.0097656 2.9025988 4.0097656 3.9980469 L 4 22 L 12 19 L 20 22 L 20 20.556641 L 20 4 C 20 2.9069372 19.093063 2 18 2 L 6.0097656 2 z M 6.0097656 4 L 18 4 L 18 19.113281 L 12 16.863281 L 6.0019531 19.113281 L 6.0097656 4 z" fill="currentColor"></path> +</svg>`:void 0}function k(t,e){let l=` + <div class="color--primary" > + <h3 id=`+t+' - header"> '+o(t)+" <span>"+e.length+"</span> "+t+`s </h3> + + <ol class="likes" role = "list" aria - labelledby="`+t+'-header"> ';return e.forEach(function(t){l+=` + <li class="h-card"> + <a class="u-url" + href="`+t.author.url+` + target="_blank" + rel = "noreferrer" + title = "`+t.author.name+`" > + <img + alt="" + class="lazy mentions__image u-photo" + src="`+t.author.photo+`" + loading="lazy" + decoding="async" + width="48" + height="48" + > + <span class="p-author visually-hidden" aria-hidden="true">{{ author }}</span> + </a> + </li> + `}),l+=` + </ol > + </div > + `}window.addEventListener("load",async function(){var c=document.getElementById(e);if(c){let e=[y(m)],l=(f&&f.split("|").forEach(function(t){e.push(y(t))}),`https://webmention.io/api/mentions.jf2?per-page=${g}&sort-by=${v}&sort-dir=`+b),t=(e.forEach(function(t){l+=`&target[]=${encodeURIComponent("http:"+t)}&target[]=`+encodeURIComponent("https:"+t)}),{});try{200<=(h=await window.fetch(l)).status&&h.status<300?t=await h.json():(console.error("Could not parse response"),new Error(h.statusText))}catch(t){console.error("Request failed",t)}var h,d=[],u=[],p=[],w=[];let a={"in-reply-to":h=[],"like-of":p,"repost-of":w,"bookmark-of":u,"follow-of":[],"mention-of":d,rsvp:h},o=(t.children.forEach(function(t){var e=a[t["wm-property"]];e&&e.push(t)}),""),n=(0<d.length&&(o=L("mention",x(d))),""),r=(0<h.length&&(n=L("comment",x(h))),""),i=(0<p.length&&(r=k("like",x(p))),""),s=(0<w.length&&(i=k("repost",x(w))),"");0<u.length&&(s=k("bookmark",x(u))),c.innerHTML=`<div id="webmentions">${i}${r}${s}${n}${o}</div>`}})})(); diff --git a/themes/tabi-lean/static/katex.min.css b/themes/tabi-lean/static/katex.min.css new file mode 100644 index 0000000..30e6009 --- /dev/null +++ b/themes/tabi-lean/static/katex.min.css @@ -0,0 +1 @@ +@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.22"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/themes/tabi-lean/static/no_js.css b/themes/tabi-lean/static/no_js.css new file mode 100644 index 0000000..0294a30 --- /dev/null +++ b/themes/tabi-lean/static/no_js.css @@ -0,0 +1 @@ +.js{display:none} diff --git a/themes/tabi-lean/static/sitemap_style.xsl b/themes/tabi-lean/static/sitemap_style.xsl new file mode 100644 index 0000000..70c3bb4 --- /dev/null +++ b/themes/tabi-lean/static/sitemap_style.xsl @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="2.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"> + <xsl:output method="html" encoding="UTF-8" indent="yes" /> + + <!-- The base URL is assumed to be the first URL in the sitemap. --> + <xsl:variable name="baseUrl" select="(sitemap:urlset/sitemap:url)[1]/sitemap:loc"/> + <!-- Remove http[s]:// --> + <xsl:variable name="baseUrlWithoutProtocol" select="substring-after($baseUrl, '://')"/> + <!-- Remove trailing slash --> + <xsl:variable name="clean_base_url" select="substring-before($baseUrlWithoutProtocol, '/')"/> + + <xsl:template match="/sitemap:urlset"> + <html> + <head> + <title>Sitemap • <xsl:value-of select="$clean_base_url"/></title> + <link rel="stylesheet" href="{$baseUrl}main.css"/> + <script src="{$baseUrl}js/sortTable.min.js" defer="defer"></script> + </head> + <body> + <div class="full-width"> + <h1>Sitemap of <xsl:value-of select="$clean_base_url"/></h1> + <p>Number of URLs: <xsl:value-of select="count(sitemap:url)"/></p> + <table id="sitemapTable" class="sitemap-table" aria-label="URLs on the site and their last modification dates"> + <thead> + <tr> + <th><span class="columntitle">URL</span></th> + <th><span class="columntitle">Last modification</span></th> + </tr> + </thead> + <tbody> + <xsl:for-each select="sitemap:url"> + <tr> + <td> + <a href="{sitemap:loc}"> + <xsl:value-of select="sitemap:loc"/> + </a> + </td> + <td> + <xsl:value-of select="sitemap:lastmod"/> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </div> + </body> + </html> + </xsl:template> +</xsl:stylesheet> diff --git a/themes/tabi-lean/static/social_icons/LICENSE b/themes/tabi-lean/static/social_icons/LICENSE new file mode 100644 index 0000000..76875fb --- /dev/null +++ b/themes/tabi-lean/static/social_icons/LICENSE @@ -0,0 +1,5 @@ +Most icons in this directory are downloaded from [FontAwesome](https://fontawesome.com/). They are part of the [free offer](https://fontawesome.com/license/free) and are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). + +Exceptions: +- nostr, by Andrea Nicolini, aka Bembureda, licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/). Source: https://github.com/mbarulli/nostr-logo +- Keybase, licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/) by [Simple Icons](https://simpleicons.org/). Source: https://github.com/simple-icons/simple-icons/blob/develop/icons/keybase.svg diff --git a/themes/tabi-lean/static/social_icons/apple.svg b/themes/tabi-lean/static/social_icons/apple.svg new file mode 100644 index 0000000..d0532d5 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/apple.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/bitcoin.svg b/themes/tabi-lean/static/social_icons/bitcoin.svg new file mode 100644 index 0000000..941d9b0 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/bitcoin.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-141.651-35.33c4.937-32.999-20.191-50.739-54.55-62.573l11.146-44.702-27.213-6.781-10.851 43.524c-7.154-1.783-14.502-3.464-21.803-5.13l10.929-43.81-27.198-6.781-11.153 44.686c-5.922-1.349-11.735-2.682-17.377-4.084l.031-.14-37.53-9.37-7.239 29.062s20.191 4.627 19.765 4.913c11.022 2.751 13.014 10.044 12.68 15.825l-12.696 50.925c.76.194 1.744.473 2.829.907-.907-.225-1.876-.473-2.876-.713l-17.796 71.338c-1.349 3.348-4.767 8.37-12.471 6.464.271.395-19.78-4.937-19.78-4.937l-13.51 31.147 35.414 8.827c6.588 1.651 13.045 3.379 19.4 5.006l-11.262 45.213 27.182 6.781 11.153-44.733a1038.209 1038.209 0 0 0 21.687 5.627l-11.115 44.523 27.213 6.781 11.262-45.128c46.404 8.781 81.299 5.239 95.986-36.727 11.836-33.79-.589-53.281-25.004-65.991 17.78-4.098 31.174-15.792 34.747-39.949zm-62.177 87.179c-8.41 33.79-65.308 15.523-83.755 10.943l14.944-59.899c18.446 4.603 77.6 13.717 68.811 48.956zm8.417-87.667c-7.673 30.736-55.031 15.12-70.393 11.292l13.548-54.327c15.363 3.828 64.836 10.973 56.845 43.035z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/bluesky.svg b/themes/tabi-lean/static/social_icons/bluesky.svg new file mode 100644 index 0000000..07bbec0 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/bluesky.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M407.8 294.7c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3zM288 227.1C261.9 176.4 190.9 81.9 124.9 35.3C61.6-9.4 37.5-1.7 21.6 5.5C3.3 13.8 0 41.9 0 58.4S9.1 194 15 213.9c19.5 65.7 89.1 87.9 153.2 80.7c3.3-.5 6.6-.9 10-1.4c-3.3 .5-6.6 1-10 1.4C74.3 308.6-9.1 342.8 100.3 464.5C220.6 589.1 265.1 437.8 288 361.1c22.9 76.7 49.2 222.5 185.6 103.4c102.4-103.4 28.1-156-65.8-169.9c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3c64.1 7.1 133.6-15.1 153.2-80.7C566.9 194 576 75 576 58.4s-3.3-44.7-21.6-52.9c-15.8-7.1-40-14.9-103.2 29.8C385.1 81.9 314.1 176.4 288 227.1z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/calckey.svg b/themes/tabi-lean/static/social_icons/calckey.svg new file mode 100755 index 0000000..70c9ef1 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/calckey.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M253.327 231.222C273.138 225.034 283.687 203.21 272.188 185.932C260.55 168.444 245.621 152.451 229.602 143.462C203.361 128.737 172.782 123.673 143.189 129.15C113.596 134.628 86.862 150.3 67.642 173.439C48.422 196.579 37.9328 225.719 38.0003 255.788C38.0679 285.858 48.6879 314.951 68.0117 338.004C87.3355 361.057 114.139 376.609 143.757 381.954C173.374 387.298 203.93 382.097 230.105 367.254C247.097 357.619 260.996 342.705 271.555 325.726C281.231 310.169 273.378 290.598 257.062 282.264L246.267 276.749C230.326 268.607 210.566 276.498 198.502 289.722C195.653 292.846 192.785 295.394 190.135 296.897C180.439 302.395 169.121 304.321 158.15 302.342C147.179 300.362 137.25 294.601 130.092 286.061C122.934 277.522 119 266.745 118.975 255.607C118.95 244.469 122.835 233.674 129.955 225.103C137.075 216.531 146.977 210.726 157.939 208.697C168.901 206.668 180.229 208.544 189.949 213.998C192.537 215.451 194.968 217.547 197.216 220.038C207.837 231.804 222.93 240.717 238.06 235.991L253.327 231.222Z" fill="black"/> +<path d="M421.573 367.463C403.986 378.276 394 384 363.125 384C318.094 380.224 285.22 359.611 281.006 332.093C278.04 312.732 293.883 296.726 308.315 283.484L338.429 255.854C344.434 250.344 351.456 245.328 359.605 245.252C374.389 245.114 387 254.944 387 273.5C387 297 347.525 303.39 356.532 314.5C360.484 319.376 367.351 318.507 372.544 314.982C378.422 310.992 384.145 306.646 389.128 302.248C394.303 297.682 398.329 291.945 400.802 285.502C403.018 279.727 404.777 273.376 404.399 268.651C403.789 261.014 401.082 253.697 396.577 247.508C392.073 241.319 385.948 236.5 378.88 233.585C371.812 230.67 364.077 229.773 356.532 230.993C348.986 232.212 341.925 235.502 336.129 240.496C327.139 248.243 314.042 248.66 305.606 240.312L290.129 224.995C279.549 214.525 279.604 197.416 290.251 187.014C305.896 173.531 324.958 164.652 345.327 161.36C365.696 158.067 386.577 160.489 405.657 168.358C424.737 176.227 441.272 189.235 453.431 205.942C465.589 222.649 472.897 242.404 474.545 263.017C476.193 283.631 472.116 304.299 462.767 322.734C453.417 341.168 439.16 356.65 421.573 367.463Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/castopod.svg b/themes/tabi-lean/static/social_icons/castopod.svg new file mode 100755 index 0000000..709288a --- /dev/null +++ b/themes/tabi-lean/static/social_icons/castopod.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<rect x="86" y="86" width="340" height="341" rx="95" stroke="black" stroke-width="18"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M179.5 154C122.891 154 77 199.891 77 256.5C77 313.109 122.891 359 179.5 359H332.5C389.109 359 435 313.109 435 256.5C435 199.891 389.109 154 332.5 154H179.5ZM174.669 230.184C179.504 231.338 184.359 228.355 185.513 223.52C186.668 218.686 183.684 213.831 178.85 212.676C178.199 212.521 177.553 212.395 176.913 212.3C170.739 211.376 164.977 213.68 160.921 216.999C156.866 220.319 153.468 225.511 153.153 231.746C153.12 232.392 153.115 233.05 153.139 233.719C153.315 238.687 157.484 242.571 162.452 242.395C167.419 242.219 171.304 238.05 171.128 233.082C171.122 232.917 171.124 232.775 171.13 232.654C171.136 232.534 171.312 231.756 172.322 230.929C173.332 230.102 174.13 230.084 174.249 230.101C174.368 230.119 174.508 230.146 174.669 230.184ZM326.323 223.52C327.477 228.355 332.332 231.338 337.167 230.184C337.328 230.146 337.468 230.119 337.587 230.101C337.706 230.084 338.503 230.102 339.514 230.929C340.524 231.756 340.7 232.534 340.706 232.654C340.712 232.775 340.714 232.917 340.708 233.082C340.532 238.05 344.417 242.219 349.384 242.395C354.352 242.571 358.521 238.687 358.697 233.719C358.72 233.05 358.716 232.392 358.683 231.746C358.368 225.511 354.97 220.319 350.914 216.999C346.859 213.68 341.097 211.376 334.923 212.3C334.283 212.395 333.637 212.521 332.986 212.676C328.152 213.831 325.168 218.686 326.323 223.52ZM339 285C334.029 285 330 280.971 330 276C330 272.059 326.462 268 321 268C315.538 268 312 272.059 312 276C312 280.971 307.971 285 303 285C298.029 285 294 280.971 294 276C294 261.163 306.58 250 321 250C335.42 250 348 261.163 348 276C348 280.971 343.971 285 339 285ZM237 267C241.971 267 246 271.029 246 276C246 278.899 249.004 283 255 283C260.996 283 264 278.899 264 276C264 271.029 268.029 267 273 267C277.971 267 282 271.029 282 276C282 290.774 268.886 301 255 301C241.114 301 228 290.774 228 276C228 271.029 232.029 267 237 267ZM199 276C199 280.971 203.029 285 208 285C212.971 285 217 280.971 217 276C217 260.939 203.956 250 189.5 250C175.044 250 162 260.939 162 276C162 280.971 166.029 285 171 285C175.971 285 180 280.971 180 276C180 272.283 183.522 268 189.5 268C195.478 268 199 272.283 199 276Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/codeberg.svg b/themes/tabi-lean/static/social_icons/codeberg.svg new file mode 100644 index 0000000..d5fdd1a --- /dev/null +++ b/themes/tabi-lean/static/social_icons/codeberg.svg @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 4.233 4.233"> + <path d="M0 2.265c0 .398.112.788.323 1.125l1.765-2.281c.013-.016.044-.016.057 0l.737.953h-.528l.011.042h.549l.156.201h-.648l.018.066h.681l.137.177H2.49l.024.085h.81l.122.158h-.888l.029.104h.939l.107.139H2.625l.032.115h1.065l.099.128H2.693l.032.115H3.91c.211-.337.323-.727.323-1.125 0-1.169-.947-2.116-2.117-2.116S0 1.096 0 2.265zm2.761 1.253l.032.115h.939l.091-.115zm.068.243l.032.115h.628l.126-.115zm.067.243l.032.114h.212l.184-.114z" paint-order="markers fill stroke"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/debian.svg b/themes/tabi-lean/static/social_icons/debian.svg new file mode 100644 index 0000000..cf9d229 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/debian.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M380.2 245.6c3-7.6 5.5-14 5.2-24.4l-4.3 9c4.4-13.2 4-27.1 3.6-40.4c-.2-6-.3-11.8 0-17.4l-1.8-.5c-1.5-45.2-40.6-93.1-75.3-109.4c-30-13.8-76.1-16.2-97.3-5.8c1.3-1.1 4.2-2 6.8-2.7l.3-.1c3.3-1 6-1.7 4-2.9c-19.2 1.9-24.9 5.5-31.1 9.4l-.1 0c-4.6 2.9-9.5 6-20.3 8.7c-3.5 3.4 1.7 2 5.8 .9l0 0c4.1-1.1 7.2-1.9-.1 2.4c-3.5 1-6.6 1.3-9.6 1.6l-.1 0c-8.3 .8-15.8 1.6-30.7 17c.8 1.3 3.4-.2 5.3-1.3l.1-.1c2.3-1.4 3.4-2-1.7 4.4c-19.1-2.4-60.3 43.7-69.1 59l4.6 .8c-3.2 8-6.8 14.8-10 20.8c-4.3 8.1-7.9 14.9-8.7 21.3c-.3 5.1-1 11-1.7 17.3l0 0c-.1 1-.2 2-.3 3l-.1 .6c-3 27.3-6.7 60.8 3.9 73l-1.3 13c.6 1.2 1.1 2.3 1.6 3.5c.2 .4 .4 .8 .5 1.1l0 0 0 0 0 0 0 0 0 0 0 0 0 0c1 2.1 2 4.2 3.3 6.2l-3 .2c7 22.1 10.8 22.5 15.1 22.9l0 0c4.4 .4 9.3 .9 18.7 24.2c-2.7-.9-5.5-1.9-9.4-7.2c-.5 4.1 5.8 16.3 13.1 25.8l-3.1 3.6c2.1 3.7 4.8 6.2 7.6 8.8l0 0 0 0c1 .9 2.1 1.9 3.1 2.9c-11.9-6.5 3.2 13.7 11.9 25.2c.8 1.1 1.5 2 2.2 2.9l0 0 0 0 0 0 0 0 0 0c1.4 1.9 2.5 3.4 2.9 4.1l2.4-4.2c-.3 6.1 4.3 13.9 13.1 24.7l7.3-.3c3 6 14 16.7 20.7 17.2l-4.4 5.8c8.1 2.6 10.3 4.3 12.7 6.2c2.6 2.1 5.4 4.3 16.1 8.1l-4.2-7.4c3.5 3 6.2 5.9 8.8 8.7l.1 .1c5.2 5.6 9.9 10.6 19.7 15.3c10.7 3.7 16.6 4.7 22.7 5.8c.3 0 .6 .1 .9 .1c5.4 .8 11.2 1.8 20.8 4.5c-1.1-.1-2.2-.1-3.3-.1h0c-2.3-.1-4.7-.1-7-.1l0 0 0 0 0 0 0 0 0 0 0 0 0 0c-14.4-.2-29.2-.4-42.7-5.2C107.8 480.5 19.5 367.2 26 250.6c-.6-9.9-.3-20.9 0-30.7c.4-13.5 .7-24.8-1.6-28.3l1-3.1c5.3-17.4 11.7-38.2 23.8-62.8l-.1-.2v-.1c.4 .4 3.4 3.4 8.8-5.8c.8-1.8 1.6-3.7 2.4-5.6c.5-1.1 .9-2.2 1.4-3.2c2.5-6.1 5.1-12.3 8.4-17.9l2.6-.6c1.7-10.1 17-23.8 29.8-35.2l1.1-1c5.7-5.1 10.7-9.7 13.6-13.1l.7 4.4c17-15.9 44.6-27.5 65.6-36.4l.5-.2c4.8-2 9.3-3.9 13.3-5.7c-3.4 3.8 2.2 2.7 10 1c4.8-1 10.4-2.1 15.3-2.4l-3.9 2.1c-2.7 1.4-5.4 2.8-8 4.6c8.1-2 11.7-1.4 15.7-.8l.3 0c3.5 .6 7.3 1.2 14.6 .2c-5.6 .8-12.3 3-11.2 3.8c7.9 .9 12.8-.1 17.2-1l.2 0c5.5-1.1 10.3-2 19.3 .9l-1-4.8c7.3 2.6 12.7 4.3 17.5 5.8l.5 .1c10 3 17.6 5.3 34.2 14.1c3.2 .2 5.3-.5 7.4-1.2l.1 0c3.6-1.1 7-2.1 15.2 1.2c.3 .5 .5 1 .7 1.4c.1 .2 .2 .5 .3 .7l0 .1c1 2.6 1.8 4.6 14.6 12.1c1.7-.7-2.7-4.7-6.4-8.2c0 0 0 0-.1-.1c-.2-.1-.3-.3-.5-.4c32.2 17.3 67.3 54.1 78 93.5c-6-11.1-5.2-5.5-4.3 .5c.6 4 1.2 8.1-.2 7.5c4.5 12.1 8.1 24.5 10.4 37.4l-.8-2.9-.1-.3c-3.3-11.9-9.6-34.3-19.9-49.3c-.4 4.3-2.8 3.9-5.2 3.5l-.1 0 0 0c-3.3-.6-6.2-1.1-1.9 12.6c2.6 3.8 3.1 2.4 3.5 1.1l0 0c.5-1.5 .9-2.7 4.7 5.2c.1 4.1 1 8.2 2.1 12.7l0 0 0 0 .1 .6c.1 .3 .1 .5 .2 .8l.1 .6c.6 2.6 1.3 5.4 1.8 8.4c-1.1-.2-2.3-2.2-3.4-4.2c-1.4-2.4-2.8-4.7-3.7-3.2c2.4 11.5 6.5 17.4 8 18.3c-.3 .6-.6 .7-1.1 .7c-.8 0-1.8 .1-1.9 5.3c.7 13.7 3.3 12.5 5.3 11.6l0 0c.6-.3 1.2-.6 1.7-.4c-.6 2.5-1.6 5.1-2.7 7.9c-2.8 7.1-6 15.4-3.4 26.1c-.8-3-2-6-3.1-8.9l-.1-.4c-.2-.5-.4-1-.6-1.5l0 0c-.3-.8-.6-1.6-.9-2.3c-.6 4.4-.3 7.7-.1 10.6c0 .2 0 .5 0 .7c.4 5.3 .7 10-3 19.9c4.3-14.2 3.8-26.9-.2-20.8c1 10.9-3.7 20.4-8 28.9l-.1 .2c-3.6 7.1-6.8 13.5-5.9 19.3l-5.2-7.1c-7.5 10.9-7 13.3-6.5 15.5l0 .1c.5 1.9 1 3.8-3.4 10.8c1.7-2.9 1.3-3.6 1-4.2l0 0c-.4-.8-.7-1.5 1.7-5.1c-1.6 .1-5.5 3.9-10.1 8.5c-3.9 3.9-8.5 8.4-12.8 11.8c-37.5 30.1-82.3 34-125.6 17.8c.2-1-.2-2.1-3.1-4.1c-36.8-28.2-58.5-52.1-50.9-107.5c2.1-1.6 3.6-5.8 5.3-10.8l0 0 0 0 .2-.4 .1-.3 0-.1c2.9-8.4 6.5-18.8 14.3-23.8c7.8-17.3 31.3-33.3 56.4-33.7c25.6-1.4 47.2 13.7 58.1 27.9c-19.8-18.4-52.1-24-79.7-10.4c-28.2 12.7-45 43.8-42.5 74.7c.3-.4 .6-.6 .9-.8l0 0s0 0 0 0c0 0 .1-.1 .1-.1l.1-.1c.6-.5 1.1-.9 1.4-3.3c-.9 60.2 64.8 104.3 112.1 82l.6 1.3c12.7-3.5 15.9-6.5 20.3-10.7l.1-.1 0 0c2.2-2.1 4.7-4.5 8.9-7.3c-.3 .7-1.3 1.7-2.4 2.7c-2.2 2.1-4.6 4.5-1.6 4.6c5-1.3 18.5-13.4 28.5-22.3l0 0 0 0c.6-.5 1.2-1 1.7-1.5c1.5-1.3 2.8-2.5 4-3.6l0 0 .3-.3c1.9-4.2 1.6-5.6 1.3-7l0-.1c-.4-1.6-.8-3.3 2.4-9.6l7.3-3.7c.8-2.1 1.5-4.1 2.2-6c.2-.6 .5-1.2 .7-1.8l-.4-.2zM349.3 34.3l-.2-.1 .2 .1 0 0zM247.8 334.1c-6-3-13.7-8.9-14.8-11.4l-.4 .3c-.3 .6-.5 1.3-.2 2.2c-12.2-5.7-23.4-14.3-32.6-24.9c4.9 7.1 10.1 14.1 17 19.5c-6.9-2.3-15.1-11.8-21.6-19.3l-.1-.1c-4.3-5-7.9-9.1-9.7-9.5c19.8 35.5 80.5 62.3 112.3 49c-14.7 .5-33.4 .3-49.9-5.8zm79.3-119.7l-.1-.2c-.5-1.5-1.1-3.1-1.7-3.4c1.4-5.8 5.4-10.7 4.4 4.6c-1 3.8-1.8 1.5-2.6-1zm-4.2 22.2c-1.3 7.9-5 15.5-10.1 22.5c.2-2-1.2-2.4-2.6-2.8l0 0c-2.9-.8-5.9-1.6 5.6-16.1c-.5 1.9-2.1 4.6-3.7 7.3l0 0 0 0-.3 .4c-3.6 5.9-6.7 11 4 4.3l1-1.8c2.6-4.5 5-8.8 6-13.8h.1zm-55.6 33.9c7.1 .6 14.1 .6 21-1.1c-2.5 2.4-5.2 4.8-8.3 7.2c-11.1-1.7-21.2-6-12.7-6.1zm-92.6 11.6c3.6 7.1 6.4 11.5 9 15.7l.1 .2c2.3 3.7 4.4 7.1 6.8 11.7c-5.1-4.2-8.7-9.5-12.5-15l-.3-.5c-1.4-2.1-2.8-4.2-4.4-6.2l1.2-5.9h.1zm7.5-9.6c1.6 3.3 3.2 6.4 5.7 9.1l2.6 7.7-1.3-2.1c-3.2-5.3-6.3-10.6-8-16.7l.8 1.6 .2 .4zm238.9-41.6c-2.3 17.4-7.7 34.6-16 50.3c7.6-14.9 12.5-30.9 14.8-47.2l1.2-3.1zM35.6 110.6c.4 .8 1.4 .5 2.3 .3c1.9-.5 3.6-.9-.1 7.6c-.5 .3-1 .7-1.5 1l0 0 0 0c-1.4 .9-2.8 1.9-3.9 3c1.9-3.8 3.5-7.4 3.2-11.9zM25.3 152.3c-.7 3.7-1.5 7.9-3.4 13.9c.2-1.9 0-3.5-.2-4.9l0-.1c-.4-3.4-.7-6.3 4.3-12.8c-.3 1.2-.5 2.5-.7 3.8v.1z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/deviantart.svg b/themes/tabi-lean/static/social_icons/deviantart.svg new file mode 100644 index 0000000..7dbd0b6 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/deviantart.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M320 93.2l-98.2 179.1 7.4 9.5H320v127.7H159.1l-13.5 9.2-43.7 84c-.3 0-8.6 8.6-9.2 9.2H0v-93.2l93.2-179.4-7.4-9.2H0V102.5h156l13.5-9.2 43.7-84c.3 0 8.6-8.6 9.2-9.2H320v93.1z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/diaspora.svg b/themes/tabi-lean/static/social_icons/diaspora.svg new file mode 100644 index 0000000..55527b5 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/diaspora.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M251.64 354.55c-1.4 0-88 119.9-88.7 119.9S76.34 414 76 413.25s86.6-125.7 86.6-127.4c0-2.2-129.6-44-137.6-47.1-1.3-.5 31.4-101.8 31.7-102.1.6-.7 144.4 47 145.5 47 .4 0 .9-.6 1-1.3.4-2 1-148.6 1.7-149.6.8-1.2 104.5-.7 105.1-.3 1.5 1 3.5 156.1 6.1 156.1 1.4 0 138.7-47 139.3-46.3.8.9 31.9 102.2 31.5 102.6-.9.9-140.2 47.1-140.6 48.8-.3 1.4 82.8 122.1 82.5 122.9s-85.5 63.5-86.3 63.5c-1-.2-89-125.5-90.9-125.5z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/discord.svg b/themes/tabi-lean/static/social_icons/discord.svg new file mode 100644 index 0000000..f0dfeab --- /dev/null +++ b/themes/tabi-lean/static/social_icons/discord.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/discourse.svg b/themes/tabi-lean/static/social_icons/discourse.svg new file mode 100644 index 0000000..343bea6 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/discourse.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M225.9 32C103.3 32 0 130.5 0 252.1 0 256 .1 480 .1 480l225.8-.2c122.7 0 222.1-102.3 222.1-223.9C448 134.3 348.6 32 225.9 32zM224 384c-19.4 0-37.9-4.3-54.4-12.1L88.5 392l22.9-75c-9.8-18.1-15.4-38.9-15.4-61 0-70.7 57.3-128 128-128s128 57.3 128 128-57.3 128-128 128z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/email.svg b/themes/tabi-lean/static/social_icons/email.svg new file mode 100644 index 0000000..85245e2 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/email.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/ethereum.svg b/themes/tabi-lean/static/social_icons/ethereum.svg new file mode 100644 index 0000000..af202de --- /dev/null +++ b/themes/tabi-lean/static/social_icons/ethereum.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M311.9 260.8L160 353.6 8 260.8 160 0l151.9 260.8zM160 383.4L8 290.6 160 512l152-221.4-152 92.8z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/etsy.svg b/themes/tabi-lean/static/social_icons/etsy.svg new file mode 100644 index 0000000..ebc040a --- /dev/null +++ b/themes/tabi-lean/static/social_icons/etsy.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M384 348c-1.75 10.75-13.75 110-15.5 132-117.879-4.299-219.895-4.743-368.5 0v-25.5c45.457-8.948 60.627-8.019 61-35.25 1.793-72.322 3.524-244.143 0-322-1.029-28.46-12.13-26.765-61-36v-25.5c73.886 2.358 255.933 8.551 362.999-3.75-3.5 38.25-7.75 126.5-7.75 126.5H332C320.947 115.665 313.241 68 277.25 68h-137c-10.25 0-10.75 3.5-10.75 9.75V241.5c58 .5 88.5-2.5 88.5-2.5 29.77-.951 27.56-8.502 40.75-65.251h25.75c-4.407 101.351-3.91 61.829-1.75 160.25H257c-9.155-40.086-9.065-61.045-39.501-61.5 0 0-21.5-2-88-2v139c0 26 14.25 38.25 44.25 38.25H263c63.636 0 66.564-24.996 98.751-99.75H384z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/facebook.svg b/themes/tabi-lean/static/social_icons/facebook.svg new file mode 100644 index 0000000..0afaf7a --- /dev/null +++ b/themes/tabi-lean/static/social_icons/facebook.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/forgejo.svg b/themes/tabi-lean/static/social_icons/forgejo.svg new file mode 100755 index 0000000..64769ca --- /dev/null +++ b/themes/tabi-lean/static/social_icons/forgejo.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M181 77C123.562 77 77 123.562 77 181V332C77 389.438 123.562 436 181 436H332C389.438 436 436 389.438 436 332V181C436 123.562 389.438 77 332 77H181ZM303.03 151.269C294.762 151.269 288.06 157.971 288.06 166.239C288.06 174.506 294.762 181.209 303.03 181.209C311.297 181.209 318 174.506 318 166.239C318 157.971 311.297 151.269 303.03 151.269ZM271.173 157.714C274.93 143.638 287.769 133.269 303.03 133.269C321.239 133.269 336 148.03 336 166.239C336 184.448 321.239 199.209 303.03 199.209C288.153 199.209 275.577 189.355 271.473 175.818C242.538 179.872 220.271 204.724 220.271 234.777V275.467C232.746 260.426 250.741 250.13 271.15 247.686C274.879 233.566 287.739 223.156 303.03 223.156C321.239 223.156 336 237.917 336 256.126C336 274.335 321.239 289.096 303.03 289.096C288.188 289.096 275.637 279.289 271.503 265.802C245.851 269.666 225.495 289.692 221.136 315.179C234.719 319.254 244.615 331.852 244.615 346.762C244.615 364.971 229.854 379.732 211.645 379.732C193.436 379.732 178.675 364.971 178.675 346.762C178.675 331.81 188.629 319.182 202.271 315.144V234.777C202.271 194.874 232.414 162.01 271.173 157.714ZM288.06 256.126C288.06 247.858 294.762 241.156 303.03 241.156C311.297 241.156 318 247.858 318 256.126C318 264.394 311.297 271.096 303.03 271.096C294.762 271.096 288.06 264.394 288.06 256.126ZM196.675 346.762C196.675 338.494 203.378 331.792 211.645 331.792C219.913 331.792 226.615 338.494 226.615 346.762C226.615 355.029 219.913 361.732 211.645 361.732C203.378 361.732 196.675 355.029 196.675 346.762Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/friendica.svg b/themes/tabi-lean/static/social_icons/friendica.svg new file mode 100755 index 0000000..200aa8b --- /dev/null +++ b/themes/tabi-lean/static/social_icons/friendica.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M86 181C86 128.533 128.533 86 181 86H332C384.467 86 427 128.533 427 181V332C427 384.467 384.467 427 332 427H181C128.533 427 86 384.467 86 332V181Z" stroke="black" stroke-width="18"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M330 77H181C176.726 77 172.513 77.2578 168.374 77.7586C151.65 81.1648 128.281 89.788 109.43 105.543C91.8071 122.264 80.0368 145.092 77.5098 170.637C77.5033 171.09 77.5001 171.544 77.5001 172V341.854C80.5 372.569 105.6 434 182 434V381.854C182 359.763 199.909 341.854 222 341.854H291.299C312.673 341.854 330 324.527 330 303.153C330 281.779 312.673 264.451 291.299 264.451H222C199.909 264.451 182 246.543 182 224.451V206.513C182 184.422 199.909 166.513 222 166.513H290C312.091 166.513 330 148.605 330 126.513V77Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/funkwhale.svg b/themes/tabi-lean/static/social_icons/funkwhale.svg new file mode 100755 index 0000000..a320e0a --- /dev/null +++ b/themes/tabi-lean/static/social_icons/funkwhale.svg @@ -0,0 +1,9 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<rect x="86" y="86" width="341" height="341" rx="95" stroke="black" stroke-width="18"/> +<path d="M353.955 202.068C364.17 217.924 369.701 236.006 369.988 254.485C370.275 272.964 365.308 291.186 355.589 307.31C345.87 323.434 331.743 336.889 314.635 346.315C297.528 355.742 278.046 360.805 258.158 360.994C238.27 361.184 218.68 356.492 201.368 347.394C184.057 338.295 169.636 325.112 159.563 309.177C149.49 293.241 144.123 275.117 144.002 256.636C143.882 238.156 149.012 219.973 158.877 203.925" stroke="black" stroke-width="18" stroke-linecap="round" stroke-linejoin="round"/> +<path d="M324.266 232.106C328.403 242.193 329.86 253.06 328.513 263.783C327.165 274.506 323.052 284.767 316.525 293.693C309.998 302.619 301.25 309.944 291.025 315.046C280.801 320.148 269.403 322.876 257.801 322.996C246.2 323.116 234.74 320.626 224.396 315.737C214.051 310.848 205.13 303.705 198.391 294.917C191.652 286.129 187.295 275.955 185.691 265.263C184.087 254.57 185.284 243.675 189.179 233.506" stroke="black" stroke-width="18" stroke-linecap="round" stroke-linejoin="round"/> +<path d="M289 256C289 259.808 288.172 263.579 286.564 267.098C284.956 270.616 282.599 273.813 279.627 276.506C276.656 279.199 273.128 281.335 269.246 282.793C265.363 284.25 261.202 285 257 285C252.798 285 248.637 284.25 244.754 282.793C240.872 281.335 237.344 279.199 234.373 276.506C231.401 273.813 229.044 270.616 227.436 267.098C225.828 263.579 225 259.808 225 256" stroke="black" stroke-width="18" stroke-linecap="round" stroke-linejoin="round"/> +<path d="M245.708 245.863C245.708 251.269 251.101 254.648 254.809 255.662L255.513 255.78C256.386 255.926 257.277 255.926 258.15 255.78L258.854 255.662C262.562 254.648 268.292 251.269 268.292 245.863C268.292 239.105 268.629 213.086 296.606 207.342C324.584 201.598 331.325 171.524 330.988 164.766C330.651 158.008 301.191 164.766 284.472 172.876C274.022 177.945 257.169 184.703 257.169 197.881H256.831C256.831 184.703 239.978 177.945 229.528 172.876C212.809 164.766 183.349 158.008 183.012 164.766C182.675 171.524 189.416 201.598 217.394 207.342C245.371 213.086 245.708 239.105 245.708 245.863Z" fill="black"/> +<path d="M254.809 255.662L252.436 264.344C252.729 264.424 253.026 264.489 253.326 264.539L254.809 255.662ZM217.394 207.342L215.583 216.158L217.394 207.342ZM183.012 164.766L192.001 165.215L183.012 164.766ZM229.528 172.876L233.456 164.778V164.778L229.528 172.876ZM256.831 197.881H247.831C247.831 202.851 251.861 206.881 256.831 206.881V197.881ZM258.854 255.662L260.337 264.539C260.637 264.489 260.934 264.424 261.227 264.344L258.854 255.662ZM330.988 164.766L339.977 164.318V164.318L330.988 164.766ZM284.472 172.876L288.4 180.974V180.974L284.472 172.876ZM257.169 197.881V206.881C262.139 206.881 266.169 202.851 266.169 197.881H257.169ZM258.15 255.78L256.667 246.903L256.667 246.903L258.15 255.78ZM255.513 255.78L256.996 246.903L256.996 246.903L255.513 255.78ZM257.182 246.981C256.915 246.908 256.498 246.755 256.034 246.51C255.573 246.266 255.193 245.996 254.923 245.751C254.652 245.504 254.59 245.372 254.608 245.408C254.646 245.482 254.708 245.663 254.708 245.863H236.708C236.708 251.831 239.743 256.277 242.814 259.069C245.812 261.795 249.402 263.514 252.436 264.344L257.182 246.981ZM254.708 245.863C254.708 242.308 254.667 232.479 250.268 222.571C245.642 212.15 236.35 202.046 219.204 198.526L215.583 216.158C226.415 218.382 231.28 224.16 233.816 229.874C236.581 236.101 236.708 242.66 236.708 245.863H254.708ZM219.204 198.526C208.448 196.318 201.668 189.511 197.417 182.001C195.279 178.223 193.862 174.385 193.008 171.159C192.583 169.553 192.312 168.155 192.158 167.056C192.082 166.508 192.038 166.062 192.017 165.724C191.994 165.371 192.001 165.211 192.001 165.215L174.023 164.318C173.874 167.304 174.466 171.456 175.607 175.765C176.797 180.258 178.751 185.564 181.753 190.868C187.782 201.52 198.362 212.622 215.583 216.158L219.204 198.526ZM192.001 165.215C191.839 168.456 189.643 170.279 188.527 170.851C187.776 171.236 187.573 171.09 188.627 171.025C190.556 170.905 193.909 171.2 198.398 172.078C207.223 173.805 218.017 177.295 225.6 180.974L233.456 164.778C224.321 160.347 212.025 156.403 201.855 154.413C196.847 153.433 191.727 152.798 187.515 153.059C185.498 153.184 182.808 153.555 180.317 154.833C177.459 156.297 174.269 159.387 174.023 164.318L192.001 165.215ZM225.6 180.974C231.364 183.769 237.142 186.262 241.843 189.643C246.518 193.006 247.831 195.645 247.831 197.881H265.831C265.831 186.939 258.718 179.609 252.354 175.031C246.016 170.472 238.142 167.051 233.456 164.778L225.6 180.974ZM261.227 264.344C264.181 263.536 267.802 261.866 270.866 259.204C273.969 256.508 277.292 252.034 277.292 245.863H259.292C259.292 245.56 259.386 245.317 259.435 245.228C259.458 245.186 259.383 245.336 259.061 245.616C258.743 245.892 258.303 246.19 257.78 246.458C257.255 246.728 256.784 246.898 256.48 246.981L261.227 264.344ZM277.292 245.863C277.292 242.66 277.419 236.101 280.184 229.874C282.72 224.16 287.585 218.382 298.417 216.158L294.796 198.526C277.65 202.046 268.358 212.15 263.732 222.571C259.333 232.479 259.292 242.308 259.292 245.863H277.292ZM298.417 216.158C315.638 212.622 326.218 201.52 332.247 190.868C335.249 185.564 337.203 180.258 338.393 175.765C339.534 171.456 340.126 167.304 339.977 164.318L321.999 165.215C321.999 165.211 322.006 165.371 321.983 165.724C321.962 166.062 321.918 166.508 321.842 167.056C321.688 168.155 321.417 169.553 320.992 171.159C320.138 174.385 318.721 178.223 316.583 182.001C312.332 189.511 305.552 196.318 294.796 198.526L298.417 216.158ZM339.977 164.318C339.731 159.387 336.541 156.297 333.683 154.833C331.192 153.555 328.502 153.184 326.485 153.059C322.273 152.798 317.153 153.433 312.145 154.413C301.975 156.403 289.679 160.347 280.544 164.778L288.4 180.974C295.983 177.295 306.777 173.805 315.602 172.078C320.091 171.2 323.444 170.905 325.373 171.025C326.427 171.09 326.224 171.236 325.473 170.851C324.357 170.279 322.161 168.456 321.999 165.215L339.977 164.318ZM280.544 164.778C275.858 167.051 267.984 170.472 261.646 175.031C255.282 179.609 248.169 186.939 248.169 197.881H266.169C266.169 195.645 267.482 193.006 272.157 189.643C276.858 186.262 282.636 183.769 288.4 180.974L280.544 164.778ZM256.831 206.881H257.169V188.881H256.831V206.881ZM257.371 246.785L256.667 246.903L259.632 264.657L260.337 264.539L257.371 246.785ZM256.996 246.903L256.292 246.785L253.326 264.539L254.031 264.657L256.996 246.903ZM256.667 246.903C256.776 246.885 256.887 246.885 256.996 246.903L254.031 264.657C255.885 264.967 257.778 264.967 259.632 264.657L256.667 246.903Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/gitea.svg b/themes/tabi-lean/static/social_icons/gitea.svg new file mode 100755 index 0000000..3022da4 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/gitea.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M111 262C91.374 262 72.5518 254.204 58.6741 240.326C44.7964 226.448 37 207.626 37 188C37 168.374 44.7964 149.552 58.6741 135.674C72.5518 121.796 91.374 114 111 114L123 114" stroke="black" stroke-width="18"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M158 76C131.49 76 110 97.4903 110 124V285.5C110 367.79 176.71 434.5 259 434.5H334C416.29 434.5 483 367.79 483 285.5V124C483 97.4903 461.51 76 435 76H158ZM323 161.201V93.5H305V150.808L288.773 141.44C273.946 132.879 254.987 137.96 246.426 152.787L182.121 264.167C173.561 278.994 178.641 297.953 193.468 306.514L304.848 370.819C319.675 379.379 338.634 374.299 347.195 359.472L411.5 248.092C420.06 233.265 414.98 214.306 400.153 205.745L323 161.201ZM316.845 178.432L391.153 221.334C397.371 224.924 399.501 232.874 395.912 239.092L331.606 350.472C328.016 356.69 320.066 358.82 313.848 355.231L202.468 290.925C196.25 287.335 194.12 279.385 197.709 273.167L262.015 161.787C265.605 155.569 273.555 153.438 279.773 157.028L301.257 169.432L291.498 186.335C284.705 186.123 278.018 189.561 274.382 195.859C270.746 202.157 271.112 209.667 274.692 215.444L253.853 251.539C247.06 251.328 240.372 254.765 236.736 261.063C231.473 270.18 234.597 281.838 243.713 287.101C252.83 292.365 264.488 289.241 269.751 280.124C273.387 273.826 273.021 266.316 269.441 260.538L290.28 224.445C293.284 224.538 296.268 223.918 298.976 222.652L329.227 240.118L305.306 281.551C298.702 281.535 292.273 284.956 288.735 291.085C283.471 300.202 286.595 311.859 295.711 317.123C304.828 322.386 316.486 319.263 321.749 310.146C325.481 303.682 324.997 295.941 321.15 290.108L353.816 233.529L309.763 208.095C310.398 203.65 309.433 199.12 307.087 195.334L316.845 178.432Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/github.svg b/themes/tabi-lean/static/social_icons/github.svg new file mode 100644 index 0000000..e32807a --- /dev/null +++ b/themes/tabi-lean/static/social_icons/github.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/gitlab.svg b/themes/tabi-lean/static/social_icons/gitlab.svg new file mode 100644 index 0000000..b577d3f --- /dev/null +++ b/themes/tabi-lean/static/social_icons/gitlab.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M503.5 204.6L502.8 202.8L433.1 21.02C431.7 17.45 429.2 14.43 425.9 12.38C423.5 10.83 420.8 9.865 417.9 9.57C415 9.275 412.2 9.653 409.5 10.68C406.8 11.7 404.4 13.34 402.4 15.46C400.5 17.58 399.1 20.13 398.3 22.9L351.3 166.9H160.8L113.7 22.9C112.9 20.13 111.5 17.59 109.6 15.47C107.6 13.35 105.2 11.72 102.5 10.7C99.86 9.675 96.98 9.295 94.12 9.587C91.26 9.878 88.51 10.83 86.08 12.38C82.84 14.43 80.33 17.45 78.92 21.02L9.267 202.8L8.543 204.6C-1.484 230.8-2.72 259.6 5.023 286.6C12.77 313.5 29.07 337.3 51.47 354.2L51.74 354.4L52.33 354.8L158.3 434.3L210.9 474L242.9 498.2C246.6 500.1 251.2 502.5 255.9 502.5C260.6 502.5 265.2 500.1 268.9 498.2L300.9 474L353.5 434.3L460.2 354.4L460.5 354.1C482.9 337.2 499.2 313.5 506.1 286.6C514.7 259.6 513.5 230.8 503.5 204.6z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/google-scholar.svg b/themes/tabi-lean/static/social_icons/google-scholar.svg new file mode 100644 index 0000000..f271dca --- /dev/null +++ b/themes/tabi-lean/static/social_icons/google-scholar.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.--><path d="M390.9 298.5c0 0 0 .1 .1 .1c9.2 19.4 14.4 41.1 14.4 64C405.3 445.1 338.5 512 256 512s-149.3-66.9-149.3-149.3c0-22.9 5.2-44.6 14.4-64h0c1.7-3.6 3.6-7.2 5.6-10.7c4.4-7.6 9.4-14.7 15-21.3c27.4-32.6 68.5-53.3 114.4-53.3c33.6 0 64.6 11.1 89.6 29.9c9.1 6.9 17.4 14.7 24.8 23.5c5.6 6.6 10.6 13.8 15 21.3c2 3.4 3.8 7 5.5 10.5zm26.4-18.8c-30.1-58.4-91-98.4-161.3-98.4s-131.2 40-161.3 98.4L0 202.7 256 0 512 202.7l-94.7 77.1z"/></svg> diff --git a/themes/tabi-lean/static/social_icons/google.svg b/themes/tabi-lean/static/social_icons/google.svg new file mode 100644 index 0000000..b3776b0 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/google.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 488 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/greatape.svg b/themes/tabi-lean/static/social_icons/greatape.svg new file mode 100755 index 0000000..3a58d86 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/greatape.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M175.394 91.7845L232.098 84.5849C259.535 81.1012 286.351 93.3871 301.711 115.881L278.501 121.263C254.24 126.889 237.063 148.515 237.063 173.433V179.987C237.063 204.42 253.591 225.755 277.238 231.848L304.335 238.829L302.58 256.702C299.132 291.83 326.715 322.273 361.992 322.273H394.259C419.619 322.273 441.619 302.514 434.989 283.157C442.141 292.886 446.063 304.703 446.063 316.918V324.433H435.466L426.867 352.433C414.687 392.098 374.274 415.933 333.667 407.403L291.049 398.45C279.438 396.011 267.68 401.907 262.691 412.671C255.052 429.148 233.12 432.573 220.821 419.21L88.7782 275.742C56.8167 241.015 57.1105 187.496 89.4511 153.122L121.182 119.396C135.499 104.178 154.666 94.4163 175.394 91.7845ZM406.977 249.724L412.346 241.577L338.408 186.901L350.873 173.753C354.233 170.208 356.678 165.897 357.997 161.194C358.795 158.346 359.058 155.478 358.849 152.695C356.653 157.774 351.916 161.358 346.358 162.037L319.725 165.29V154.395H274.298V195.25L319.725 207.878L366.145 249.724H406.977ZM166.564 243.076L175.628 243.076C180.01 243.076 183.563 239.524 183.563 235.142C183.563 230.76 187.115 227.207 191.497 227.207H197.254C204.816 227.207 210.946 233.337 210.946 240.899V251.49C210.946 264.901 200.074 275.773 186.663 275.773L160.214 275.773C145.106 275.773 132.198 264.881 129.656 249.988L121.321 201.152C119.327 189.472 124.167 177.676 133.79 170.762L134.477 170.269C143.116 164.061 154.334 162.717 164.195 166.708L180.397 173.265C185.637 175.385 189.066 180.472 189.066 186.124C189.066 193.786 182.855 199.997 175.193 199.997H169.316C158.408 199.997 149.566 208.839 149.566 219.747L149.566 226.078C149.566 235.465 157.176 243.076 166.564 243.076Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/hacker-news.svg b/themes/tabi-lean/static/social_icons/hacker-news.svg new file mode 100644 index 0000000..23e3980 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/hacker-news.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 32v448h448V32H0zm21.2 197.2H21c.1-.1.2-.3.3-.4 0 .1 0 .3-.1.4zm218 53.9V384h-31.4V281.3L128 128h37.3c52.5 98.3 49.2 101.2 59.3 125.6 12.3-27 5.8-24.4 60.6-125.6H320l-80.8 155.1z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/hubzilla.svg b/themes/tabi-lean/static/social_icons/hubzilla.svg new file mode 100755 index 0000000..2d6c740 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/hubzilla.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M181 77C123.562 77 77 123.562 77 181V332C77 389.438 123.562 436 181 436H332C389.438 436 436 389.438 436 332V181C436 123.562 389.438 77 332 77H181ZM281.422 155.866C315.228 144.088 352.18 161.945 363.958 195.751C375.736 229.557 357.879 266.509 324.073 278.287C312.972 282.155 301.531 282.827 290.753 280.788L284.289 304.229C291.982 308.027 298.247 314.729 301.293 323.471C307.452 341.15 298.114 360.475 280.435 366.634C262.756 372.794 243.431 363.455 237.271 345.776C235.122 339.608 234.86 333.239 236.18 327.3L209.857 311.573C205.659 315.576 200.559 318.768 194.725 320.801C172.857 328.42 148.954 316.868 141.335 295.001C133.716 273.133 145.267 249.229 167.135 241.611C184.359 235.61 202.845 241.501 213.643 254.959L242.054 239.834C241.877 239.36 241.704 238.883 241.537 238.402C229.759 204.597 247.616 167.644 281.422 155.866ZM250.638 255.656C256.76 263.93 264.7 270.507 273.674 275.01L266.555 300.827C263.745 301.056 260.917 301.642 258.13 302.613C252.799 304.47 248.228 307.524 244.61 311.368L219.924 296.62C223.053 288.714 223.804 279.828 221.626 271.101L250.638 255.656Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/instagram.svg b/themes/tabi-lean/static/social_icons/instagram.svg new file mode 100644 index 0000000..89f63c4 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/instagram.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/itchio.svg b/themes/tabi-lean/static/social_icons/itchio.svg new file mode 100644 index 0000000..4a4ac25 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/itchio.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="235.452" width="261.728" viewBox="0 0 245.371 220.736"><path d="M31.99 1.365C21.287 7.72.2 31.945 0 38.298v10.516C0 62.144 12.46 73.86 23.773 73.86c13.584 0 24.902-11.258 24.903-24.62 0 13.362 10.93 24.62 24.515 24.62 13.586 0 24.165-11.258 24.165-24.62 0 13.362 11.622 24.62 25.207 24.62h.246c13.586 0 25.208-11.258 25.208-24.62 0 13.362 10.58 24.62 24.164 24.62 13.585 0 24.515-11.258 24.515-24.62 0 13.362 11.32 24.62 24.903 24.62 11.313 0 23.773-11.714 23.773-25.046V38.298c-.2-6.354-21.287-30.58-31.988-36.933C180.118.197 157.056-.005 122.685 0c-34.37.003-81.228.54-90.697 1.365zm65.194 66.217a28.025 28.025 0 0 1-4.78 6.155c-5.128 5.014-12.157 8.122-19.906 8.122a28.482 28.482 0 0 1-19.948-8.126c-1.858-1.82-3.27-3.766-4.563-6.032l-.006.004c-1.292 2.27-3.092 4.215-4.954 6.037a28.5 28.5 0 0 1-19.948 8.12c-.934 0-1.906-.258-2.692-.528-1.092 11.372-1.553 22.24-1.716 30.164l-.002.045c-.02 4.024-.04 7.333-.06 11.93.21 23.86-2.363 77.334 10.52 90.473 19.964 4.655 56.7 6.775 93.555 6.788h.006c36.854-.013 73.59-2.133 93.554-6.788 12.883-13.14 10.31-66.614 10.52-90.474-.022-4.596-.04-7.905-.06-11.93l-.003-.045c-.162-7.926-.623-18.793-1.715-30.165-.786.27-1.757.528-2.692.528a28.5 28.5 0 0 1-19.948-8.12c-1.862-1.822-3.662-3.766-4.955-6.037l-.006-.004c-1.294 2.266-2.705 4.213-4.563 6.032a28.48 28.48 0 0 1-19.947 8.125c-7.748 0-14.778-3.11-19.906-8.123a28.025 28.025 0 0 1-4.78-6.155 27.99 27.99 0 0 1-4.736 6.155 28.49 28.49 0 0 1-19.95 8.124c-.27 0-.54-.012-.81-.02h-.007c-.27.008-.54.02-.813.02a28.49 28.49 0 0 1-19.95-8.123 27.992 27.992 0 0 1-4.736-6.155zm-20.486 26.49l-.002.01h.015c8.113.017 15.32 0 24.25 9.746 7.028-.737 14.372-1.105 21.722-1.094h.006c7.35-.01 14.694.357 21.723 1.094 8.93-9.747 16.137-9.73 24.25-9.746h.014l-.002-.01c3.833 0 19.166 0 29.85 30.007L210 165.244c8.504 30.624-2.723 31.373-16.727 31.4-20.768-.773-32.267-15.855-32.267-30.935-11.496 1.884-24.907 2.826-38.318 2.827h-.006c-13.412 0-26.823-.943-38.318-2.827 0 15.08-11.5 30.162-32.267 30.935-14.004-.027-25.23-.775-16.726-31.4L46.85 124.08C57.534 94.073 72.867 94.073 76.7 94.073zm45.985 23.582v.006c-.02.02-21.863 20.08-25.79 27.215l14.304-.573v12.474c0 .584 5.74.346 11.486.08h.006c5.744.266 11.485.504 11.485-.08v-12.474l14.304.573c-3.928-7.135-25.79-27.215-25.79-27.215v-.006l-.003.002z" color="#000"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/keybase.svg b/themes/tabi-lean/static/social_icons/keybase.svg new file mode 100644 index 0000000..f4c2ebb --- /dev/null +++ b/themes/tabi-lean/static/social_icons/keybase.svg @@ -0,0 +1 @@ +<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Keybase</title><path d="M10.445 21.372a.953.953 0 1 1-.955-.954c.524 0 .951.43.951.955m5.923-.001a.953.953 0 1 1-.958-.954c.526 0 .954.43.954.955m4.544-9.16l-.156-.204c-.046-.06-.096-.116-.143-.175-.045-.06-.094-.113-.141-.169-.104-.12-.21-.239-.32-.359l-.075-.08-.091-.099-.135-.13c-.015-.019-.032-.035-.05-.054a10.87 10.87 0 0 0-3.955-2.504l-.23-.078.035-.083a4.109 4.109 0 0 0-.12-3.255 4.11 4.11 0 0 0-2.438-2.16c-.656-.216-1.23-.319-1.712-.305-.033-.105-.1-.577.496-1.848L10.662 0l-.287.399c-.33.455-.648.895-.945 1.328a1.857 1.857 0 0 0-1.245-.58L6.79 1.061h-.012c-.033-.003-.07-.003-.104-.003-.99 0-1.81.771-1.87 1.755l-.088 1.402v.003a1.876 1.876 0 0 0 1.755 1.98l1.002.06c-.065.84.073 1.62.405 2.306a11.28 11.28 0 0 0-3.66 2.484C.912 14.392.912 18.052.912 20.995v1.775l1.305-1.387c.266.93.652 1.807 1.145 2.615H5.06a9.197 9.197 0 0 1-1.68-3.848l1.913-2.03-.985 3.09 1.74-1.267c3.075-2.234 6.745-2.75 10.91-1.53 1.806.533 3.56.04 4.474-1.256l.104-.165c.09.498.14.998.14 1.496 0 1.563-.254 3.687-1.38 5.512h1.612c.776-1.563 1.181-3.432 1.181-5.512-.001-2.2-.786-4.421-2.184-6.274zM8.894 6.192c.122-1.002.577-1.949 1.23-2.97a1.36 1.36 0 0 0 1.283.749c.216-.008.604.025 1.233.232a2.706 2.706 0 0 1 1.608 1.425c.322.681.349 1.442.079 2.15a2.69 2.69 0 0 1-.806 1.108l-.408-.502-.002-.003a1.468 1.468 0 0 0-2.06-.205c-.334.27-.514.66-.534 1.058-1.2-.54-1.8-1.643-1.628-3.04zm4.304 5.11l-.52.425a.228.228 0 0 1-.323-.032l-.11-.135a.238.238 0 0 1 .034-.334l.51-.42-1.056-1.299a.307.307 0 0 1 .044-.436.303.303 0 0 1 .435.041l2.963 3.646a.309.309 0 0 1-.168.499.315.315 0 0 1-.31-.104l-.295-.365-1.045.854a.244.244 0 0 1-.154.055.237.237 0 0 1-.186-.09l-.477-.58a.24.24 0 0 1 .035-.335l1.05-.858-.425-.533zM7.752 4.866l-1.196-.075a.463.463 0 0 1-.435-.488l.09-1.4a.462.462 0 0 1 .461-.437h.024l1.401.091a.459.459 0 0 1 .433.488l-.007.101a9.27 9.27 0 0 0-.773 1.72zm12.525 11.482c-.565.805-1.687 1.08-2.924.718-3.886-1.141-7.397-.903-10.469.7l1.636-5.122-5.29 5.609c.098-3.762 2.452-6.967 5.757-8.312.471.373 1.034.66 1.673.841.16.044.322.074.48.102a1.41 1.41 0 0 0 .21 1.408l.075.09c-.172.45-.105.975.221 1.374l.476.582a1.39 1.39 0 0 0 1.079.513c.32 0 .635-.111.886-.314l.285-.232c.174.074.367.113.566.113a1.45 1.45 0 0 0 .928-.326c.623-.51.72-1.435.209-2.06l-1.67-2.057a4.07 4.07 0 0 0 .408-.38c.135.036.27.077.4.12.266.096.533.197.795.314a9.55 9.55 0 0 1 2.77 1.897c.03.03.06.055.086.083l.17.176c.038.039.076.079.11.12.08.085.16.175.24.267l.126.15c.045.053.086.104.13.16l.114.15c.04.05.079.102.117.154.838 1.149.987 2.329.404 3.157v.005zM7.718 4.115l-.835-.05.053-.836.834.051z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/lemmy.svg b/themes/tabi-lean/static/social_icons/lemmy.svg new file mode 100755 index 0000000..07eede1 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/lemmy.svg @@ -0,0 +1,8 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M289 395C289 411.913 274.884 426 257 426C239.116 426 225 411.913 225 395C225 378.087 239.116 364 257 364C274.884 364 289 378.087 289 395Z" stroke="black" stroke-width="18"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M187.997 113.368C126.039 111.595 74.8511 161.339 74.8511 223.323V290.043C74.8511 349.569 122.203 398.296 181.705 399.998L217.077 401.01C216.862 399.32 216.751 397.598 216.751 395.849C216.751 373.544 234.832 355.462 257.137 355.462C279.442 355.462 297.524 373.544 297.524 395.849C297.524 398.392 297.289 400.88 296.84 403.293L324.095 404.073C386.053 405.845 437.241 356.101 437.241 294.117V227.397C437.241 167.871 389.889 119.145 330.387 117.443L187.997 113.368ZM349 313C361.15 313 371 303.15 371 291C371 278.85 361.15 269 349 269C336.85 269 327 278.85 327 291C327 303.15 336.85 313 349 313ZM349 331C371.091 331 389 313.091 389 291C389 268.909 371.091 251 349 251C326.909 251 309 268.909 309 291C309 313.091 326.909 331 349 331ZM185 291C185 303.15 175.15 313 163 313C150.85 313 141 303.15 141 291C141 278.85 150.85 269 163 269C175.15 269 185 278.85 185 291ZM203 291C203 313.091 185.091 331 163 331C140.909 331 123 313.091 123 291C123 268.909 140.909 251 163 251C185.091 251 203 268.909 203 291Z" fill="black"/> +<path d="M408.586 359L453 379.861M383 379.861L408.586 408" stroke="black" stroke-width="18" stroke-linecap="round"/> +<path d="M103.414 359L59 379.861M129 379.861L103.414 408" stroke="black" stroke-width="18" stroke-linecap="round"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M139.653 123.006C131.167 105.821 113.464 94 93 94C64.2812 94 41 117.281 41 146C41 169.612 56.7378 189.549 78.2961 195.892C76.8144 201.667 75.7895 207.628 75.2628 213.733C45.1917 205.88 23 178.532 23 146C23 107.34 54.3401 76 93 76C121.297 76 145.672 92.7902 156.707 116.951C150.817 118.507 145.117 120.539 139.653 123.006ZM96.4091 197.89C123.539 196.134 145 173.573 145 146C145 144.148 144.903 142.318 144.714 140.516C150.199 137.851 155.985 135.717 162.006 134.178C162.66 138.021 163 141.971 163 146C163 184.614 131.734 215.925 93.1379 216C93.6283 209.765 94.7396 203.708 96.4091 197.89ZM436.378 213.563C466.123 205.491 488 178.3 488 146C488 107.34 456.66 76 418 76C388.377 76 363.053 94.4002 352.831 120.395C358.75 121.804 364.48 123.691 369.981 126.011C377.814 107.214 396.364 94 418 94C446.719 94 470 117.281 470 146C470 169.627 454.242 189.574 432.663 195.904C434.366 201.611 435.618 207.512 436.378 213.563ZM414.4 197.877C416.365 203.682 417.767 209.744 418.541 215.998C418.361 215.999 418.18 216 418 216C379.34 216 348 184.66 348 146C348 143.248 348.159 140.532 348.468 137.863C354.587 139.307 360.466 141.361 366.039 143.956C366.013 144.634 366 145.315 366 146C366 173.509 387.36 196.028 414.4 197.877Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/letterboxd.svg b/themes/tabi-lean/static/social_icons/letterboxd.svg new file mode 100644 index 0000000..d3e1925 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/letterboxd.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M521.3 128C586.9 128 640 181.1 640 246.6s-53.1 118.6-118.7 118.6c-42.5 0-79.7-22.3-100.7-55.8c11.4-18.2 18-39.7 18-62.8s-6.6-44.6-18-62.8l0 0 .8-1.2c20.8-32.3 56.8-53.9 97.9-54.6l2 0zM320 128c42.5 0 79.7 22.3 100.7 55.8c-11.4 18.2-18 39.7-18 62.8s6.6 44.6 18 62.8l0 0-.8 1.2c-20.8 32.3-56.8 53.9-97.9 54.6l-2 0c-42.5 0-79.7-22.3-100.7-55.8c11.4-18.2 18-39.7 18-62.8s-6.6-44.6-18-62.8l0 0 .8-1.2c20.8-32.3 56.8-53.9 97.9-54.6l2 0zm-201.3 0c42.5 0 79.7 22.3 100.7 55.8c-11.4 18.2-18 39.7-18 62.8s6.6 44.6 18 62.8l0 0-.8 1.2c-20.8 32.3-56.8 53.9-97.9 54.6l-2 0C53.1 365.1 0 312.1 0 246.6S53.1 128 118.7 128z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/linkedin.svg b/themes/tabi-lean/static/social_icons/linkedin.svg new file mode 100644 index 0000000..d54fcf5 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/linkedin.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/mastodon.svg b/themes/tabi-lean/static/social_icons/mastodon.svg new file mode 100644 index 0000000..5e12f81 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/mastodon.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5zm-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/matrix.svg b/themes/tabi-lean/static/social_icons/matrix.svg new file mode 100644 index 0000000..7618c33 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/matrix.svg @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 520 520" style="enable-background:new 0 0 520 520;" xml:space="preserve"> +<path d="M13.7,11.9v496.2h35.7V520H0V0h49.4v11.9H13.7z"/> +<path d="M166.3,169.2v25.1h0.7c6.7-9.6,14.8-17,24.2-22.2c9.4-5.3,20.3-7.9,32.5-7.9c11.7,0,22.4,2.3,32.1,6.8 c9.7,4.5,17,12.6,22.1,24c5.5-8.1,13-15.3,22.4-21.5c9.4-6.2,20.6-9.3,33.5-9.3c9.8,0,18.9,1.2,27.3,3.6c8.4,2.4,15.5,6.2,21.5,11.5 c6,5.3,10.6,12.1,14,20.6c3.3,8.5,5,18.7,5,30.7v124.1h-50.9V249.6c0-6.2-0.2-12.1-0.7-17.6c-0.5-5.5-1.8-10.3-3.9-14.3 c-2.2-4.1-5.3-7.3-9.5-9.7c-4.2-2.4-9.9-3.6-17-3.6c-7.2,0-13,1.4-17.4,4.1c-4.4,2.8-7.9,6.3-10.4,10.8c-2.5,4.4-4.2,9.4-5,15.1 c-0.8,5.6-1.3,11.3-1.3,17v103.3h-50.9v-104c0-5.5-0.1-10.9-0.4-16.3c-0.2-5.4-1.3-10.3-3.1-14.9c-1.8-4.5-4.8-8.2-9-10.9 c-4.2-2.7-10.3-4.1-18.5-4.1c-2.4,0-5.6,0.5-9.5,1.6c-3.9,1.1-7.8,3.1-11.5,6.1c-3.7,3-6.9,7.3-9.5,12.9c-2.6,5.6-3.9,13-3.9,22.1 v107.6h-50.9V169.2H166.3z"/> +<path d="M506.3,508.1V11.9h-35.7V0H520v520h-49.4v-11.9H506.3z"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/misskey.svg b/themes/tabi-lean/static/social_icons/misskey.svg new file mode 100755 index 0000000..ab3a381 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/misskey.svg @@ -0,0 +1,9 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M95.2379 182.246V350.989C95.2379 364.802 106.436 376 120.249 376H121.593C135.406 376 146.604 364.802 146.604 350.989V245.078L164.604 266.756V350.989C164.604 374.743 145.347 394 121.593 394H120.249C96.4945 394 77.2379 374.743 77.2379 350.989V160.011C77.2379 136.257 96.4945 117 120.249 117H121.593C139.006 117 154.002 127.348 160.768 142.23L157.719 138.558C146.429 124.962 126.254 123.092 112.657 134.382L108.18 138.099C105.125 139.786 102.459 142.093 100.354 144.851C90.6383 154.915 88.6789 170.119 95.2379 182.246ZM256.001 267.238V350.989C256.001 374.743 275.258 394 299.012 394H300.356C324.11 394 343.367 374.743 343.367 350.989V160.011C343.367 136.257 324.11 117 300.356 117H299.012C281.203 117 265.923 127.823 259.389 143.251L263.285 138.558C274.575 124.962 294.75 123.092 308.347 134.382L313.839 138.942C315.594 140.067 317.199 141.406 318.618 142.922C330.282 153.074 332.857 169.929 325.367 182.963V350.989C325.367 364.802 314.169 376 300.356 376H299.012C285.199 376 274.001 364.802 274.001 350.989V245.56L256.001 267.238Z" fill="black"/> +<path d="M327.482 127.637C345.737 142.828 348.247 169.974 333.09 188.269L249.846 288.741C225.458 321.519 195.25 320.846 170.434 288.144L88.0374 188.694C72.6853 170.164 75.2282 142.671 93.717 127.285C112.206 111.899 139.639 114.447 154.991 132.977L207.307 196.12C208.907 198.051 211.868 198.051 213.468 196.12L266.136 132.552C281.293 114.257 308.379 111.741 326.634 126.932L327.482 127.637Z" fill="black"/> +<path d="M189.5 297.5L95 186C92.6667 183.667 88 178.2 88 175C88 171 88.5 151 88 143.5C87.5 136 103.5 128.5 116.5 125C126.9 122.2 137.5 128.5 141.5 132C172.167 168.667 235 243.4 241 249C247 254.6 247.5 270.333 247 277.5C241 284.167 227.2 298.7 220 303.5C212.8 308.3 196.667 301.5 189.5 297.5Z" fill="black" stroke="black"/> +<path d="M358 239C358 218.013 375.013 201 396 201C416.987 201 434 218.013 434 239V356C434 376.987 416.987 394 396 394C375.013 394 358 376.987 358 356V239Z" fill="black"/> +<ellipse cx="397" cy="156" rx="37" ry="38" fill="black"/> +<path d="M264.5 357.5V264V257L334.5 179.5V357.5L325.5 372L310 383.5H296L278 376.5L264.5 357.5Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/nostr.svg b/themes/tabi-lean/static/social_icons/nostr.svg new file mode 100755 index 0000000..fd103ae --- /dev/null +++ b/themes/tabi-lean/static/social_icons/nostr.svg @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 27.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="_8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" + viewBox="0 0 256 256" xml:space="preserve"> +<style type="text/css"> + .st0{fill:none;} + .st1{fill:#fff;} + .st2{fill:#000;} +</style> +<g> + <path class="st0" d="M0,0v256h256V0H0z M231.2,159.2c0,20.7,0,31.1-3.5,42.2c-4.4,12.2-14,21.8-26.2,26.2 + c-11.1,3.5-21.5,3.5-42.2,3.5H96.8c-20.7,0-31.1,0-42.2-3.5c-12.2-4.4-21.8-14-26.2-26.2c-3.5-11.1-3.5-21.5-3.5-42.2V96.8 + c0-20.7,0-31.1,3.5-42.2c4.4-12.2,14-21.8,26.2-26.2c11.2-3.5,21.5-3.5,42.2-3.5h62.5c20.7,0,31.1,0,42.2,3.5 + c12.2,4.4,21.8,14,26.2,26.2c3.5,11.1,3.5,21.5,3.5,42.2V159.2z"/> + <circle class="st1" cx="137.9" cy="99" r="12.1"/> + <path class="st1" d="M210.8,115.9c0-47.3-27.7-68.7-64.4-68.7c-16.4,0-31,4.4-42.4,12.5c-3.8,2.7-9,0.1-9-4.5 + c0-3.1-2.5-5.7-5.7-5.7H57.7c-3.1,0-5.7,2.5-5.7,5.7v144c0,3.1,2.5,5.7,5.7,5.7h33.7c3.1,0,5.6-2.5,5.6-5.6v-8.4 + c0-62.8-33.2-109.8-0.4-116c30-5.7,64.1-3,64.5,20.1c0,2,0.3,8,8.6,11.2c5,2,12.6,2.6,22.6,2.4c0,0,9.1-0.7,9.1,8.5 + c0,11.5-20.4,10.7-20.4,10.7c-6.7,0.3-22.6-1.5-31.7,1.2c-4.8,1.5-9,4.2-11.5,9.1c-4.2,8.3-6.2,26.5-6.5,45.5v15.5 + c0,3.1,2.5,5.7,5.7,5.7h68c3.1,0,5.7-2.5,5.7-5.7l0,0V115.9z"/> + <path class="st2" d="M227.6,54.6c-4.4-12.2-14-21.8-26.2-26.2c-11.1-3.5-21.5-3.5-42.2-3.5H96.8c-20.7,0-31.1,0-42.2,3.5 + c-12.2,4.4-21.8,14-26.2,26.2c-3.5,11.2-3.5,21.5-3.5,42.2v62.5c0,20.7,0,31.1,3.5,42.2c4.4,12.2,14,21.8,26.2,26.2 + c11.2,3.5,21.5,3.5,42.2,3.5h62.5c20.7,0,31.1,0,42.2-3.5c12.2-4.4,21.8-14,26.2-26.2c3.5-11.1,3.5-21.5,3.5-42.2V96.8 + C231.2,76.1,231.2,65.7,227.6,54.6z M205.1,204.8h-68c-3.1,0-5.7-2.5-5.7-5.7v-15.5c0.3-19,2.3-37.2,6.5-45.5 + c2.5-5,6.7-7.7,11.5-9.1c9-2.7,24.9-0.9,31.7-1.2c0,0,20.4,0.8,20.4-10.7c0-9.3-9.1-8.5-9.1-8.5c-10,0.3-17.7-0.4-22.6-2.4 + c-8.3-3.3-8.6-9.2-8.6-11.2c-0.4-23.1-34.5-25.9-64.5-20.1c-32.8,6.2,0.4,53.3,0.4,116v8.4c-0.1,3.1-2.5,5.6-5.6,5.6H57.7 + c-3.1,0-5.7-2.5-5.7-5.7v-144c0-3.1,2.5-5.7,5.7-5.7h31.7c3.1,0,5.7,2.5,5.7,5.7c0,4.7,5.2,7.2,9,4.5c11.4-8.2,26-12.5,42.4-12.5 + c36.7,0,64.4,21.4,64.4,68.7v83.2l0,0C210.8,202.3,208.3,204.8,205.1,204.8z M125.7,99c0-6.7,5.4-12.1,12.1-12.1S150,92.3,150,99 + s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"/> +</g> +</svg> diff --git a/themes/tabi-lean/static/social_icons/orcid.svg b/themes/tabi-lean/static/social_icons/orcid.svg new file mode 100644 index 0000000..2c3e4bd --- /dev/null +++ b/themes/tabi-lean/static/social_icons/orcid.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M294.8 188.2h-45.9V342h47.5c67.6 0 83.1-51.3 83.1-76.9 0-41.6-26.5-76.9-84.7-76.9zM256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm-80.8 360.8h-29.8v-207.5h29.8zm-14.9-231.1a19.6 19.6 0 1 1 19.6-19.6 19.6 19.6 0 0 1 -19.6 19.6zM300 369h-81V161.3h80.6c76.7 0 110.4 54.8 110.4 103.9C410 318.4 368.4 369 300 369z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/paypal.svg b/themes/tabi-lean/static/social_icons/paypal.svg new file mode 100644 index 0000000..efdc81a --- /dev/null +++ b/themes/tabi-lean/static/social_icons/paypal.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M111.4 295.9c-3.5 19.2-17.4 108.7-21.5 134-.3 1.8-1 2.5-3 2.5H12.3c-7.6 0-13.1-6.6-12.1-13.9L58.8 46.6c1.5-9.6 10.1-16.9 20-16.9 152.3 0 165.1-3.7 204 11.4 60.1 23.3 65.6 79.5 44 140.3-21.5 62.6-72.5 89.5-140.1 90.3-43.4.7-69.5-7-75.3 24.2zM357.1 152c-1.8-1.3-2.5-1.8-3 1.3-2 11.4-5.1 22.5-8.8 33.6-39.9 113.8-150.5 103.9-204.5 103.9-6.1 0-10.1 3.3-10.9 9.4-22.6 140.4-27.1 169.7-27.1 169.7-1 7.1 3.5 12.9 10.6 12.9h63.5c8.6 0 15.7-6.3 17.4-14.9.7-5.4-1.1 6.1 14.4-91.3 4.6-22 14.3-19.7 29.3-19.7 71 0 126.4-28.8 142.9-112.3 6.5-34.8 4.6-71.4-23.8-92.6z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/peertube.svg b/themes/tabi-lean/static/social_icons/peertube.svg new file mode 100755 index 0000000..3986e7f --- /dev/null +++ b/themes/tabi-lean/static/social_icons/peertube.svg @@ -0,0 +1,7 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M280.5 358.5L173.503 420.287C142.17 438.381 103 415.768 103 379.586L103 256L280.5 358.5Z" fill="black"/> +<path d="M280.5 153.5L103 256L103 132.414C103 96.232 142.17 73.6194 173.504 91.7133L280.5 153.5Z" fill="black"/> +<path d="M387.518 215.299C418.846 233.39 418.846 278.61 387.517 296.701L280.5 358.5L280.5 153.5L387.518 215.299Z" fill="black"/> +<path d="M280.5 358.5L173.503 420.287C142.17 438.381 103 415.768 103 379.586L103 256M280.5 358.5L103 256M280.5 358.5L387.517 296.701C418.846 278.61 418.846 233.39 387.518 215.299L280.5 153.5M280.5 358.5L280.5 153.5M103 256L280.5 153.5M103 256L103 132.414C103 96.232 142.17 73.6194 173.504 91.7133L280.5 153.5" stroke="black" stroke-width="18"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/pinterest.svg b/themes/tabi-lean/static/social_icons/pinterest.svg new file mode 100644 index 0000000..eb977c2 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/pinterest.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/pixelfed.svg b/themes/tabi-lean/static/social_icons/pixelfed.svg new file mode 100755 index 0000000..87b2154 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/pixelfed.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M435 256C435 287.17 427.033 316.479 413.025 342.001C391.664 344.91 368.991 344.165 348.586 337.918C329.966 332.217 313.449 322.017 301.281 306.026C299.348 303.486 297.512 300.783 295.787 297.908C322.925 294.791 344 271.74 344 243.767V237.274C345.958 236.247 347.862 235.153 349.711 233.993C369.733 221.44 382.241 201.974 389.607 180.708C393.431 169.668 395.931 157.977 397.382 146.204C420.959 176.521 435 214.621 435 256ZM342.867 216.945C356.957 207.118 366.533 192.327 372.598 174.816C377.719 160.034 380.192 143.709 380.825 127.705C348.58 96.3263 304.547 77 256 77C157.141 77 77 157.141 77 256C77 258.032 77.0339 260.057 77.1011 262.073C96.1237 244.734 119.094 233.101 142.821 226.028C158.042 221.49 173.696 218.784 189 217.631V206C189 188.327 203.327 174 221 174H255.71C245.912 144.618 225.33 124.59 201.78 111.04C192.329 105.602 182.427 101.233 172.602 97.7727C179.957 93.8773 187.615 90.478 195.531 87.6195C200.671 89.9669 205.766 92.5664 210.757 95.4379C238.99 111.683 264.048 136.818 274.552 174H290C316.034 174 337.766 192.424 342.867 216.945ZM190.988 346.224C189.952 346.156 189 345.326 189 344.111V267.2V236.134V235.685C175.434 236.792 161.529 239.233 147.964 243.277C121.972 251.026 97.6574 264.497 79.405 285.413C90.518 352.636 139.086 407.22 202.953 427.009C200.261 421.782 197.985 416.505 196.101 411.193C188.308 389.215 187.398 367.119 190.988 346.224ZM215.671 323.921C213.579 329.506 211.806 335.226 210.418 341.045C205.458 361.831 205.442 383.677 213.066 405.177C216.321 414.355 221.008 423.585 227.418 432.73C236.725 434.224 246.272 435 256 435C315.506 435 368.23 405.964 400.777 361.286C381.537 362.46 361.757 360.775 343.317 355.129C321.737 348.523 301.786 336.413 286.957 316.926C282.66 311.28 278.835 305.068 275.539 298.267H266.5H253.963H247.695H244.561C242.554 298.267 240.629 299.064 239.211 300.484L238.435 301.26L235.443 304.252L229.46 310.238L217.493 322.208L215.671 323.921Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/pleroma.svg b/themes/tabi-lean/static/social_icons/pleroma.svg new file mode 100755 index 0000000..b2390cc --- /dev/null +++ b/themes/tabi-lean/static/social_icons/pleroma.svg @@ -0,0 +1,6 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M144 124C144 97.4903 165.49 76 192 76H209C222.255 76 233 86.7452 233 100V412C233 425.255 222.255 436 209 436H168C154.745 436 144 425.255 144 412V124Z" fill="black"/> +<path d="M278 100C278 86.7452 288.745 76 302 76H344C357.255 76 368 86.7452 368 100V227C368 251.853 347.853 272 323 272H302C288.745 272 278 261.255 278 248V100Z" fill="black"/> +<path d="M278 358C278 344.745 288.745 334 302 334H344C357.255 334 368 344.745 368 358V388C368 414.51 346.51 436 320 436H302C288.745 436 278 425.255 278 412V358Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/quora.svg b/themes/tabi-lean/static/social_icons/quora.svg new file mode 100644 index 0000000..375d302 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/quora.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M440.5 386.7h-29.3c-1.5 13.5-10.5 30.8-33 30.8-20.5 0-35.3-14.2-49.5-35.8 44.2-34.2 74.7-87.5 74.7-153C403.5 111.2 306.8 32 205 32 105.3 32 7.3 111.7 7.3 228.7c0 134.1 131.3 221.6 249 189C276 451.3 302 480 351.5 480c81.8 0 90.8-75.3 89-93.3zM297 329.2C277.5 300 253.3 277 205.5 277c-30.5 0-54.3 10-69 22.8l12.2 24.3c6.2-3 13-4 19.8-4 35.5 0 53.7 30.8 69.2 61.3-10 3-20.7 4.2-32.7 4.2-75 0-107.5-53-107.5-156.7C97.5 124.5 130 71 205 71c76.2 0 108.7 53.5 108.7 157.7.1 41.8-5.4 75.6-16.7 100.5z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/reddit.svg b/themes/tabi-lean/static/social_icons/reddit.svg new file mode 100644 index 0000000..a8a3a96 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/reddit.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M201.5 305.5c-13.8 0-24.9-11.1-24.9-24.6 0-13.8 11.1-24.9 24.9-24.9 13.6 0 24.6 11.1 24.6 24.9 0 13.6-11.1 24.6-24.6 24.6zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-132.3-41.2c-9.4 0-17.7 3.9-23.8 10-22.4-15.5-52.6-25.5-86.1-26.6l17.4-78.3 55.4 12.5c0 13.6 11.1 24.6 24.6 24.6 13.8 0 24.9-11.3 24.9-24.9s-11.1-24.9-24.9-24.9c-9.7 0-18 5.8-22.1 13.8l-61.2-13.6c-3-.8-6.1 1.4-6.9 4.4l-19.1 86.4c-33.2 1.4-63.1 11.3-85.5 26.8-6.1-6.4-14.7-10.2-24.1-10.2-34.9 0-46.3 46.9-14.4 62.8-1.1 5-1.7 10.2-1.7 15.5 0 52.6 59.2 95.2 132 95.2 73.1 0 132.3-42.6 132.3-95.2 0-5.3-.6-10.8-1.9-15.8 31.3-16 19.8-62.5-14.9-62.5zM302.8 331c-18.2 18.2-76.1 17.9-93.6 0-2.2-2.2-6.1-2.2-8.3 0-2.5 2.5-2.5 6.4 0 8.6 22.8 22.8 87.3 22.8 110.2 0 2.5-2.2 2.5-6.1 0-8.6-2.2-2.2-6.1-2.2-8.3 0zm7.7-75c-13.6 0-24.6 11.1-24.6 24.9 0 13.6 11.1 24.6 24.6 24.6 13.8 0 24.9-11.1 24.9-24.6 0-13.8-11-24.9-24.9-24.9z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/rss.svg b/themes/tabi-lean/static/social_icons/rss.svg new file mode 100644 index 0000000..b862886 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/rss.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 64C0 46.3 14.3 32 32 32c229.8 0 416 186.2 416 416c0 17.7-14.3 32-32 32s-32-14.3-32-32C384 253.6 226.4 96 32 96C14.3 96 0 81.7 0 64zM128 416c0 35.3-28.7 64-64 64s-64-28.7-64-64s28.7-64 64-64s64 28.7 64 64zM32 160c159.1 0 288 128.9 288 288c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-123.7-100.3-224-224-224c-17.7 0-32-14.3-32-32s14.3-32 32-32z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/signal.svg b/themes/tabi-lean/static/social_icons/signal.svg new file mode 100644 index 0000000..c6ee14a --- /dev/null +++ b/themes/tabi-lean/static/social_icons/signal.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M194.6 7.5l5.8 23.3C177.7 36.3 156 45.3 136 57.4L123.7 36.8c22-13.3 45.9-23.2 70.9-29.3zm122.9 0l-5.8 23.3C334.3 36.3 356 45.3 376 57.4l12.4-20.6c-22-13.3-46-23.2-71-29.3zM36.8 123.7c-13.3 22-23.2 45.9-29.3 70.9l23.3 5.8C36.3 177.7 45.3 156 57.4 136L36.8 123.7zM24 256c0-11.6 .9-23.3 2.6-34.8L2.9 217.6c-3.8 25.4-3.8 51.3 0 76.7l23.7-3.6C24.9 279.3 24 267.6 24 256zM388.3 475.2L376 454.6c-20 12.1-41.6 21-64.2 26.6l5.8 23.3c24.9-6.2 48.8-16 70.8-29.3zM488 256c0 11.6-.9 23.3-2.6 34.8l23.7 3.6c3.8-25.4 3.8-51.3 0-76.7l-23.7 3.6c1.7 11.5 2.6 23.1 2.6 34.8zm16.5 61.4l-23.3-5.8c-5.6 22.7-14.5 44.3-26.6 64.3l20.6 12.4c13.3-22 23.2-46 29.3-71zm-213.8 168c-23 3.5-46.5 3.5-69.5 0l-3.6 23.7c25.4 3.8 51.3 3.8 76.7 0l-3.6-23.7zm152-91.8c-13.8 18.7-30.4 35.3-49.2 49.1l14.2 19.3c20.7-15.2 39-33.4 54.2-54.1l-19.3-14.4zM393.6 69.2c18.8 13.8 35.3 30.4 49.2 49.2L462.1 104C446.9 83.4 428.6 65.1 408 49.9L393.6 69.2zM69.2 118.4c13.8-18.8 30.4-35.3 49.2-49.2L104 49.9C83.4 65.1 65.1 83.4 49.9 104l19.3 14.4zm406 5.3L454.6 136c12.1 20 21 41.6 26.6 64.2l23.3-5.8c-6.2-24.9-16-48.8-29.3-70.8zm-254-97.1c23-3.5 46.5-3.5 69.5 0l3.6-23.7C268.9-1 243.1-1 217.6 2.9l3.6 23.7zM81.6 468.4L32 480l11.6-49.6L20.2 425 8.6 474.5c-.9 4-.8 8.1 .3 12.1s3.2 7.5 6.1 10.4s6.5 5 10.4 6.1s8.1 1.2 12.1 .3L87 492l-5.4-23.6zM25.2 403.6L48.6 409l8-34.4c-11.7-19.6-20.4-40.8-25.8-63L7.5 317.4c5.2 21.2 13.2 41.7 23.6 60.8l-5.9 25.3zm112 52l-34.4 8 5.4 23.4 25.3-5.9c19.2 10.4 39.6 18.4 60.8 23.6l5.8-23.3c-22.1-5.5-43.3-14.3-62.8-26l-.2 .2zM256 48c-37.2 0-73.6 10-105.6 28.9s-58.4 46-76.3 78.6s-26.9 69.3-25.8 106.4s12 73.3 31.8 104.8L60 452l85.3-20c27.3 17.2 58.2 27.8 90.3 31s64.5-1.1 94.6-12.6s57.2-29.8 79-53.6s37.8-52.2 46.8-83.2s10.5-63.6 4.7-95.3s-19-61.6-38.4-87.4s-44.5-46.7-73.4-61S288.3 48 256 48z"/></svg> diff --git a/themes/tabi-lean/static/social_icons/skype.svg b/themes/tabi-lean/static/social_icons/skype.svg new file mode 100644 index 0000000..3369aba --- /dev/null +++ b/themes/tabi-lean/static/social_icons/skype.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M424.7 299.8c2.9-14 4.7-28.9 4.7-43.8 0-113.5-91.9-205.3-205.3-205.3-14.9 0-29.7 1.7-43.8 4.7C161.3 40.7 137.7 32 112 32 50.2 32 0 82.2 0 144c0 25.7 8.7 49.3 23.3 68.2-2.9 14-4.7 28.9-4.7 43.8 0 113.5 91.9 205.3 205.3 205.3 14.9 0 29.7-1.7 43.8-4.7 19 14.6 42.6 23.3 68.2 23.3 61.8 0 112-50.2 112-112 .1-25.6-8.6-49.2-23.2-68.1zm-194.6 91.5c-65.6 0-120.5-29.2-120.5-65 0-16 9-30.6 29.5-30.6 31.2 0 34.1 44.9 88.1 44.9 25.7 0 42.3-11.4 42.3-26.3 0-18.7-16-21.6-42-28-62.5-15.4-117.8-22-117.8-87.2 0-59.2 58.6-81.1 109.1-81.1 55.1 0 110.8 21.9 110.8 55.4 0 16.9-11.4 31.8-30.3 31.8-28.3 0-29.2-33.5-75-33.5-25.7 0-42 7-42 22.5 0 19.8 20.8 21.8 69.1 33 41.4 9.3 90.7 26.8 90.7 77.6 0 59.1-57.1 86.5-112 86.5z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/slack.svg b/themes/tabi-lean/static/social_icons/slack.svg new file mode 100644 index 0000000..0dbc26d --- /dev/null +++ b/themes/tabi-lean/static/social_icons/slack.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/snapchat.svg b/themes/tabi-lean/static/social_icons/snapchat.svg new file mode 100644 index 0000000..2cd79dd --- /dev/null +++ b/themes/tabi-lean/static/social_icons/snapchat.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M384,32H64A64,64,0,0,0,0,96V416a64,64,0,0,0,64,64H384a64,64,0,0,0,64-64V96A64,64,0,0,0,384,32Zm-3.907,319.309-.083.1a32.364,32.364,0,0,1-8.717,6.823,90.26,90.26,0,0,1-20.586,8.2,12.694,12.694,0,0,0-3.852,1.76c-2.158,1.909-2.1,4.64-4.4,8.55a23.137,23.137,0,0,1-6.84,7.471c-6.707,4.632-14.244,4.923-22.23,5.23-7.214.274-15.39.581-24.729,3.669-3.761,1.245-7.753,3.694-12.377,6.533-11.265,6.9-26.68,16.353-52.3,16.353s-40.925-9.4-52.106-16.279c-4.657-2.888-8.675-5.362-12.543-6.64-9.339-3.08-17.516-3.4-24.729-3.67-7.986-.307-15.523-.6-22.231-5.229a23.085,23.085,0,0,1-6.01-6.11c-3.2-4.632-2.855-7.8-5.254-9.895a13.428,13.428,0,0,0-4.1-1.834,89.986,89.986,0,0,1-20.313-8.127,32.905,32.905,0,0,1-8.3-6.284c-6.583-6.757-8.276-14.776-5.686-21.824,3.436-9.338,11.571-12.111,19.4-16.262,14.776-8.027,26.348-18.055,34.433-29.884a68.236,68.236,0,0,0,5.985-10.567c.789-2.158.772-3.329.241-4.416a7.386,7.386,0,0,0-2.208-2.217c-2.532-1.676-5.113-3.353-6.882-4.5-3.27-2.141-5.868-3.818-7.529-4.98-6.267-4.383-10.65-9.04-13.4-14.245a28.4,28.4,0,0,1-1.369-23.584c4.134-10.924,14.469-17.706,26.978-17.706a37.141,37.141,0,0,1,7.845.83c.689.15,1.37.307,2.042.482-.108-7.43.058-15.357.722-23.119,2.358-27.261,11.912-41.589,21.874-52.994a86.836,86.836,0,0,1,22.28-17.931C188.254,100.383,205.312,96,224,96s35.828,4.383,50.944,13.016a87.169,87.169,0,0,1,22.239,17.9c9.961,11.406,19.516,25.709,21.874,52.995a231.194,231.194,0,0,1,.713,23.118c.673-.174,1.362-.332,2.051-.481a37.131,37.131,0,0,1,7.844-.83c12.5,0,22.82,6.782,26.971,17.706a28.37,28.37,0,0,1-1.4,23.559c-2.74,5.2-7.123,9.861-13.39,14.244-1.668,1.187-4.258,2.864-7.529,4.981-1.835,1.187-4.541,2.947-7.164,4.682a6.856,6.856,0,0,0-1.951,2.034c-.506,1.046-.539,2.191.166,4.208a69.015,69.015,0,0,0,6.085,10.792c8.268,12.1,20.188,22.313,35.454,30.407,1.486.772,2.98,1.5,4.441,2.258.722.332,1.569.763,2.491,1.3,4.9,2.723,9.2,6.01,11.455,12.153C387.821,336.915,386.269,344.7,380.093,351.309Zm-16.719-18.461c-50.313-24.314-58.332-61.918-58.689-64.749-.431-3.379-.921-6.035,2.806-9.472,3.594-3.328,19.541-13.19,23.965-16.278,7.33-5.114,10.534-10.219,8.16-16.495-1.66-4.316-5.686-5.976-9.961-5.976a18.5,18.5,0,0,0-3.993.448c-8.035,1.743-15.838,5.769-20.354,6.857a7.1,7.1,0,0,1-1.66.224c-2.408,0-3.279-1.071-3.088-3.968.564-8.783,1.759-25.925.373-41.937-1.884-22.032-8.99-32.948-17.432-42.6-4.051-4.624-23.135-24.654-59.536-24.654S168.53,134.359,164.479,139c-8.434,9.654-15.531,20.57-17.432,42.6-1.386,16.013-.141,33.147.373,41.937.166,2.756-.68,3.968-3.088,3.968a7.1,7.1,0,0,1-1.66-.224c-4.507-1.087-12.31-5.113-20.346-6.856a18.494,18.494,0,0,0-3.993-.449c-4.25,0-8.3,1.636-9.961,5.977-2.374,6.276.847,11.381,8.168,16.494,4.425,3.088,20.371,12.958,23.966,16.279,3.719,3.437,3.237,6.093,2.805,9.471-.356,2.79-8.384,40.394-58.689,64.749-2.946,1.428-7.96,4.45.88,9.331,13.88,7.628,23.111,6.807,30.3,11.43,6.093,3.927,2.5,12.394,6.923,15.449,5.454,3.76,21.583-.266,42.335,6.6,17.433,5.744,28.116,22.015,58.963,22.015s41.788-16.3,58.938-21.973c20.795-6.865,36.89-2.839,42.336-6.6,4.433-3.055.822-11.522,6.923-15.448,7.181-4.624,16.411-3.8,30.3-11.472C371.36,337.355,366.346,334.333,363.374,332.848Z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/soundcloud.svg b/themes/tabi-lean/static/social_icons/soundcloud.svg new file mode 100644 index 0000000..4724d74 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/soundcloud.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M111.4 256.3l5.8 65-5.8 68.3c-.3 2.5-2.2 4.4-4.4 4.4s-4.2-1.9-4.2-4.4l-5.6-68.3 5.6-65c0-2.2 1.9-4.2 4.2-4.2 2.2 0 4.1 2 4.4 4.2zm21.4-45.6c-2.8 0-4.7 2.2-5 5l-5 105.6 5 68.3c.3 2.8 2.2 5 5 5 2.5 0 4.7-2.2 4.7-5l5.8-68.3-5.8-105.6c0-2.8-2.2-5-4.7-5zm25.5-24.1c-3.1 0-5.3 2.2-5.6 5.3l-4.4 130 4.4 67.8c.3 3.1 2.5 5.3 5.6 5.3 2.8 0 5.3-2.2 5.3-5.3l5.3-67.8-5.3-130c0-3.1-2.5-5.3-5.3-5.3zM7.2 283.2c-1.4 0-2.2 1.1-2.5 2.5L0 321.3l4.7 35c.3 1.4 1.1 2.5 2.5 2.5s2.2-1.1 2.5-2.5l5.6-35-5.6-35.6c-.3-1.4-1.1-2.5-2.5-2.5zm23.6-21.9c-1.4 0-2.5 1.1-2.5 2.5l-6.4 57.5 6.4 56.1c0 1.7 1.1 2.8 2.5 2.8s2.5-1.1 2.8-2.5l7.2-56.4-7.2-57.5c-.3-1.4-1.4-2.5-2.8-2.5zm25.3-11.4c-1.7 0-3.1 1.4-3.3 3.3L47 321.3l5.8 65.8c.3 1.7 1.7 3.1 3.3 3.1 1.7 0 3.1-1.4 3.1-3.1l6.9-65.8-6.9-68.1c0-1.9-1.4-3.3-3.1-3.3zm25.3-2.2c-1.9 0-3.6 1.4-3.6 3.6l-5.8 70 5.8 67.8c0 2.2 1.7 3.6 3.6 3.6s3.6-1.4 3.9-3.6l6.4-67.8-6.4-70c-.3-2.2-2-3.6-3.9-3.6zm241.4-110.9c-1.1-.8-2.8-1.4-4.2-1.4-2.2 0-4.2.8-5.6 1.9-1.9 1.7-3.1 4.2-3.3 6.7v.8l-3.3 176.7 1.7 32.5 1.7 31.7c.3 4.7 4.2 8.6 8.9 8.6s8.6-3.9 8.6-8.6l3.9-64.2-3.9-177.5c-.4-3-2-5.8-4.5-7.2zm-26.7 15.3c-1.4-.8-2.8-1.4-4.4-1.4s-3.1.6-4.4 1.4c-2.2 1.4-3.6 3.9-3.6 6.7l-.3 1.7-2.8 160.8s0 .3 3.1 65.6v.3c0 1.7.6 3.3 1.7 4.7 1.7 1.9 3.9 3.1 6.4 3.1 2.2 0 4.2-1.1 5.6-2.5 1.7-1.4 2.5-3.3 2.5-5.6l.3-6.7 3.1-58.6-3.3-162.8c-.3-2.8-1.7-5.3-3.9-6.7zm-111.4 22.5c-3.1 0-5.8 2.8-5.8 6.1l-4.4 140.6 4.4 67.2c.3 3.3 2.8 5.8 5.8 5.8 3.3 0 5.8-2.5 6.1-5.8l5-67.2-5-140.6c-.2-3.3-2.7-6.1-6.1-6.1zm376.7 62.8c-10.8 0-21.1 2.2-30.6 6.1-6.4-70.8-65.8-126.4-138.3-126.4-17.8 0-35 3.3-50.3 9.4-6.1 2.2-7.8 4.4-7.8 9.2v249.7c0 5 3.9 8.6 8.6 9.2h218.3c43.3 0 78.6-35 78.6-78.3.1-43.6-35.2-78.9-78.5-78.9zm-296.7-60.3c-4.2 0-7.5 3.3-7.8 7.8l-3.3 136.7 3.3 65.6c.3 4.2 3.6 7.5 7.8 7.5 4.2 0 7.5-3.3 7.5-7.5l3.9-65.6-3.9-136.7c-.3-4.5-3.3-7.8-7.5-7.8zm-53.6-7.8c-3.3 0-6.4 3.1-6.4 6.7l-3.9 145.3 3.9 66.9c.3 3.6 3.1 6.4 6.4 6.4 3.6 0 6.4-2.8 6.7-6.4l4.4-66.9-4.4-145.3c-.3-3.6-3.1-6.7-6.7-6.7zm26.7 3.4c-3.9 0-6.9 3.1-6.9 6.9L227 321.3l3.9 66.4c.3 3.9 3.1 6.9 6.9 6.9s6.9-3.1 6.9-6.9l4.2-66.4-4.2-141.7c0-3.9-3-6.9-6.9-6.9z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/spotify.svg b/themes/tabi-lean/static/social_icons/spotify.svg new file mode 100644 index 0000000..1d393ba --- /dev/null +++ b/themes/tabi-lean/static/social_icons/spotify.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm100.7 364.9c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4zm26.9-65.6c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm31-76.2c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/stack-exchange.svg b/themes/tabi-lean/static/social_icons/stack-exchange.svg new file mode 100644 index 0000000..0a3177f --- /dev/null +++ b/themes/tabi-lean/static/social_icons/stack-exchange.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M17.7 332.3h412.7v22c0 37.7-29.3 68-65.3 68h-19L259.3 512v-89.7H83c-36 0-65.3-30.3-65.3-68v-22zm0-23.6h412.7v-85H17.7v85zm0-109.4h412.7v-85H17.7v85zM365 0H83C47 0 17.7 30.3 17.7 67.7V90h412.7V67.7C430.3 30.3 401 0 365 0z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/stack-overflow.svg b/themes/tabi-lean/static/social_icons/stack-overflow.svg new file mode 100644 index 0000000..2ca50c7 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/stack-overflow.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M290.7 311L95 269.7 86.8 309l195.7 41zm51-87L188.2 95.7l-25.5 30.8 153.5 128.3zm-31.2 39.7L129.2 179l-16.7 36.5L293.7 300zM262 32l-32 24 119.3 160.3 32-24zm20.5 328h-200v39.7h200zm39.7 80H42.7V320h-40v160h359.5V320h-40z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/steam.svg b/themes/tabi-lean/static/social_icons/steam.svg new file mode 100644 index 0000000..b61f374 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/steam.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M496 256c0 137-111.2 248-248.4 248-113.8 0-209.6-76.3-239-180.4l95.2 39.3c6.4 32.1 34.9 56.4 68.9 56.4 39.2 0 71.9-32.4 70.2-73.5l84.5-60.2c52.1 1.3 95.8-40.9 95.8-93.5 0-51.6-42-93.5-93.7-93.5s-93.7 42-93.7 93.5v1.2L176.6 279c-15.5-.9-30.7 3.4-43.5 12.1L0 236.1C10.2 108.4 117.1 8 247.6 8 384.8 8 496 119 496 256zM155.7 384.3l-30.5-12.6a52.79 52.79 0 0 0 27.2 25.8c26.9 11.2 57.8-1.6 69-28.4 5.4-13 5.5-27.3.1-40.3-5.4-13-15.5-23.2-28.5-28.6-12.9-5.4-26.7-5.2-38.9-.6l31.5 13c19.8 8.2 29.2 30.9 20.9 50.7-8.3 19.9-31 29.2-50.8 21zm173.8-129.9c-34.4 0-62.4-28-62.4-62.3s28-62.3 62.4-62.3 62.4 28 62.4 62.3-27.9 62.3-62.4 62.3zm.1-15.6c25.9 0 46.9-21 46.9-46.8 0-25.9-21-46.8-46.9-46.8s-46.9 21-46.9 46.8c.1 25.8 21.1 46.8 46.9 46.8z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/telegram.svg b/themes/tabi-lean/static/social_icons/telegram.svg new file mode 100644 index 0000000..02f48c0 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/telegram.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M248,8C111.033,8,0,119.033,0,256S111.033,504,248,504,496,392.967,496,256,384.967,8,248,8ZM362.952,176.66c-3.732,39.215-19.881,134.378-28.1,178.3-3.476,18.584-10.322,24.816-16.948,25.425-14.4,1.326-25.338-9.517-39.287-18.661-21.827-14.308-34.158-23.215-55.346-37.177-24.485-16.135-8.612-25,5.342-39.5,3.652-3.793,67.107-61.51,68.335-66.746.153-.655.3-3.1-1.154-4.384s-3.59-.849-5.135-.5q-3.283.746-104.608,69.142-14.845,10.194-26.894,9.934c-8.855-.191-25.888-5.006-38.551-9.123-15.531-5.048-27.875-7.717-26.8-16.291q.84-6.7,18.45-13.7,108.446-47.248,144.628-62.3c68.872-28.647,83.183-33.623,92.511-33.789,2.052-.034,6.639.474,9.61,2.885a10.452,10.452,0,0,1,3.53,6.716A43.765,43.765,0,0,1,362.952,176.66Z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/twitter.svg b/themes/tabi-lean/static/social_icons/twitter.svg new file mode 100644 index 0000000..0778f72 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/twitter.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/vimeo.svg b/themes/tabi-lean/static/social_icons/vimeo.svg new file mode 100644 index 0000000..d98368e --- /dev/null +++ b/themes/tabi-lean/static/social_icons/vimeo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M403.2 32H44.8C20.1 32 0 52.1 0 76.8v358.4C0 459.9 20.1 480 44.8 480h358.4c24.7 0 44.8-20.1 44.8-44.8V76.8c0-24.7-20.1-44.8-44.8-44.8zM377 180.8c-1.4 31.5-23.4 74.7-66 129.4-44 57.2-81.3 85.8-111.7 85.8-18.9 0-34.8-17.4-47.9-52.3-25.5-93.3-36.4-148-57.4-148-2.4 0-10.9 5.1-25.4 15.2l-15.2-19.6c37.3-32.8 72.9-69.2 95.2-71.2 25.2-2.4 40.7 14.8 46.5 51.7 20.7 131.2 29.9 151 67.6 91.6 13.5-21.4 20.8-37.7 21.8-48.9 3.5-33.2-25.9-30.9-45.8-22.4 15.9-52.1 46.3-77.4 91.2-76 33.3.9 49 22.5 47.1 64.7z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/whatsapp.svg b/themes/tabi-lean/static/social_icons/whatsapp.svg new file mode 100644 index 0000000..d259142 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/whatsapp.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/wordpress.svg b/themes/tabi-lean/static/social_icons/wordpress.svg new file mode 100755 index 0000000..807a5ed --- /dev/null +++ b/themes/tabi-lean/static/social_icons/wordpress.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M343.257 404.255C393.974 374.341 428 319.144 428 256C428 230.686 422.531 206.649 412.711 185.006C411.662 202.528 407.909 220.432 404.044 233.595L343.257 404.255ZM319.987 415.704L273.3 290.764C270.034 282.024 257.637 282.123 254.511 290.914L210.084 415.832C209.316 417.992 207.99 419.626 206.378 420.734C222.09 425.46 238.748 428 256 428C278.614 428 300.208 423.636 319.987 415.704ZM191.052 415.315C128.255 389.688 84 328.012 84 256C84 227.061 91.147 199.791 103.772 175.859L191.052 415.315ZM116.415 155.479H169.999C174.507 155.479 178.161 159.133 178.161 163.641C178.161 168.148 174.507 171.802 169.999 171.802H167.916C161.022 171.802 156.196 178.613 158.481 185.116L208.11 326.389C211.247 335.32 223.884 335.298 226.991 326.358L254.386 247.528C255.158 245.306 255.122 242.883 254.284 240.685L230.488 178.241C229.011 174.364 225.293 171.802 221.144 171.802H213.579C209.071 171.802 205.417 168.148 205.417 163.641C205.417 159.133 209.071 155.479 213.579 155.479H299.904C304.411 155.479 308.065 159.133 308.065 163.641C308.065 168.148 304.411 171.802 299.904 171.802H297.884C290.973 171.802 286.145 178.646 288.464 185.157L338.349 325.249C341.569 334.291 354.41 334.038 357.238 324.867C363.743 303.768 370.861 280.281 373.307 270.904C377.947 253.124 378.237 218.73 368.668 205.03C359.771 192.293 325.556 133.191 367.41 124.954C337.396 99.413 298.498 84 256 84C198.534 84 147.65 112.182 116.415 155.479Z" fill="black"/> +<path d="M410.638 235.944L410.704 235.757L410.76 235.567C416.245 216.893 421.635 188.545 419.535 164.489C418.487 152.486 415.511 140.747 408.999 131.852C402.206 122.573 391.995 117 378.237 117C362.493 117 351.281 121.615 345.111 130.844C339.204 139.68 339.291 150.814 341.249 160.734C345.19 180.697 357.947 201.906 362.929 209.039C364.598 211.428 366.113 215.172 367.26 220.168C368.387 225.079 369.064 230.778 369.322 236.74C369.843 248.745 368.64 261.068 366.534 269.136C364.136 278.329 357.073 301.643 350.549 322.804C349.718 325.497 345.918 325.638 344.944 322.901L295.058 182.808C294.362 180.855 295.811 178.802 297.884 178.802H299.904C308.277 178.802 315.065 172.014 315.065 163.641C315.065 155.267 308.277 148.479 299.904 148.479H213.579C205.205 148.479 198.417 155.267 198.417 163.641C198.417 172.014 205.205 178.802 213.579 178.802H221.144C222.389 178.802 223.504 179.571 223.947 180.734L247.743 243.177C247.995 243.837 248.005 244.564 247.774 245.23L220.379 324.06C219.447 326.742 215.656 326.748 214.714 324.069L165.085 182.796C164.4 180.845 165.848 178.802 167.916 178.802H169.999C178.373 178.802 185.161 172.014 185.161 163.641C185.161 155.267 178.373 148.479 169.999 148.479H105.193C97.9069 148.479 92 154.386 92 161.673C92 163.214 92.27 164.743 92.7977 166.191L184.69 418.303C190.145 433.27 211.342 433.187 216.68 418.178L261.106 293.259C262.044 290.622 265.763 290.592 266.743 293.214L313.663 418.78C319.214 433.634 340.281 433.471 345.602 418.533L410.638 235.944Z" stroke="black" stroke-width="14" stroke-linecap="round"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/writefreely.svg b/themes/tabi-lean/static/social_icons/writefreely.svg new file mode 100755 index 0000000..c2bd4fc --- /dev/null +++ b/themes/tabi-lean/static/social_icons/writefreely.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="521" height="521" viewBox="0 0 521 521" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M185 81C127.562 81 81 127.562 81 185V336C81 393.438 127.562 440 185 440H336C393.438 440 440 393.438 440 336V185C440 127.562 393.438 81 336 81H185ZM347.261 302.318C353.068 294.389 357.947 283.263 361.357 271.479C364.793 259.608 366.928 246.416 366.831 234.07C366.736 221.936 364.475 209.481 357.993 200.108C351.015 190.017 339.9 184.615 325.359 186.013C319.294 186.597 314.023 188.657 310.178 192.011C306.47 195.246 303.499 200.377 304.449 206.269C305.488 212.72 310.608 216.592 316.089 217.758C321.282 218.864 327.222 217.834 333.377 215.343C337.153 213.814 339.328 210.013 338.963 206.155C340.678 207.257 342.045 208.693 343.188 210.346C346.713 215.444 348.749 223.68 348.832 234.211C348.913 244.53 347.105 255.977 344.067 266.475C341.004 277.059 336.878 286.031 332.739 291.683C322.798 305.257 312.989 312.694 304.461 315.632C296.305 318.443 288.746 317.378 281.782 312.617C280.605 311.813 278.555 309.136 276.868 302.56C275.278 296.362 274.41 288.287 274.141 279.056C273.766 266.213 274.566 251.91 275.764 238.762C276.624 233.132 277.39 227.724 278.059 222.768C278.182 221.857 278.269 220.496 277.946 218.97C277.79 218.231 277.439 216.975 276.564 215.658C275.693 214.347 273.733 212.2 270.362 211.67C266.917 211.129 264.323 212.635 263.013 213.75C261.743 214.832 261.046 216.015 260.698 216.704C259.976 218.131 259.719 219.497 259.611 220.399C259.012 225.388 258.417 230.846 257.89 236.568C255.149 254.441 251.55 273.946 247.355 287.715C238.055 318.24 212.07 319.579 202.328 312.696C197.605 309.359 195.185 301.984 197.043 285.625C198.246 275.036 200.907 263 203.91 249.414C205.399 242.675 206.973 235.555 208.495 228.042C211.159 214.89 209.829 204.919 204.981 197.868C200.095 190.759 192.992 188.575 188.467 188.035L188.443 188.032L188.42 188.03C177.902 186.831 167.697 191.154 161.177 198.748C154.465 206.568 151.756 217.749 156.116 229.408C157.857 234.063 163.043 236.426 167.698 234.685C172.354 232.944 174.717 227.759 172.976 223.103C170.987 217.785 172.257 213.476 174.835 210.473C177.6 207.252 181.985 205.422 186.357 205.911C187.75 206.082 189.181 206.658 190.148 208.065C191.16 209.536 193.004 213.853 190.853 224.468C189.509 231.105 188.04 237.761 186.598 244.291L186.598 244.291C183.468 258.473 180.468 272.064 179.158 283.593C177.305 299.913 178.043 317.578 191.942 327.397C210.257 340.338 243.128 335.614 259.175 305.995C259.259 306.344 259.345 306.689 259.433 307.032C261.398 314.694 264.848 322.845 271.623 327.477C283.282 335.447 296.783 337.317 310.325 332.65C323.497 328.112 336.026 317.66 347.261 302.318ZM321.837 205.745C321.836 205.745 321.842 205.737 321.857 205.721C321.845 205.737 321.837 205.745 321.837 205.745Z" fill="black"/> +</svg> diff --git a/themes/tabi-lean/static/social_icons/x.svg b/themes/tabi-lean/static/social_icons/x.svg new file mode 100644 index 0000000..f5feed7 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/x.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/static/social_icons/youtube.svg b/themes/tabi-lean/static/social_icons/youtube.svg new file mode 100644 index 0000000..287dca2 --- /dev/null +++ b/themes/tabi-lean/static/social_icons/youtube.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"/></svg>
\ No newline at end of file diff --git a/themes/tabi-lean/templates/404.html b/themes/tabi-lean/templates/404.html new file mode 100644 index 0000000..4c19dac --- /dev/null +++ b/themes/tabi-lean/templates/404.html @@ -0,0 +1,34 @@ +{% extends "page.html" %} + +{% macro display_404_message(language_name) %} + {%- set language_strings = load_data(path="i18n/" ~ language_name ~ '.toml', required=false) -%} + {%- if not language_strings -%} + {%- set language_strings = load_data(path="themes/tabi/i18n/" ~ language_name ~ '.toml', required=false) -%} + {%- endif -%} + <p>{{ macros_translate::translate(key="page_missing", default="The page you've requested seems to be missing", force_lang=language_name, language_strings=language_strings) }} + {%- if config.languages | length > 0 -%} + {{ macros_translate::translate(key="translation_missing", default="or hasn't been translated into your language yet", force_lang=language_name, language_strings=language_strings) }}{{ macros_translate::translate(key="full_stop", default=".", force_lang=language_name, language_strings=language_strings) }} + {%- else %}. + {%- endif %}<br> + {{ macros_translate::translate(key="check_url", default="Check the URL for errors or", force_lang=language_name, language_strings=language_strings) }} + <a href="{{ config.base_url }}{% if language_name != config.default_language %}/{{ language_name }}{% endif %}/"> + {{ macros_translate::translate(key="go_home", default="go back to the homepage", force_lang=language_name, language_strings=language_strings) }}</a>{{ macros_translate::translate(key="full_stop", default=".", force_lang=language_name, language_strings=language_strings) }}</p> +{% endmacro %} + +{% block main_content %} + <main class="centered-text"> + {{ macros_page_header::page_header(title="404")}} + <div class="subheader">{{ macros_translate::translate(key="not_found") }}</div> + + {# 404 message for base language #} + {{ self::display_404_message(language_name=config.default_language, is_multilingual=is_multilingual) }} + + {#- Iterate through each extra language, to display the localised 404 message -#} + {%- for language_name, language in config.languages -%} + {%- if language_name == config.default_language -%} + {%- continue -%} {#- We've already displayed the 404 message for the base language -#} + {%- endif -%} + {{ self::display_404_message(language_name=language_name, is_multilingual=is_multilingual) }} + {%- endfor -%} + </main> +{% endblock main_content %} diff --git a/themes/tabi-lean/templates/anchor-link.html b/themes/tabi-lean/templates/anchor-link.html new file mode 100644 index 0000000..254dbe3 --- /dev/null +++ b/themes/tabi-lean/templates/anchor-link.html @@ -0,0 +1 @@ +<a class="header-anchor no-hover-padding" href="#{{ id }}" aria-label="Anchor link for: {{ id }}"><span class="link-icon" aria-hidden="true"></span></a> diff --git a/themes/tabi-lean/templates/archive.html b/themes/tabi-lean/templates/archive.html new file mode 100644 index 0000000..637b414 --- /dev/null +++ b/themes/tabi-lean/templates/archive.html @@ -0,0 +1,89 @@ +{% extends "base.html" %} + +{% block main_content %} + +{{ macros_page_header::page_header(title=section.title) }} + +{# Set locale for date #} +{% set date_locale = macros_translate::translate(key="date_locale", default="en_GB", language_strings=language_strings) %} + +{#- Check for language-specific date formats -#} +{%- set language_format = "" -%} +{%- if config.extra.date_formats -%} + {%- for format_config in config.extra.date_formats -%} + {%- if format_config.lang == lang -%} + {%- if format_config.archive -%} + {%- set_global language_format = format_config.archive -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} +{%- endif -%} + +<div class="archive"> + <ul class="list-with-title"> + {%- set source_paths = section.extra.section_path | default(value="blog/") -%} + {%- if source_paths is iterable -%} + {%- set paths = source_paths -%} + {%- else -%} + {%- set paths = [source_paths] -%} + {%- endif %} + {%- set all_posts = [] -%} + {%- for path in paths -%} + {%- if lang == config.default_language %} + {%- set section_item = get_section(path=path ~ "_index.md") -%} + {%- else %} + {%- set section_item = get_section(path=path ~ "_index." ~ lang ~ ".md") -%} + {%- endif %} + {%- set_global all_posts = all_posts | concat(with=section_item.pages) -%} + {%- endfor %} + + {# Sort all posts by date #} + {%- set archive_reverse = section.extra.archive_reverse | default(value=false) -%} + {%- set all_posts = all_posts | sort(attribute="date") -%} + {%- if not archive_reverse -%} + {%- set all_posts = all_posts | reverse -%} + {%- endif -%} + + {# Group posts by year. #} + {% set posts_by_year = all_posts | group_by(attribute="year") %} + {% set years = [] %} + {% for year, ignored in posts_by_year %} + {% set_global years = years | concat(with=[year]) %} + {% endfor %} + + {# Iterate over years #} + {% set years = years | sort %} + {%- if not archive_reverse -%} + {%- set years = years | reverse -%} + {%- endif -%} + + {% for year in years %} + {% set posts = posts_by_year[year] %} + {% if posts | length > 0 %} + <li> + <h2 class="listing-title">{{ year }}</h2> + <ul class="listing"> + {% for post in posts %} + <li class="listing-item"> + <div class="post-time"> + <span class="date"> + {%- if language_format -%} + {{ post.date | date(format=language_format, locale=date_locale) }} + {%- elif config.extra.archive_date_format -%} + {{ post.date | date(format=config.extra.archive_date_format, locale=date_locale) }} + {%- else -%} + {{ post.date | date(format="%d %b", locale=date_locale) }} + {%- endif -%} + </span> + </div> + <a href="{{ post.permalink }}" title="{{ post.title }}">{{ post.title | markdown(inline=true) | safe }}</a> + </li> + {% endfor %} + </ul> + </li> + {% endif %} + {% endfor %} + </ul> +</div> + +{% endblock main_content %} diff --git a/themes/tabi-lean/templates/atom.xml b/themes/tabi-lean/templates/atom.xml new file mode 100644 index 0000000..3e5b55c --- /dev/null +++ b/themes/tabi-lean/templates/atom.xml @@ -0,0 +1,110 @@ +{%- import "macros/translate.html" as macros_translate -%} +{%- import "macros/settings.html" as macros_settings -%} +{#- Load the internationalisation data -#} +{%- set language_strings = load_data(path="i18n/" ~ lang ~ '.toml', required=false) -%} +{%- if not language_strings -%} + {%- set language_strings = load_data(path="themes/tabi/i18n/" ~ lang ~ ".toml", required=false) -%} +{%- endif -%} +<?xml version="1.0" encoding="utf-8"?> +<?xml-stylesheet href="{{ get_url(path='/feed_style.xsl', trailing_slash=false) | safe }}" type="text/xsl"?> +<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}"> + <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi"> + <tabi:base_url>{{ config.base_url }}</tabi:base_url> + <tabi:separator> + {{ config.extra.separator | default(value="•") }} + </tabi:separator> + <tabi:about_feeds> + {{- macros_translate::translate(key="about_feeds", default="This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader", language_strings=language_strings) -}} + </tabi:about_feeds> + <tabi:visit_the_site> + {{- macros_translate::translate(key="visit_the_site", default="Visit website", language_strings=language_strings) -}} + </tabi:visit_the_site> + <tabi:recent_posts> + {{- macros_translate::translate(key="recent_posts", default="Recent posts", language_strings=language_strings) -}} + </tabi:recent_posts> + <tabi:last_updated_on> + {{- macros_translate::translate(key="last_updated_on", default="Updated on $DATE", language_strings=language_strings) -}} + </tabi:last_updated_on> + <tabi:default_theme> + {{- config.extra.default_theme | default(value="") -}} + </tabi:default_theme> + <tabi:post_listing_date> + {{- config.extra.post_listing_date | default(value="date") -}} + </tabi:post_listing_date> + <tabi:current_section> + {%- if term -%} + {{ term.name }} + {%- elif section.title -%} + {{ section.title }} + {%- else -%} + {{ config.title }} + {%- endif -%} + </tabi:current_section> + </tabi:metadata> + + {#- Load extra CSS (skin) if set in config.toml -#} + {%- if config.extra.skin -%} + <link rel="extra-stylesheet" href="{{ get_url(path='skins/' ~ config.extra.skin ~ '.css', cachebust=true) | safe }}" /> + {%- endif -%} + + <title>{{ config.title | striptags | safe }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + </title> + {%- if config.description %} + <subtitle>{{ config.description }}</subtitle> + {%- endif %} + <link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/> + <link href=" + {%- if term -%} + {{ term.permalink | escape_xml | safe }} + {%- elif section -%} + {{ section.permalink | escape_xml | safe }} + {%- else -%} + {{ get_url(path="/", lang=lang) | escape_xml | safe }} + {%- endif -%} + " rel="alternate" type="text/html"/> + <generator uri="https://www.getzola.org/">Zola</generator> + {%- if last_updated -%} + <updated>{{ last_updated | date(format="%+") }}</updated> + {%- endif -%} + <id>{{ feed_url | safe }}</id> + {%- for page in pages %} + {%- if macros_settings::evaluate_setting_priority(setting="hide_from_feed", page=page, default_global_value=false) == "true" -%} + {%- continue -%} + {%- endif -%} + {#- Skip if hide_from_main_feed is true and this is the main feed -#} + {%- if macros_settings::evaluate_setting_priority(setting="hide_from_main_feed", page=page, default_global_value=false) == "true" + and not section + and not term -%} + {%- continue -%} + {%- endif -%} + <entry xml:lang="{{ page.lang }}"> + <title>{{ page.title }}</title> + <published>{{ page.date | date(format="%+") }}</published> + <updated>{{ page.updated | default(value=page.date) | date(format="%+") }}</updated> + <author> + <name> + {%- if page.authors -%} + {{ page.authors[0] }} + {%- elif config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + </name> + </author> + <link rel="alternate" href="{{ page.permalink | safe }}" type="text/html"/> + <id>{{ page.permalink | safe }}</id> + {% if config.extra.full_content_in_feed %} + <content type="html">{{ page.content }}</content> + {% endif -%} + {% if page.description -%} + <summary type="html">{{ page.description }}</summary> + {% elif page.summary -%} + <summary type="html">{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}…</summary> + {% endif -%} + </entry> + {%- endfor %} +</feed> diff --git a/themes/tabi-lean/templates/base.html b/themes/tabi-lean/templates/base.html new file mode 100644 index 0000000..56f2a65 --- /dev/null +++ b/themes/tabi-lean/templates/base.html @@ -0,0 +1,51 @@ +{% import "macros/feed_utils.html" as feed_utils %} +{% import "macros/format_date.html" as macros_format_date %} +{% import "macros/list_posts.html" as macros_list_posts %} +{% import "macros/page_header.html" as macros_page_header %} +{% import "macros/rel_attributes.html" as macros_rel_attributes %} +{% import "macros/series_page.html" as macros_series_page %} +{% import "macros/settings.html" as macros_settings %} +{% import "macros/table_of_contents.html" as macros_toc %} +{% import "macros/target_attribute.html" as macros_target_attribute %} +{% import "macros/translate.html" as macros_translate %} + +{# Load the internationalisation data for the current language from +the .toml files in the user's '/i18n' folder, falling back to the theme's. +This variable will hold all the text strings for the language #} +{%- set language_strings = load_data(path="i18n/" ~ lang ~ '.toml', required=false) -%} +{%- if not language_strings -%} + {%- set language_strings = load_data(path="themes/tabi/i18n/" ~ lang ~ ".toml", required=false) -%} +{%- endif -%} +{% set rtl_languages = ["ar", "arc", "az", "dv", "ff", "he", "ku", "nqo", "fa", "rhg", "syc", "ur"] %} + +{#- Necessary for the hierarchy macro -#} +{%- if page -%} + {%- set current_page = page -%} +{%- else -%} + {%- set current_page = ""-%} +{%- endif -%} + +<!DOCTYPE html> +<html lang="{{ lang }}" {% if config.extra.default_theme -%} + data-theme="{{config.extra.default_theme}}" +{%- endif -%}{% if macros_settings::evaluate_setting_priority(setting="force_codeblock_ltr", page=current_page, default_global_value=true) == "false" -%} + data-code-direction="inherit"{% endif %}> + +{% include "partials/header.html" %} + +<body{% if lang in rtl_languages %} dir="rtl"{% endif %}{% if config.extra.override_serif_with_sans %} class="use-sans-serif"{% endif %}> + {% include "partials/nav.html" %} + <div class="content"> + + {# Post page is the default #} + {% block main_content %} + Nothing here?! + {% endblock main_content %} + </div> + {% include "partials/footer.html" %} + + {# Users can optionally provide this template to add content to the body element. #} + {% include "tabi/extend_body.html" ignore missing %} +</body> + +</html> diff --git a/themes/tabi-lean/templates/cards.html b/themes/tabi-lean/templates/cards.html new file mode 100644 index 0000000..451f6b2 --- /dev/null +++ b/themes/tabi-lean/templates/cards.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} + +{% block main_content %} + {% if section.extra.section_path -%} + {% set section = get_section(path=section.extra.section_path) %} + {% endif -%} + + {{ macros_page_header::page_header(title=section.title) }} + + <main> + {% if section.content -%} + <div id="page-content">{{ section.content | safe }}</div> + {% endif %} + + {%- if paginator %} + {%- set show_pages = paginator.pages -%} + {% else %} + {%- set show_pages = section.pages -%} + {% endif -%} + + {%- if macros_settings::evaluate_setting_priority(setting="enable_cards_tag_filtering", page=section, default_global_value=true) == "true" -%} + {%- include "partials/filter_card_tags.html" -%} + {%- endif -%} + + + {%- include "partials/cards_pages.html" -%} + </main> + + {% if paginator %} + {%- include "partials/paginate.html" -%} + {% endif %} +{% endblock main_content %} diff --git a/themes/tabi-lean/templates/index.html b/themes/tabi-lean/templates/index.html new file mode 100644 index 0000000..d0dfc01 --- /dev/null +++ b/themes/tabi-lean/templates/index.html @@ -0,0 +1 @@ +{% extends "section.html" %} diff --git a/themes/tabi-lean/templates/info-page.html b/themes/tabi-lean/templates/info-page.html new file mode 100644 index 0000000..077b1a1 --- /dev/null +++ b/themes/tabi-lean/templates/info-page.html @@ -0,0 +1,21 @@ +{# Template for non-articles (About Me, Privacy…) #} + +{% extends "base.html" %} + +{%- block main_content %} + +{%- set page_or_section = page | default(value=section) -%} + +{{ macros_page_header::page_header(title=page_or_section.title) }} + +<div id="page-content"> + <main> + {# The replace pattern is used to enable arbitrary locations for the Table of Contents #} + {# This is Philipp Oppermann's workaround: https://github.com/getzola/zola/issues/584#issuecomment-474329637 #} + {{ page_or_section.content | replace(from="<!-- toc -->", to=macros_toc::toc(page=page_or_section, header=false, language_strings=language_strings)) | safe }} + </main> +</div> + +{%- include "partials/extra_features.html" -%} + +{%- endblock main_content %} diff --git a/themes/tabi-lean/templates/internal/alias.html b/themes/tabi-lean/templates/internal/alias.html new file mode 100644 index 0000000..f56f769 --- /dev/null +++ b/themes/tabi-lean/templates/internal/alias.html @@ -0,0 +1,13 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <link rel="canonical" href="{{ url | safe }}"> + <link rel="stylesheet" href="{{ get_url(path="main.css", cachebust=true) | safe }}" /> + <meta http-equiv="refresh" content="0; url={{ url | safe }}"> + <title>Redirect</title> +</head> +<body class="center-content"> + <h1><a href="{{ url | safe }}">Click here</a> to be redirected.</h1> +</body> +</html> diff --git a/themes/tabi-lean/templates/macros/feed_utils.html b/themes/tabi-lean/templates/macros/feed_utils.html new file mode 100644 index 0000000..ff35194 --- /dev/null +++ b/themes/tabi-lean/templates/macros/feed_utils.html @@ -0,0 +1,17 @@ +{#- Feed utility macros -#} + +{#- Zola 0.19.0 uses `generate_feeds`. Prior versions use `generate_feed` -#} +{%- macro get_generate_feed() -%} + {{- config.generate_feeds | default(value=config.generate_feed) -}} +{%- endmacro get_generate_feed -%} + +{%- macro get_feed_url() -%} + {{- config.feed_filenames[0] | default(value=(config.feed_filename)) -}} +{%- endmacro get_feed_url -%} + +{#- Check footer feed icon conditions -#} +{%- macro should_show_footer_feed_icon() -%} + {%- set generate_feed = feed_utils::get_generate_feed() == "true" -%} + {%- set feed_url = feed_utils::get_feed_url() -%} + {{- generate_feed and config.extra.feed_icon and feed_url -}} +{%- endmacro should_show_footer_feed_icon -%} diff --git a/themes/tabi-lean/templates/macros/format_date.html b/themes/tabi-lean/templates/macros/format_date.html new file mode 100644 index 0000000..f747fd1 --- /dev/null +++ b/themes/tabi-lean/templates/macros/format_date.html @@ -0,0 +1,59 @@ +{%- macro format_date(date, short, language_strings="") -%} + +{#- Set locale -#} +{%- set date_locale = macros_translate::translate(key="date_locale", default="en_GB", language_strings=language_strings) -%} + +{#- Check for language-specific date formats -#} +{%- set language_format = "" -%} +{%- if config.extra.date_formats -%} + {%- for format_config in config.extra.date_formats -%} + {%- if format_config.lang == lang -%} + {%- if short and format_config.short -%} + {%- set_global language_format = format_config.short -%} + {%- elif not short and format_config.long -%} + {%- set_global language_format = format_config.long -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} +{%- endif -%} + +{%- if language_format -%} + {{ date | date(format=language_format, locale=date_locale) }} +{%- elif config.extra.short_date_format and short -%} + {{ date | date(format=config.extra.short_date_format, locale=date_locale) }} +{%- elif config.extra.long_date_format and not short -%} + {{ date | date(format=config.extra.long_date_format, locale=date_locale) }} +{%- elif not config.extra.short_date_format and date_locale == "en_GB" -%} + {%- set day = date | date(format='%-d') | int -%} + + {%- if day in [11, 12, 13] -%} + {%- set suffix = "th" -%} + {%- else -%} + {%- set last_digit = day % 10 -%} + {%- if last_digit == 1 -%} + {%- set suffix = "st" -%} + {%- elif last_digit == 2 -%} + {%- set suffix = "nd" -%} + {%- elif last_digit == 3 -%} + {%- set suffix = "rd" -%} + {%- else -%} + {%- set suffix = "th" -%} + {%- endif -%} + {%- endif -%} + + {#- Return the date. -#} + {{ date | date(format="%-d") }}{{ suffix }} + {%- if short == true -%} + {{ date | date(format=" %b %Y") }} + {%- else -%} + {{ date | date(format=" %B %Y") }} + {%- endif -%} +{%- else -%} + {%- if short -%} + {{ date | date(format="%-d %b %Y", locale=date_locale) }} + {%- else -%} + {{ date | date(format="%d %b %Y", locale=date_locale) }} + {%- endif -%} +{%- endif -%} + +{%- endmacro -%} diff --git a/themes/tabi-lean/templates/macros/list_posts.html b/themes/tabi-lean/templates/macros/list_posts.html new file mode 100644 index 0000000..2076194 --- /dev/null +++ b/themes/tabi-lean/templates/macros/list_posts.html @@ -0,0 +1,163 @@ +{# `metadata` can be "dates", "indexes" or both (e.g. "dates indexes" or "indexes dates"). #} +{# If both, the order doesn't matter and indexes will always be displayed before dates. #} +{# It would also work with arrays (e.g. ["dates"] or ["indexes"] or even ["indexes","dates"]). #} +{# Nevertheless, arrays cannot be used as a default value for a macro parameter in Tera (see https://github.com/Keats/tera/issues/710). #} +{# `paginator` is only used to compute indexes metadata and can be let empty otherwise. #} +{% macro list_posts(posts, all_posts="", max=999999, metadata="dates", language_strings="", section_path="", paginator="", pinned_first=false, current_page=1) %} + +{%- set separator = config.extra.separator | default(value="•") -%} + +{# Separate pinned and regular posts from all_posts if available, otherwise from posts #} +{% if pinned_first %} + {% set source_posts = all_posts | default(value=posts) %} + {% set pinned_posts = [] %} + {% set regular_posts = [] %} + {% for post in source_posts %} + {% if post.extra.pinned %} + {% set_global pinned_posts = pinned_posts | concat(with=post) %} + {% else %} + {% set_global regular_posts = regular_posts | concat(with=post) %} + {% endif %} + {% endfor %} + + {# On page 1 or when no pagination, show pinned then regular #} + {% if current_page == 1 %} + {% if paginator %} + {# With pagination: pinned + current page's posts #} + {% set display_posts = pinned_posts | concat(with=posts) %} + {% else %} + {# Without pagination: pinned + regular (no duplicates) #} + {% set display_posts = pinned_posts | concat(with=regular_posts) %} + {% endif %} + {% else %} + {% set display_posts = posts %} + {% endif %} +{% else %} + {% set display_posts = posts %} +{% endif %} + +<div class="bloglist-container"> + {# Display posts #} + {% for post in display_posts %} + {% if loop.index <= max %} + {% if loop.index == max or loop.last %} + {% set bottom_divider = false %} + {% else %} + {% set bottom_divider = true %} + {% endif %} + + <section class="bloglist-meta {% if bottom_divider -%}bottom-divider{%- endif -%}"> + <ul> + {%- if "indexes" in metadata -%} + {%- set post_index = loop.index -%} + {%- set number_of_posts = posts | length -%} + {# in case we have a pager, the index has been computed for the current page. #} + {%- if paginator -%} + {%- set number_of_posts = paginator.total_pages -%} + {%- set number_of_other_pages = paginator.current_index - 1 -%} + {%- set posts_per_page = paginator.paginate_by -%} + {%- set posts_in_other_pages = number_of_other_pages * posts_per_page -%} + {%- set post_index = posts_in_other_pages + post_index -%} + {%- endif -%} + {%- if macros_settings::evaluate_setting_priority(setting="post_listing_index_reversed", page=section, default_global_value=false) == "true" -%} + {# index starts at 1 instead of 0 #} + {%- set post_index = number_of_posts + 1 - post_index -%} + {%- endif -%} + <li class="index-label">{{ post_index }}</li> + {%- endif -%} + + {%- if "dates" in metadata -%} + {%- set allowed_post_listing_dates = ["date", "updated", "both"] -%} + {#- Calling the hierarchy macro here causes an error due to the "get parents" part of the macro. -#} + {#- This seems cleaner. -#} + {%- set post_listing_date = section.extra.post_listing_date | default(value=config.extra.post_listing_date) | default(value="date") -%} + {%- if post_listing_date not in allowed_post_listing_dates -%} + {{ throw(message="ERROR: Invalid value for config.extra.post_listing_date. Allowed values are 'date', 'updated', or 'both'.") }} + {%- endif -%} + + {%- set show_date = post.date and post_listing_date == "date" or post.date and post_listing_date == "both" or post.date and post_listing_date == "updated" and not post.updated -%} + {%- set show_updated = post.updated and post_listing_date == "updated" or post.updated and post_listing_date == "both" -%} + + {%- if show_date or show_updated -%} + {%- if show_date -%} + <li class="date">{{- macros_format_date::format_date(date=post.date, short=false, language_strings=language_strings) -}}</li> + {%- endif -%} + {%- if show_date and show_updated -%} + <li class="mobile-only separator">{{- separator -}}</li> + {%- endif -%} + {%- if show_updated -%} + {%- set last_updated_str = macros_translate::translate(key="last_updated_on", default="Updated on $DATE", language_strings=language_strings) -%} + {%- set formatted_date = macros_format_date::format_date(date=post.updated, short=true, language_strings=language_strings) -%} + {%- set updated_str = last_updated_str | replace(from="$DATE", to=formatted_date) -%} + <li class="date">{{ updated_str }}</li> + {%- endif -%} + {%- endif -%} + {%- endif -%} + + {% if post.extra.local_image or post.extra.remote_image %} + <li class="post-thumbnail"> + <a href="{{ post.permalink }}"> + {% if post.extra.local_image %} + {% set meta = get_image_metadata(path=post.extra.local_image, allow_missing=true) %} + <img class="thumbnail-image" + alt="{{ post.extra.local_image }}" + src="{{ get_url(path=post.extra.local_image) }}" + {% if meta.width %}width="{{ meta.width }}"{% endif %} + {% if meta.height %}height="{{ meta.height }}"{% endif %}> + {% elif post.extra.remote_image %} + <img class="thumbnail-image" + alt="{{ post.extra.remote_image }}" + src="{{ post.extra.remote_image }}"> + {% endif %} + </a> + </li> + {% endif %} + + {% if post.draft %} + <li class="draft-label">{{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}</li> + {% endif %} + </ul> + </section> + + <section class="bloglist-content {% if bottom_divider -%}bottom-divider{%- endif -%}"> + <div> + {% if pinned_first and post.extra.pinned %} + <div class="pinned-label"> + <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M10.5 2.255v-.01c.003-.03.013-.157-.361-.35C9.703 1.668 8.967 1.5 8 1.5s-1.703.169-2.138.394c-.375.194-.365.32-.362.351v.01c-.003.03-.013.157.362.35C6.297 2.832 7.033 3 8 3s1.703-.169 2.139-.394c.374-.194.364-.32.361-.351M12 2.25c0 .738-.433 1.294-1.136 1.669l.825 2.31c1.553.48 2.561 1.32 2.561 2.52c0 1.854-2.402 2.848-5.5 2.985V15a.75.75 0 0 1-1.5 0v-3.266c-3.098-.136-5.5-1.131-5.5-2.984c0-1.2 1.008-2.04 2.561-2.52l.825-2.311C4.433 3.544 4 2.988 4 2.25C4 .75 5.79 0 8 0s4 .75 4 2.25" clip-rule="evenodd"/></svg> + <span>{{ macros_translate::translate(key="pinned", default="Pinned", language_strings=language_strings) }}</span> + </div> + {% endif %} + + <h2 class="bloglist-title"> + <a href="{{ post.permalink }}">{{ post.title }}</a> + </h2> + + {% if post.taxonomies.tags %} + <div class="bloglist-tags"> + {% for tag in post.taxonomies.tags %} + <a class="tag" href="{{ get_taxonomy_url(kind='tags', name=tag, lang=lang) | safe }}">{{ tag }}</a> + {% endfor %} + </div> + {% endif %} + + <div class="description"> + {% if post.description %} + <p>{{ post.description | markdown(inline=true) | safe }}</p> + {% elif post.summary %} + <p>{{ post.summary | markdown(inline=true) | trim_end_matches(pat=".") | safe }}…</p> + {% endif %} + </div> + <a class="readmore" href="{{ post.permalink }}">{{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }} <span class="arrow">→</span></a> + </div> + </section> + {% endif %} + {% if not loop.last %} + {% if loop.index == max %} + <div class="all-posts"> + <a href="{{ get_url(path=section_path, lang=lang) }}/">{{ macros_translate::translate(key="all_posts", default="All posts", language_strings=language_strings) }} <span class="arrow">⟶</span></a> + </div> + {% endif %} + {% endif %} + {% endfor %} +</div> +{% endmacro %} diff --git a/themes/tabi-lean/templates/macros/page_header.html b/themes/tabi-lean/templates/macros/page_header.html new file mode 100644 index 0000000..daa8d02 --- /dev/null +++ b/themes/tabi-lean/templates/macros/page_header.html @@ -0,0 +1,18 @@ +{% macro page_header(title, show_feed_icon=false) %} + +{% set rel_attributes = macros_rel_attributes::rel_attributes() | trim %} + + +{%- set blank_target = macros_target_attribute::target_attribute(new_tab=config.markdown.external_links_target_blank) -%} + +<h1 class="title-container section-title bottom-divider"> + {{ title -}} + {% if show_feed_icon %} + {%- set feed_url = feed_utils::get_feed_url() -%} + <a class="no-hover-padding social" rel="{{ rel_attributes }}" {{ blank_target }} href="{{ get_url(path=term.path ~ feed_url, lang=lang, trailing_slash=false) | safe }}"> + <img loading="lazy" alt="feed" title="feed" src="{{ get_url(path='/social_icons/rss.svg') }}"> + </a> + {% endif %} +</h1> + +{% endmacro page_header %} diff --git a/themes/tabi-lean/templates/macros/rel_attributes.html b/themes/tabi-lean/templates/macros/rel_attributes.html new file mode 100644 index 0000000..71672c7 --- /dev/null +++ b/themes/tabi-lean/templates/macros/rel_attributes.html @@ -0,0 +1,19 @@ +{% macro rel_attributes() %} + +{%- set rel_attributes = [] -%} +{%- if config.markdown.external_links_target_blank -%} + {%- set rel_attributes = rel_attributes | concat(with="noopener") -%} +{%- endif -%} +{# https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel#nofollow #} +{# This is ignored, as it doesn't make sense to set `nofollow` on projects or social links. #} +{# {%- if config.markdown.external_links_no_follow -%} + {%- set rel_attributes = rel_attributes | concat(with="nofollow") -%} +{%- endif -%} #} +{%- if config.markdown.external_links_no_referrer -%} + {%- set rel_attributes = rel_attributes | concat(with="noreferrer") -%} +{%- endif -%} + +{# Return the array of rel attributes joined by a space #} +{{- rel_attributes | join(sep=" ") -}} + +{% endmacro rel_attributes %} diff --git a/themes/tabi-lean/templates/macros/series_page.html b/themes/tabi-lean/templates/macros/series_page.html new file mode 100644 index 0000000..d5704a1 --- /dev/null +++ b/themes/tabi-lean/templates/macros/series_page.html @@ -0,0 +1,162 @@ +{# +Those macros deal with introduction and navigation for series pages. +Using macros have been prefered over partial inclusion or inline code to make sure series_ordered_pages is forced to be used. +A section's pages natural order is invalid in case of reversed pagination which would lead to invalid series' pages order. +To prevent this, pages are ordered correctly in a separate variable which must be used instead of the series section pages. +#} + +{# +Computes the introduction of a series's page. + +Parameters: + - `page`: The page object being part of the series. + - `series_section`: The series' section the page belongs to. + - `series_ordered_pages`: The series' pages properly ordered (see at the top of this file for an explanation). + - `language_strings`: A dictionary containing the translation strings. +#} +{% macro process_series_template(template_type, page, series_section, series_ordered_pages, language_strings) %} + {%- if "series" in series_section.extra and series_section.extra.series -%} + {# Prepare variables for substitution #} + {%- set series_title = series_section.title -%} + {%- set series_permalink = series_section.permalink -%} + {%- set series_html_link = '<a href="' ~ series_section.permalink ~ '" aria_label="' ~ series_section.title ~ '">' ~ series_section.title ~ '</a>' -%} + {# Build series pages list #} + {%- set series_pages_list = [] -%} + {%- for series_page in series_ordered_pages -%} + {%- if series_page.relative_path == page.relative_path -%} + {%- set series_pages_list_item = '<li>' ~ series_page.title ~ '</li>' -%} + {%- else -%} + {%- set series_pages_list_item = '<li><a href="' ~ series_page.permalink ~ '" aria_label="' ~ series_page.title ~ '">' ~ series_page.title ~ '</a></li>' -%} + {%- endif -%} + {%- set_global series_pages_list = series_pages_list | concat(with=series_pages_list_item) -%} + {%- endfor -%} + {%- set series_pages_list = series_pages_list | join(sep="") -%} + {%- if macros_settings::evaluate_setting_priority(setting="post_listing_index_reversed", page=series_section, default_global_value=false) == "true" -%} + {%- set series_pages_ordered_list = '<ol reversed>' ~ series_pages_list ~ '</ol>' -%} + {%- else -%} + {%- set series_pages_ordered_list = '<ol>' ~ series_pages_list ~ '</ol>' -%} + {%- endif -%} + {%- set series_pages_unordered_list = '<ul>' ~ series_pages_list ~ '</ul>' -%} + + {# Get page position and navigation info #} + {%- set series_pages_number = 0 -%} + {%- set series_page_index = 0 -%} + {%- set first_page = series_ordered_pages | first -%} + {%- set is_found = false -%} + + {%- for series_page in series_ordered_pages -%} + {%- set_global series_pages_number = series_pages_number + 1 -%} + {%- if series_page.relative_path == page.relative_path -%} + {%- set_global series_page_index = series_pages_number -%} + {%- set_global is_found = true -%} + {%- else -%} + {%- if not is_found -%} + {%- set_global prev_page = series_page -%} + {%- elif not next_page is defined -%} + {%- set_global next_page = series_page -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + + {# Determine template to use based on available navigation #} + {%- set position = "middle" -%} + {%- if prev_page is defined and not next_page is defined -%} + {%- set_global position = "prev_only" -%} + {%- elif next_page is defined and not prev_page is defined -%} + {%- set_global position = "next_only" -%} + {%- endif -%} + + {# Get template from config #} + {%- set templates_key = "series_" ~ template_type ~ "_templates" -%} + {%- set template = "" -%} + {%- if series_section.extra[templates_key] is defined -%} + {%- if series_section.extra[templates_key][position] is defined -%} + {%- set_global template = series_section.extra[templates_key][position] -%} + {%- elif series_section.extra[templates_key].default is defined -%} + {%- set_global template = series_section.extra[templates_key].default -%} + {%- endif -%} + {%- endif -%} + + {# Prepare navigation variables #} + {%- if prev_page is defined -%} + {%- set prev_title = prev_page.title -%} + {%- set prev_permalink = prev_page.permalink -%} + {%- set prev_html_link = '<a href="' ~ prev_page.permalink ~ '" aria_label="' ~ prev_page.title ~ '">' ~ prev_page.title ~ '</a>' -%} + {%- set prev_description = prev_page.description | default(value="") -%} + {%- endif -%} + {%- if next_page is defined -%} + {%- set next_title = next_page.title -%} + {%- set next_permalink = next_page.permalink -%} + {%- set next_html_link = '<a href="' ~ next_page.permalink ~ '" aria_label="' ~ next_page.title ~ '">' ~ next_page.title ~ '</a>' -%} + {%- set next_description = next_page.description | default(value="") -%} + {%- endif -%} + + {# Replace standard variables #} + {%- set template = template + | replace(from="$SERIES_TITLE", to=series_title) + | replace(from="$SERIES_PERMALINK", to=series_permalink) + | replace(from="$SERIES_HTML_LINK", to=series_html_link) + | replace(from="$FIRST_TITLE", to=first_page.title) + | replace(from="$FIRST_HTML_LINK", to='<a href="' ~ first_page.permalink ~ '">' ~ first_page.title ~ '</a>') + | replace(from="$SERIES_PAGES_NUMBER", to=series_pages_number | as_str) + | replace(from="$SERIES_PAGE_INDEX", to=series_page_index | as_str) + | replace(from="$SERIES_PAGES_OLIST", to=series_pages_ordered_list) + | replace(from="$SERIES_PAGES_ULIST", to=series_pages_unordered_list) + -%} + + {# Replace navigation variables if they exist #} + {%- if prev_page is defined -%} + {%- set template = template + | replace(from="$PREV_TITLE", to=prev_title) + | replace(from="$PREV_PERMALINK", to=prev_permalink) + | replace(from="$PREV_HTML_LINK", to=prev_html_link) + | replace(from="$PREV_DESCRIPTION", to=prev_description) + -%} + {%- endif -%} + + {%- if next_page is defined -%} + {%- set template = template + | replace(from="$NEXT_TITLE", to=next_title) + | replace(from="$NEXT_PERMALINK", to=next_permalink) + | replace(from="$NEXT_HTML_LINK", to=next_html_link) + | replace(from="$NEXT_DESCRIPTION", to=next_description) + -%} + {%- endif -%} + + {# Custom placeholders #} + {%- if series_section.extra.series_template_placeholders is defined -%} + {%- set missing_vars = [] -%} + {%- for placeholder in series_section.extra.series_template_placeholders -%} + {%- if placeholder in template -%} + {%- set var_name = placeholder | replace(from="$", to="") | lower -%} + {%- if page.extra.series_template_variables is defined and page.extra.series_template_variables[var_name] is defined -%} + {%- set_global template = template | replace(from=placeholder, to=page.extra.series_template_variables[var_name]) -%} + {%- else -%} + {%- set_global missing_vars = missing_vars | concat(with=var_name) -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if missing_vars | length > 0 -%} + {%- set missing_vars_str = missing_vars | join(sep=", ") -%} + {{ throw(message="ERROR: The following variables are included in this page's series templates (`series_template_placeholders`) but have not been set in the `series_template_variables` of this page: " ~ missing_vars_str) }} + {%- endif -%} + {%- endif -%} + + {# Output the processed template if not empty #} + {%- if template | length > 0 -%} + <section class="series-page-{{ template_type }}"> + {{ template | markdown | safe }} + </section> + {%- endif -%} + {%- endif -%} +{% endmacro %} + +{# Macro for series introduction #} +{% macro get_introduction(page, series_section, series_ordered_pages, language_strings) %} + {{ macros_series_page::process_series_template(template_type="intro", page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) }} +{% endmacro %} + +{# Macro for series outro #} +{% macro get_outro(page, series_section, series_ordered_pages, language_strings) %} + {{ macros_series_page::process_series_template(template_type="outro", page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) }} +{% endmacro %} diff --git a/themes/tabi-lean/templates/macros/settings.html b/themes/tabi-lean/templates/macros/settings.html new file mode 100644 index 0000000..d237d7a --- /dev/null +++ b/themes/tabi-lean/templates/macros/settings.html @@ -0,0 +1,68 @@ +{# +Evaluates the priority of a particular setting across different scopes. + +The priority is as follows: page > section > config. + +Parameters: + - setting: The name of the setting to evaluate. + - page: The page object containing settings. + - default_global_value: The setting's default value. +#} + +{% macro evaluate_setting_priority(setting, page, section="", default_global_value="") %} + +{%- if section -%} + {%- set current_section = section -%} +{%- elif page -%} + {%- set current_section = "" -%} + {#- Retrieve last ancestor to determine current section, if applicable -#} + {%- if page.ancestors | length > 0 -%} + {%- set last_ancestor = page.ancestors | slice(start=-1) -%} + {%- set_global current_section = get_section(path=last_ancestor.0, metadata_only=true) -%} + {%- else -%} + {#- We're likely in a nested page. Try to find the parent page or nearest section. -#} + {%- set components = page.components -%} + {%- for i in range(start=1, end=components | length) -%} + {%- if lang == config.default_language -%} + {%- set potential_path = components | slice(end=components | length - i) | join(sep="/") -%} + {%- set potential_page = potential_path ~ "/index.md" -%} + {%- set potential_section = potential_path ~ "/_index.md" -%} + {%- else -%} + {%- set potential_path = components | slice(start=1, end=components | length - i) | join(sep="/") -%} + {%- set potential_page = potential_path ~ "/index." ~ lang ~ ".md" -%} + {%- set potential_section = potential_path ~ "/_index." ~ lang ~ ".md" -%} + {%- endif -%} + {#- Check for parent page first. -#} + {%- set page_data = load_data(path=potential_page, required=false) -%} + {%- if page_data -%} + {%- set_global current_section = get_page(path=potential_page) -%} + {%- break -%} + {%- endif -%} + {#- No parent page, check for section. -#} + {%- set section_data = load_data(path=potential_section, required=false) -%} + {%- if section_data -%} + {%- set_global current_section = get_section(path=potential_section, metadata_only=true) -%} + {%- break -%} + {%- endif -%} + {%- endfor -%} + {%- endif -%} +{%- endif -%} + +{%- set priority_order = [ + page.extra[setting] | default(value=""), + current_section.extra[setting] | default(value=""), + config.extra[setting] | default(value="") +] -%} + +{%- set output = default_global_value -%} + +{%- for value in priority_order -%} + {%- if value != "" -%} + {%- set_global output = value -%} + {%- break -%} + {%- endif -%} +{%- endfor -%} + +{{- output -}} + +{% endmacro %} diff --git a/themes/tabi-lean/templates/macros/table_of_contents.html b/themes/tabi-lean/templates/macros/table_of_contents.html new file mode 100644 index 0000000..18a3ab6 --- /dev/null +++ b/themes/tabi-lean/templates/macros/table_of_contents.html @@ -0,0 +1,54 @@ +{% macro toc(page, header, language_strings="") %} + +{%- set toc_levels = page.extra.toc_levels | default(value=3) -%} + +{% if page.extra.toc_ignore_pattern %} + {%- set toc_ignore_pattern = page.extra.toc_ignore_pattern -%} +{% endif %} + +<div class="toc-container"> + {% if header %} + <h3>{{ macros_translate::translate(key="table_of_contents", default="Table of Contents", language_strings=language_strings) }}</h3> + {% endif %} + + <ul> + {% for h1 in page.toc %} + {# Only render headers if there's no ignore pattern, or if the header text doesn't match the pattern. #} + {% if not toc_ignore_pattern or not (h1.title is matching(toc_ignore_pattern)) %} + <li><a href="{{ h1.permalink | safe }}">{{ h1.title }}</a> + {% if h1.children and toc_levels > 1 %} + <ul> + {% for h2 in h1.children %} + {% if not toc_ignore_pattern or not (h2.title is matching(toc_ignore_pattern)) %} + <li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a> + {% if h2.children and toc_levels > 2 %} + <ul> + {% for h3 in h2.children %} + {% if not toc_ignore_pattern or not (h3.title is matching(toc_ignore_pattern)) %} + <li><a href="{{ h3.permalink | safe }}">{{ h3.title }}</a> + {% if h3.children and toc_levels > 3 %} + <ul> + {% for h4 in h3.children %} + {% if not toc_ignore_pattern or not (h4.title is matching(toc_ignore_pattern)) %} + <li><a href="{{ h4.permalink | safe }}">{{ h4.title }}</a></li> + {% endif %} + {% endfor %} + </ul> + {% endif %} + </li> + {% endif %} + {% endfor %} + </ul> + {% endif %} + </li> + {% endif %} + {% endfor %} + </ul> + {% endif %} + </li> + {% endif %} + {% endfor %} + </ul> +</div> + +{% endmacro toc %} diff --git a/themes/tabi-lean/templates/macros/target_attribute.html b/themes/tabi-lean/templates/macros/target_attribute.html new file mode 100644 index 0000000..2da5b9d --- /dev/null +++ b/themes/tabi-lean/templates/macros/target_attribute.html @@ -0,0 +1,11 @@ +{% macro target_attribute(new_tab) %} + +{%- set blank_target = "" -%} + +{%- if new_tab -%} + {%- set blank_target = "target=_blank" -%} +{%- endif -%} + +{{ blank_target }} + +{% endmacro target_attribute %} diff --git a/themes/tabi-lean/templates/macros/translate.html b/themes/tabi-lean/templates/macros/translate.html new file mode 100644 index 0000000..1b138dd --- /dev/null +++ b/themes/tabi-lean/templates/macros/translate.html @@ -0,0 +1,72 @@ +{#- Dynamically selects the appropriate translation key based on the provided `number` and `lang` context. +If a `number` is provided, the macro will attempt to pluralize the translation key based on the language's rules. + +Parameters: +- `key`: The base key for the translation string, matching the i18n files. Example: `results` to get `zero_results`, `one_results`, `many_results`, etc. +- `number`: Optional. The numerical value associated with the key. +- `language_strings`: A dictionary containing the translation strings. +- `default`: A default string to use if no translation is found for the key. +- `replace`: Optional. If `true`, the macro will replace the `$NUMBER` placeholder in the translation string with the provided `number`. + +The macro supports special pluralization rules for: +- Arabic (`ar`): Has unique forms for zero, one, two, few, and many. +- Slavic languages: Pluralization depends on the last digit of the number, with exceptions for numbers ending in 11-14. + +NOTE: If the logic for pluralization is modified, it needs to be replicated on the JavaScript search. +Files: static/js/searchElasticlunr.js and its minified version at static/js/searchElasticlunr.min.js +Function name: getPluralizationKey -#} +{% macro translate(key, number=-1, language_strings="", default="", replace=true) %} + {%- set slavic_plural_languages = ["uk", "be", "bs", "hr", "ru", "sr"] -%} + + {%- set key_prefix = "" -%} + {#- `zero_` and `one_` are common cases. We handle "many" (plural) later, after language-specific pluralization -#} + {%- if number == 0 -%} + {%- set key_prefix = "zero_" -%} + {%- elif number == 1 -%} + {%- set key_prefix = "one_" -%} + {%- endif -%} + + {#- Pluralization -#} + {%- if number != -1 and key_prefix == "" -%} + {#- Arabic -#} + {%- if lang == "ar" -%} + {%- set modulo = number % 100 -%} + {%- if number == 2 -%} + {%- set key_prefix = "two_" -%} + {%- elif modulo >= 3 and modulo <= 10 -%} + {%- set key_prefix = "few_" -%} + {%- else -%} + {%- set key_prefix = "many_" -%} + {%- endif -%} + {#- Slavic languages like Russian or Ukrainian -#} + {%- elif lang in slavic_plural_languages -%} + {%- set modulo10 = number % 10 -%} + {%- set modulo100 = number % 100 -%} + {%- if modulo10 == 1 and modulo100 != 11 -%} + {%- set key_prefix = "one_" -%} + {%- elif modulo10 >= 2 and modulo10 <= 4 -%} + {%- if modulo100 >= 12 and modulo100 <= 14 -%} + {%- set key_prefix = "many_" -%} + {%- else -%} + {%- set key_prefix = "few_" -%} + {%- endif -%} + {%- else -%} + {%- set key_prefix = "many_" -%} + {%- endif -%} + {%- else -%} + {#- Default pluralization -#} + {#- Zero and one are already handled -#} + {%- set key_prefix = "many_" -%} + {%- endif -%} + {%- endif -%} + + {#- Translated string -#} + {%- set final_key = key_prefix ~ key -%} + {%- set translated_text = language_strings[final_key] | default(value=default) | safe -%} + + {#- Replace $NUMBER with the number -#} + {%- if replace -%} + {%- set translated_text = translated_text | replace(from="$NUMBER", to=number | as_str) -%} + {%- endif -%} + {{- translated_text -}} +{% endmacro %} diff --git a/themes/tabi-lean/templates/page.html b/themes/tabi-lean/templates/page.html new file mode 100644 index 0000000..0dff1a7 --- /dev/null +++ b/themes/tabi-lean/templates/page.html @@ -0,0 +1,368 @@ +{% extends "base.html" %} + +{% block main_content %} +{%- set separator = config.extra.separator | default(value="•") -%} + +{%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%} + +{%- set blank_target = macros_target_attribute::target_attribute(new_tab=config.markdown.external_links_target_blank) -%} + +{# Debugging #} +{# <div><pre> + Page path: {{ page.path }} + Page components: {{ page.components | join(sep=", ") }} + Page ancestors: {{ page.ancestors | join(sep=", ") }} + Current language: {{ lang }} + Default language: {{ config.default_language }} + Current section: {% if current_section %}{{ current_section.path }}{% else %}None{% endif %} + Page extra: {{ page.extra | json_encode() }} + {% if section -%} + {%- set current_section = section -%} + {%- elif page -%} + {%- set current_section = "" -%} + {%- if page.ancestors | length > 0 -%} + {%- set last_ancestor = page.ancestors | slice(start=-1) -%} + {%- set_global current_section = get_section(path=last_ancestor.0, metadata_only=true) -%} + {%- else -%} + {%- set components = page.components -%} + {%- for i in range(start=1, end=components | length) -%} + {%- if lang == config.default_language -%} + {%- set potential_path = components | slice(end=components | length - i) | join(sep="/") -%} + {%- set potential_page = potential_path ~ "/index.md" -%} + {%- set potential_section = potential_path ~ "/_index.md" -%} + {%- else -%} + {%- set potential_path = components | slice(start=1, end=components | length - i) | join(sep="/") -%} + {%- set potential_page = potential_path ~ "/index." ~ lang ~ ".md" -%} + {%- set potential_section = potential_path ~ "/_index." ~ lang ~ ".md" -%} + {%- endif -%} + Checking parent page: {{ potential_page }} + {%- set page_data = load_data(path=potential_page, required=false) -%} + {%- if page_data -%} + {%- set_global current_section = get_page(path=potential_page) %} + Parent page found: {{ current_section.path }} + {%- break -%} + {%- endif -%} + Checking section: {{ potential_section }} + {%- set section_data = load_data(path=potential_section, required=false) -%} + {%- if section_data -%} + {%- set_global current_section = get_section(path=potential_section, metadata_only=true) -%} + Section found: {{ current_section.path }} + {%- break -%} + {%- endif -%} + {%- endfor -%} + {%- endif -%} + {%- endif %} +Found nearest parent/section: {% if current_section %}{{ current_section.path }}{% else %}None{% endif %} +Current section extra: {% if current_section %}{{ current_section.extra | json_encode() }}{% else %}None{% endif %} +</pre></div> + + {% set settings_to_test = [ + "iine", + "iine_icon", + "enable_cards_tag_filtering", + "footnote_backlinks", + "add_src_to_code_block", + "force_codeblock_ltr", + "copy_button", + "katex", + "quick_navigation_buttons", + "show_reading_time", + "show_date", + "show_author", + "show_remote_changes", + "toc", + "show_previous_next_article_links", + "invert_previous_next_article_links", + "previous_next_article_links_full_width", + "enable_csp", + ] %} + + <table> + <thead> + <tr> + <th>setting</th> + <th>page</th> + <th>section</th> + <th>config</th> + <th>macro output</th> + </tr> + </thead> + <tbody> + {% for setting in settings_to_test %} + <tr> + <td><code>{{ setting }}</code></td> + <td>{{ page.extra[setting] | default(value="⬛") }}</td> + <td>{{ current_section.extra[setting] | default(value="⬛") }}</td> + <td>{{ config.extra[setting] | default(value="⬛") }}</td> + <td>{{ macros_settings::evaluate_setting_priority(setting=setting, page=page) }}</td> + </tr> + {% endfor %} + </tbody> + </table> +</div> #} + +{# {{ __tera_context }} #} +{# End debugging #} + +<main> + <article class="h-entry"> + <h1 class="p-name article-title"> + {{ page.title | markdown(inline=true) | safe }} + </h1> + <a class="u-url u-uid" href="{{ page.permalink | safe }}"></a> + + <ul class="meta"> + {#- Draft indicator -#} + {% if page.draft %} + <li class="draft-label">{{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}</li> + {% endif %} + + {#- Author(s) -#} + {%- if page.authors or config.author and macros_settings::evaluate_setting_priority(setting="show_author", page=page, default_global_value=false) == "true" -%} + {%- if page.authors -%} + {%- set author_list = page.authors -%} + {%- else -%} + {%- set author_list = [config.author] -%} + {%- endif -%} + + {%- if author_list | length == 1 -%} + {%- set author_string = '<span class="p-author">' ~ author_list.0 ~ '</span>' -%} + {%- else -%} + {%- set last_author = author_list | last -%} + {%- set other_authors = author_list | slice(end=-1) -%} + {%- set author_separator = macros_translate::translate(key="author_separator", default=", ", language_strings=language_strings) -%} + {%- set author_separator = '</span>' ~ author_separator ~ '<span class="p-author">' -%} + {%- set conjunction = macros_translate::translate(key="author_conjunction", default=" and ", language_strings=language_strings) -%} + {%- set conjunction = '</span>' ~ conjunction ~ '<span class="p-author">' -%} + {%- set author_string = other_authors | join(sep=author_separator) -%} + {%- set author_string = author_string ~ conjunction ~ last_author -%} + {%- set author_string = '<span class="p-author">' ~ author_string ~ '</span>' -%} + {%- endif -%} + + {%- set by_author = macros_translate::translate(key="by_author", default="By $AUTHOR", language_strings=language_strings) -%} + <li>{{ by_author | replace(from="$AUTHOR", to=author_string) | safe }}</li> + {%- set previous_visible = true -%} + {%- endif -%} + + {%- if config.extra.hcard and config.extra.hcard.enable and ( not author_list or author_list is containing(config.author)) -%} + {% include "partials/hcard_small.html" %} + {%- endif -%} + + {%- set separator_with_class = "<span class='separator' aria-hidden='true'>" ~ separator ~ "</span>"-%} + + {#- Date -#} + {%- if page.date and macros_settings::evaluate_setting_priority(setting="show_date", page=page, default_global_value=true) == "true" -%} + <li><time class="dt-published" datetime="{{ page.date }}">{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }}</time></li> + {#- Variable to keep track of whether we've shown a section, to avoid separators as the first element -#} + {%- set previous_visible = true -%} + {%- endif -%} + + {#- Reading time -#} + {%- if macros_settings::evaluate_setting_priority(setting="show_reading_time", page=page, default_global_value=true) == "true" -%} + <li title="{{ macros_translate::translate(key="words", number=page.word_count, default="$NUMBER words", language_strings=language_strings) }}">{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_translate::translate(key="min_read", number=page.reading_time, default="$NUMBER min read", language_strings=language_strings) }}</li> + {%- set previous_visible = true -%} + {%- endif -%} + + {#- Tags -#} + {%- if page.taxonomies and page.taxonomies.tags -%} + <li class="tag">{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}: </li> + {%- for tag in page.taxonomies.tags -%} + <li class="tag"><a class="p-category" href="{{ get_taxonomy_url(kind='tags', name=tag, lang=lang) | safe }}">{{ tag }}</a> + {%- if not loop.last -%} + , + {%- endif -%} + </li> + {%- endfor -%} + {%- set previous_visible = true -%} + {%- endif -%} + + {#- Last updated on -#} + {% if page.updated %} + {%- set last_updated_str = macros_translate::translate(key="last_updated_on", default="Updated on $DATE", language_strings=language_strings) -%} + {%- set formatted_date = macros_format_date::format_date(date=page.updated, short=true, language_strings=language_strings) -%} + {%- set updated_str = last_updated_str | replace(from="$DATE", to=formatted_date) -%} + {%- set previous_visible = true -%} + </ul><ul class="meta last-updated"><li><time class="dt-updated" datetime="{{ page.updated }}">{{ updated_str }}</time></li> + {#- Show link to remote changes if enabled -#} + {%- if config.extra.remote_repository_url and macros_settings::evaluate_setting_priority(setting="show_remote_changes", page=page, default_global_value=true) == "true" -%} + <li>{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}<a class="external" href="{% include "partials/history_url.html" %}" {{ blank_target }} rel="{{ rel_attributes }}">{{ macros_translate::translate(key="see_changes", default="See changes", language_strings=language_strings) }}</a></li> + {%- endif -%} + {% endif %} + </ul> + + {#- A page is part of a series if one of the sections above (whether it is transparent or not) has the `extra.series` parameter set to true. -#} + {#- As a series might be a transparent section in order to mix up its articles with those of the section just above or the root, -#} + {#- there is no other way but to compute the potential path of each ancestor section related to the page and look for the first one being a series. -#} + {#- Using the `ancestors` field of a section is not possible because transparent sections are not present in this field. -#} + {%- set series_path_components = [] -%} + {%- set section_paths = [] -%} + {%- for path in page.relative_path | split(pat="/") | slice(end=-1) -%} + {%- set_global series_path_components = series_path_components | concat(with=path) -%} + {%- set section_path = series_path_components | concat(with="_index.md") | join(sep="/") -%} + {%- set_global section_paths = section_paths | concat(with=section_path) -%} + {%- endfor -%} + {#- The series the page is part of is the closest section flagged as a series, if any -#} + {%- for section_path in section_paths | reverse -%} + {%- set section_file_exists = load_data(path=section_path, required=false) -%} + {%- if section_file_exists -%} + {%- set loaded_section = get_section(path=section_path,lang=lang) -%} + {%- if "series" in loaded_section.extra and loaded_section.extra.series -%} + {%- set_global series_section = loaded_section -%} + {%- set_global series_ordered_pages = loaded_section.pages -%} + {%- if loaded_section.paginated | default(value=0) > 0 and loaded_section.paginate_reversed -%} + {%- set_global series_ordered_pages = loaded_section.pages | reverse -%} + {%- endif -%} + {%- break -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + + {% if page.extra.tldr %} + <div class="admonition note"> + <div class="admonition-icon admonition-icon-note"></div> + <div class="admonition-content"> + <strong class="admonition-title"> + <span title="Too long; didn't read (summary)">TL;DR</span> + </strong> + <p>{{ page.extra.tldr | markdown | safe }}</p> + </div> + </div> + {% endif %} + + {#- Optional table of contents below the header -#} + {% if page.toc and macros_settings::evaluate_setting_priority(setting="toc", page=page, default_global_value=false) == "true" %} + {{ macros_toc::toc(page=page, header=true, language_strings=language_strings) }} + {% endif %} + + {#- Optional Summary paragraph for readers -#} + {% if page.description %} + <p class="p-summary" hidden>{{ page.description }}</p> + {%- endif -%} + + + <section class="e-content body"> + {#- Replace series_intro placeholder -#} + {%- set content_with_intro = page.content -%} + {%- if "<!-- series_intro -->" in page.content -%} + {%- set series_intro_html = macros_series_page::get_introduction(page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) -%} + {%- set content_with_intro = content_with_intro | replace(from="<!-- series_intro -->", to=series_intro_html) -%} + {%- elif series_section -%} + {%- set series_intro_html = macros_series_page::get_introduction(page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) -%} + {%- set content_with_intro = series_intro_html ~ content_with_intro -%} + {%- endif -%} + + {#- Handle series_outro placeholder -#} + {%- set processed_content = content_with_intro -%} + {%- if "<!-- series_outro -->" in content_with_intro -%} + {%- set series_outro_html = macros_series_page::get_outro(page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) -%} + {%- set processed_content = processed_content | replace(from="<!-- series_outro -->", to=series_outro_html) -%} + {%- elif series_section -%} + {%- set series_outro_html = macros_series_page::get_outro(page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) -%} + {#- We want the outro at the end of the article, but before footnote definitions -#} + {%- set footnotes_marker = '<hr><ol class="footnotes-list">' -%} + {%- if footnotes_marker in content_with_intro -%} + {%- set content_sections = processed_content | split(pat=footnotes_marker) -%} + {%- set main_content = content_sections | first -%} + {%- set footnotes_content = content_sections | slice(start=1) | join(sep=footnotes_marker) -%} + {%- set processed_content = main_content ~ series_outro_html ~ footnotes_marker ~ footnotes_content -%} + {%- else -%} + {%- set processed_content = processed_content ~ series_outro_html -%} + {%- endif -%} + {%- endif -%} + + {#- Replace TOC and render final content -#} + {#- The replace pattern is used to enable arbitrary locations for the Table of Contents -#} + {#- This is Philipp Oppermann's workaround: https://github.com/getzola/zola/issues/584#issuecomment-474329637 -#} + {{ processed_content | replace(from="<!-- toc -->", to=macros_toc::toc(page=page, header=false, language_strings=language_strings)) | safe }} + </section> + + {#- iine button -#} + {%- if macros_settings::evaluate_setting_priority(setting="iine", page=page, default_global_value=false) == "true" -%} + {% include "partials/iine_button.html" %} + {%- endif -%} + + {% if macros_settings::evaluate_setting_priority(setting="show_previous_next_article_links", page=page, default_global_value=true) == "true" %} + {%- if page.lower or page.higher -%} + {% set next_label = macros_translate::translate(key="next", default="Next", language_strings=language_strings) %} + {% set prev_label = macros_translate::translate(key="prev", default="Prev", language_strings=language_strings) %} + {% if macros_settings::evaluate_setting_priority(setting="invert_previous_next_article_links", page=page, default_global_value=true) == "true" %} + {% if page.higher %} + {% set left_link = page.higher.permalink %} + {% set left_label = prev_label %} + {% set left_title = page.higher.title %} + {% endif %} + {% if page.lower %} + {% set right_link = page.lower.permalink %} + {% set right_label = next_label %} + {% set right_title = page.lower.title %} + {% endif %} + {% else %} + {% if page.lower %} + {% set left_link = page.lower.permalink %} + {% set left_label = next_label %} + {% set left_title = page.lower.title %} + {% endif %} + {% if page.higher %} + {% set right_link = page.higher.permalink %} + {% set right_label = prev_label %} + {% set right_title = page.higher.title %} + {% endif %} + {% endif %} + {% if macros_settings::evaluate_setting_priority(setting="previous_next_article_links_full_width", page=page, default_global_value=true) == "true" %} + {%- set full_width_class = "full-width" -%} + {% endif %} + <nav class="{{ full_width_class | default(value="") }} article-navigation"> + <div> + {%- if left_link and left_label and left_title -%} + <a href="{{ left_link | safe }}" aria-label="{{ left_label }}" aria-describedby="left_title"><span class="arrow">←</span> {{ left_label }}</a> + <p aria-hidden="true" id="left_title">{{ left_title | truncate(length=100, end="…") | markdown(inline=true) | safe }}</p> + {%- endif -%} + </div> + <div> + {%- if right_link and right_label and right_title -%} + <a href="{{ right_link | safe }}" aria-label="{{ right_label }}" aria-describedby="right_title">{{ right_label }} <span class="arrow">→</span></a> + <p aria-hidden="true" id="right_title">{{ right_title | truncate(length=100, end="…") | markdown(inline=true) | safe }}</p> + {%- endif -%} + </div> + </nav> + {%- endif -%} + {%- endif -%} + + {#- Comments -#} + {#- Check if comments are enabled, checking that they are not disabled on the specific page -#} + {% set systems = ["giscus", "utterances", "hyvortalk", "isso"] %} + {% set enabled_systems = 0 %} + {% set comment_system = "" %} + + {% for system in systems %} + {% set global_enabled = config.extra[system].enabled_for_all_posts | default(value=false) %} + {% set page_enabled = page.extra[system] | default(value=global_enabled) %} + {% set is_enabled = global_enabled and page_enabled != false or page_enabled == true %} + + {% if is_enabled %} + {% set_global comment_system = system %} + {% set_global enabled_systems = enabled_systems + 1 %} + {% endif %} + {% endfor %} + {#- Ensure only one comment system is enabled -#} + {% if enabled_systems > 1 %} + {{ throw(message="ERROR: Multiple comment systems have been enabled for the same page. Check your config.toml and individual page settings to ensure only one comment system is activated at a time.") }} + {% endif %} + {% if comment_system %} + {% include "partials/comments.html" %} + {% endif %} + + {#- Webmentions -#} + {%- set global_webmentions_enabled = config.extra.webmentions.enable | default(value=false) -%} + {%- set page_webmentions_enabled = page.extra.webmentions | default(value=global_webmentions_enabled) -%} + {%- set webmentions_enabled = global_webmentions_enabled and page_webmentions_enabled != false or page_webmentions_enabled == true -%} + {%- if webmentions_enabled -%} + {%- include "partials/webmentions.html" -%} + {%- endif -%} + + </article> +</main> + +{%- include "partials/extra_features.html" -%} + +{% endblock main_content %} diff --git a/themes/tabi-lean/templates/partials/analytics.html b/themes/tabi-lean/templates/partials/analytics.html new file mode 100644 index 0000000..6a5d30e --- /dev/null +++ b/themes/tabi-lean/templates/partials/analytics.html @@ -0,0 +1,38 @@ +{% set analytics_service = config.extra.analytics.service %} +{% set analytics_id = config.extra.analytics.id | default(value="") %} +{% set self_hosted_url = config.extra.analytics.self_hosted_url | default(value="") %} + +{% if analytics_service == "goatcounter" %} + {# Prevent non-demo sites from using the demo analytics account #} + {% if self_hosted_url == "https://tabi-stats.osc.garden" and config.base_url == "https://welpo.github.io/tabi" or self_hosted_url != "https://tabi-stats.osc.garden" %} + <script async + {% if self_hosted_url %} + data-goatcounter="{{ self_hosted_url ~ '/count' }}" + src="{{ self_hosted_url ~ '/count.js' }}" + {% else %} + data-goatcounter="https://{{ analytics_id }}.goatcounter.com/count" + src="https://gc.zgo.at/count.js" + {% endif %} + ></script> + {% endif %} + +{% elif analytics_service == "umami" %} + <script async defer + {% if self_hosted_url %} + data-website-id="{{ analytics_id }}" + src="{{ self_hosted_url ~ '/script.js' }}" + {% else %} + data-website-id="{{ analytics_id }}" + src="https://cloud.umami.is/script.js" + {% endif %} + {% if config.extra.analytics.do_not_track %}data-do-not-track="true"{% endif %}> + </script> + + {% elif analytics_service == "plausible" %} + <script + defer + data-domain="{{ analytics_id }}" + src="{% if self_hosted_url %}{{ self_hosted_url ~ '/js/plausible.js' }}{% else %}https://plausible.io/js/script.js{% endif %}" + ></script> + +{% endif %} diff --git a/themes/tabi-lean/templates/partials/cards_pages.html b/themes/tabi-lean/templates/partials/cards_pages.html new file mode 100644 index 0000000..89bdabc --- /dev/null +++ b/themes/tabi-lean/templates/partials/cards_pages.html @@ -0,0 +1,46 @@ +{%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%} +{%- set max_projects = max_projects | default(value=999999) -%} +<div class="cards"> + {%- for page in show_pages %} + {# Used only in main page #} + {% if loop.index > max_projects %} + {% break %} + {% endif %} + {# Determine which URL to use, default is page.permalink #} + {%- set blank_target = macros_target_attribute::target_attribute(new_tab=config.markdown.external_links_target_blank and page.extra.link_to) -%} + + {% set target_url = page.extra.link_to | default(value=page.permalink) %} + + <a rel="{{ rel_attributes }}" + {{ blank_target }} + href="{{ target_url }}" + class="card" + {% if page.taxonomies %} + data-tags="{% for tax_name, terms in page.taxonomies %}{% for term in terms | unique %}{{ term | lower }}{% if not loop.last %},{% endif %}{% endfor %}{% endfor %}" + {% endif %}> + {% if page.extra.local_image %} + {% set meta = get_image_metadata(path=page.extra.local_image, allow_missing=true) %} + <img class="card-image" + alt="{{ page.extra.local_image }}" + src="{{ get_url(path=page.extra.local_image) }}" + {% if meta.width %}width="{{ meta.width }}"{% endif %} + {% if meta.height %}height="{{ meta.height }}"{% endif %}> + {% elif page.extra.remote_image %} + <img class="card-image" + alt="{{ page.extra.remote_image }}" + src="{{ page.extra.remote_image }}"> + {% else %} + <div class="card-image-placeholder"></div> + {% endif %} + + <div class="card-info"> + <h2 class="card-title">{{ page.title | markdown(inline=true) | safe }}</h2> + <div class="card-description"> + {% if page.description %} + {{ page.description | markdown(inline=true) | safe }} + {% endif %} + </div> + </div> + </a> + {% endfor -%} +</div> diff --git a/themes/tabi-lean/templates/partials/comments.html b/themes/tabi-lean/templates/partials/comments.html new file mode 100644 index 0000000..1129055 --- /dev/null +++ b/themes/tabi-lean/templates/partials/comments.html @@ -0,0 +1,95 @@ +{% set automatic_loading = config.extra[comment_system].automatic_loading %} + +<div id="comments" class="comments" + +{% if comment_system == "giscus" %} + data-repo="{{ config.extra.giscus.repo }}" + data-repo-id="{{ config.extra.giscus.repo_id }}" + data-category="{{ config.extra.giscus.category }}" + data-category-id="{{ config.extra.giscus.category_id }}" + {% if config.extra.giscus.mapping == "slug" %} + data-mapping="specific" + data-term="{{ page.slug }}" + {% else %} + data-mapping="{{ config.extra.giscus.mapping }}" + {% endif %} + data-strict="{{ config.extra.giscus.strict_title_matching }}" + data-reactions-enabled="{{ config.extra.giscus.enable_reactions }}" + {% if config.extra.giscus.comment_box_above_comments %} + data-input-position="top" + {% else %} + data-input-position="bottom" + {% endif %} + data-light-theme="{{ config.extra.giscus.light_theme }}" + data-dark-theme="{{ config.extra.giscus.dark_theme }}" + {% if config.extra.giscus.lang %} + data-lang="{{ config.extra.giscus.lang }}" + {% else %} + data-lang="{{ lang }}" + {% endif %} + data-lazy-loading="{{ config.extra.giscus.lazy_loading }}" + > + +{% elif comment_system == "utterances" %} + data-repo="{{ config.extra.utterances.repo }}" + {% if config.extra.utterances.issue_term == "slug" %} + data-issue-term="{{ page.slug }}" + {% else %} + data-issue-term="{{ config.extra.utterances.issue_term }}" + {% endif %} + data-label="{{ config.extra.utterances.label }}" + data-light-theme="{{ config.extra.utterances.light_theme }}" + data-dark-theme="{{ config.extra.utterances.dark_theme }}" + data-lazy-loading="{{ config.extra.utterances.lazy_loading }}" + > + +{% elif comment_system == "hyvortalk" %} + data-website-id="{{ config.extra.hyvortalk.website_id }}" + {% if config.extra.hyvortalk.page_id_is_slug %} + data-page-id="{{ page.slug }}" + {% else %} + data-page-id="{{ current_url }}" + {% endif %} + {% if config.extra.hyvortalk.lang %} + data-page-language="{{ config.extra.hyvortalk.lang }}" + {% else %} + data-page-language="{{ lang }}" + {% endif %} + data-page-author="{{ config.extra.hyvortalk.page_author }}" + {% if config.extra.hyvortalk.lazy_loading %} + data-loading="lazy" + {% else %} + data-loading="default" + {% endif %} + > + +{% elif comment_system == "isso" %} + data-endpoint-url="{{ config.extra.isso.endpoint_url }}" + {% if config.extra.isso.page_id_is_slug %} + {%- set default_lang_url = current_path | replace(from='/' ~ lang ~ '/', to = '/') -%} + data-isso-id="{{ default_lang_url }}" + data-title="{{ default_lang_url }}" + {% endif %} + {% if config.extra.isso.lang %} + data-page-language="{{ config.extra.isso.lang }}" + {% else %} + data-page-language="{{ lang }}" + {% endif %} + data-max-comments-top="{{ config.extra.isso.max_comments_top }}" + data-max-comments-nested="{{ config.extra.isso.max_comments_nested }}" + data-avatar="{{ config.extra.isso.avatar }}" + data-voting="{{ config.extra.isso.voting }}" + data-page-author-hashes="{{ config.extra.isso.page_author_hashes }}" + data-lazy-loading="{{ config.extra.isso.lazy_loading }}" + > +{% endif %} + +{% if automatic_loading %} + <script src="{{ get_url(path='js/' ~ comment_system ~ '.min.js', trailing_slash=false) | safe }}" async></script> +{% else %} + <button id="load-comments" class="load-comments-button" data-script-src="{{ get_url(path='js/' ~ comment_system ~ '.min.js', trailing_slash=false) | safe }}">{{ macros_translate::translate(key="load_comments", default="Load comments", language_strings=language_strings) }}</button> + <script src="{{ get_url(path='js/loadComments.min.js', trailing_slash=false) | safe }}" async></script> +{% endif %} + +<noscript>You need JavaScript to view the comments.</noscript> +</div> diff --git a/themes/tabi-lean/templates/partials/content_security_policy.html b/themes/tabi-lean/templates/partials/content_security_policy.html new file mode 100644 index 0000000..e8fa062 --- /dev/null +++ b/themes/tabi-lean/templates/partials/content_security_policy.html @@ -0,0 +1,119 @@ +<meta http-equiv="Content-Security-Policy" +content="default-src 'self' +{%- if config.extra.allowed_domains -%} +; + {#- Check if a comment system is enabled to allow the necessary domains and directives -#} + {%- set utterances_enabled = config.extra.utterances.enabled_for_all_posts or page.extra.utterances -%} + {%- set giscus_enabled = config.extra.giscus.enabled_for_all_posts or page.extra.giscus -%} + {%- set hyvortalk_enabled = config.extra.hyvortalk.enabled_for_all_posts or page.extra.hyvortalk -%} + {%- set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso -%} + {%- if page -%} + {%- set iine_enabled = macros_settings::evaluate_setting_priority(setting="iine", page=page, default_global_value=false) == "true" -%} + {%- endif -%} + {%- if page -%} + {%- set mermaid_enabled = macros_settings::evaluate_setting_priority(setting="mermaid", page=page, default_global_value=false) == "true" -%} + {%- endif -%} + {%- set serve_local_mermaid = config.extra.serve_local_mermaid | default(value=true) -%} + + {#- Initialise a base script-src directive -#} + {%- set script_src = "script-src 'self'" -%} + + {#- Initialise a base connect-src directive -#} + {%- set connect_src = "connect-src 'self'" -%} + + {# Base logic for appending analytics domains #} + {%- set analytics_url = config.extra.analytics.self_hosted_url | default(value="") %} + {%- if analytics_url -%} + {%- set script_src = script_src ~ " " ~ analytics_url -%} + {%- set connect_src = connect_src ~ " " ~ analytics_url -%} + {%- else -%} + {%- if config.extra.analytics.service -%} + {%- if config.extra.analytics.service == "goatcounter" -%} + {%- set script_src = script_src ~ " gc.zgo.at" -%} + {%- set connect_src = connect_src ~ " " ~ config.extra.analytics.id ~ ".goatcounter.com/count" -%} + {%- elif config.extra.analytics.service == "umami" -%} + {%- set script_src = script_src ~ " cloud.umami.is" -%} + {%- set connect_src = connect_src ~ " *.umami.dev" ~ " cloud.umami.is" -%} + {%- elif config.extra.analytics.service == "plausible" -%} + {%- set script_src = script_src ~ " plausible.io" -%} + {%- set connect_src = connect_src ~ " plausible.io" -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + + {%- if hyvortalk_enabled -%} + {%- set connect_src = connect_src ~ " talk.hyvor.com" -%} + {%- set script_src = script_src ~ " talk.hyvor.com" -%} + {%- elif isso_enabled -%} + {%- set connect_src = connect_src ~ " " ~ config.extra.isso.endpoint_url -%} + {%- set script_src = script_src ~ " " ~ config.extra.isso.endpoint_url -%} + {%- elif giscus_enabled -%} + {%- set script_src = script_src ~ " " ~ " giscus.app" -%} + {%- elif utterances_enabled -%} + {%- set script_src = script_src ~ " " ~ " utteranc.es" -%} + {%- endif -%} + + {%- if (mermaid_enabled and not serve_local_mermaid) or iine_enabled -%} + {%- set script_src = script_src ~ " " ~ " cdn.jsdelivr.net" -%} + {%- endif -%} + + {#- Check if a webmention system is enabled to allow the necessary domains and directives -#} + {%- if config.extra.webmentions.enable -%} + {%- set connect_src = connect_src ~ " webmention.io" -%} + {%- endif -%} + + {#- Check if iine like buttons are enabled to allow the necessary domains -#} + {%- if iine_enabled -%} + {%- set connect_src = connect_src ~ " vhiweeypifbwacashxjz.supabase.co" -%} + {%- endif -%} + + {#- Append WebSocket for Zola serve mode -#} + {%- if config.mode == "serve" -%} + {%- set connect_src = connect_src ~ " ws:" -%} + {%- endif -%} + + {%- for domain in config.extra.allowed_domains -%} + {%- if domain.directive == "connect-src" -%} + {%- set configured_connect_src = domain.domains | join(sep=' ') | safe -%} + {%- set_global connect_src = connect_src ~ " " ~ configured_connect_src -%} + {%- continue -%} + {%- endif -%} + + {%- if domain.directive == "script-src" -%} + {%- set configured_script_src = domain.domains | join(sep=' ') | safe -%} + {%- set_global script_src = script_src ~ " " ~ configured_script_src -%} + {%- continue -%} + {%- endif -%} + + {#- Handle directives that are not connect-src -#} + {{ domain.directive }} {{ domain.domains | join(sep=' ') | safe -}} + + {%- if domain.directive == "style-src" -%} + {%- if utterances_enabled or hyvortalk_enabled or mermaid_enabled %} 'unsafe-inline' + {%- endif -%} + {%- endif -%} + + {%- if domain.directive == "font-src" -%} + {%- if mermaid_enabled %} 'self' + {%- endif -%} + {%- endif -%} + + {%- if domain.directive == "frame-src" -%} + {%- if giscus_enabled %} giscus.app + {%- elif utterances_enabled %} utteranc.es + {%- elif hyvortalk_enabled %} talk.hyvor.com + {%- endif %} + {%- endif -%} + + {%- if not loop.last -%} + ; + {%- endif -%} + {%- endfor -%} + + {#- Insert the generated connect-src -#} + {{ ";" ~ connect_src }} + + {#- Insert the generated script-src -#} + {{ ";" ~ script_src }} + +{%- endif -%}"> diff --git a/themes/tabi-lean/templates/partials/copyright.html b/themes/tabi-lean/templates/partials/copyright.html new file mode 100644 index 0000000..b9cfc01 --- /dev/null +++ b/themes/tabi-lean/templates/partials/copyright.html @@ -0,0 +1,39 @@ +{%- if config.extra.copyright -%} + {% set copyright = config.extra.copyright %} + {# Try to look for a language-specific copyright notice in the new config setup #} + {%- if config.extra.copyright_translations -%} + {%- if lang in config.extra.copyright_translations -%} + {% set copyright = config.extra.copyright_translations[lang] %} + {%- endif -%} + {%- elif config.extra.translate_copyright -%} + {# Old way to translate the copyright through toml files #} + {{ throw(message="ERROR: The 'translate_copyright' feature has been deprecated. Please set 'copyright_translations' in config.toml. See the documentation: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#copyright") }} + {%- endif -%} + + {# Check for missing variables in the notice #} + {% set copyright_placeholders = ["$AUTHOR", "$TITLE"] %} + {% set missing_vars = [] %} + {% for placeholder in copyright_placeholders %} + {% if placeholder in copyright %} + {# Attempt to retrieve the corresponding variable by trimming the $ sign and converting to lowercase #} + {% set var_name = placeholder | replace(from="$", to="") | lower %} + {% if not config[var_name] %} + {# Append the variable name to the list of missing variables #} + {% set_global missing_vars = missing_vars | concat(with=var_name) %} + {% endif %} + {% endif %} + {% endfor %} + + {% if missing_vars | length > 0 %} + {% set missing_vars_str = missing_vars | join(sep=", ") %} + {{ throw(message="ERROR: The following variables are included in `copyright` but have not been set in the config.toml: " ~ missing_vars_str) }} + {% endif %} + + {# At this point, we know that all variables needed defined, so we can safely override the missing ones #} + {% set author = config.author | default(value="") %} + {% set title = config.title | default(value="") %} + + {# Render the copyright notice, replacing the variables #} + {% set current_year = now() | date(format="%Y") %} + <p>{{ copyright | replace(from="$AUTHOR", to=author) | replace(from="$TITLE", to=title) | replace(from="$CURRENT_YEAR", to=current_year) | replace(from="$SEPARATOR", to=separator) | markdown | safe }}</p> +{%- endif -%} diff --git a/themes/tabi-lean/templates/partials/extra_features.html b/themes/tabi-lean/templates/partials/extra_features.html new file mode 100644 index 0000000..50c3337 --- /dev/null +++ b/themes/tabi-lean/templates/partials/extra_features.html @@ -0,0 +1,88 @@ +{%- set page_or_section = page | default(value=section) -%} + +{# prepare parameters for evaluate_setting_priority macro #} +{%- set page_s = page | default(value="") -%} +{%- set section_s = section | default(value="") -%} + +{# Quick navigation buttons #} +{% if macros_settings::evaluate_setting_priority(setting="quick_navigation_buttons", page=page_s, section=section_s, default_global_value=false) == "true" %} + <div id="button-container"> + {# Button to go show a floating Table of Contents #} + {% if page_or_section.toc %} + <div id="toc-floating-container"> + <input type="checkbox" id="toc-toggle" class="toggle"/> + <label for="toc-toggle" class="overlay"></label> + <label for="toc-toggle" id="toc-button" class="button" title="{{ macros_translate::translate(key="toggle_toc", default="Toggle Table of Contents", language_strings=language_strings) }}"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M414.82-193.094q-18.044 0-30.497-12.32-12.453-12.319-12.453-30.036t12.453-30.086q12.453-12.37 30.497-12.37h392.767q17.237 0 29.927 12.487 12.69 12.486 12.69 30.203 0 17.716-12.69 29.919t-29.927 12.203H414.82Zm0-244.833q-18.044 0-30.497-12.487Q371.87-462.9 371.87-480.45t12.453-29.92q12.453-12.369 30.497-12.369h392.767q17.237 0 29.927 12.511 12.69 12.512 12.69 29.845 0 17.716-12.69 30.086-12.69 12.37-29.927 12.37H414.82Zm0-245.167q-18.044 0-30.497-12.32t-12.453-30.037q0-17.716 12.453-30.086 12.453-12.369 30.497-12.369h392.767q17.237 0 29.927 12.486 12.69 12.487 12.69 30.203 0 17.717-12.69 29.92-12.69 12.203-29.927 12.203H414.82ZM189.379-156.681q-32.652 0-55.878-22.829t-23.226-55.731q0-32.549 23.15-55.647 23.151-23.097 55.95-23.097 32.799 0 55.313 23.484 22.515 23.484 22.515 56.246 0 32.212-22.861 54.893-22.861 22.681-54.963 22.681Zm0-245.167q-32.652 0-55.878-23.134-23.226-23.135-23.226-55.623 0-32.487 23.467-55.517t56.12-23.03q32.102 0 54.721 23.288 22.62 23.288 22.62 55.775 0 32.488-22.861 55.364-22.861 22.877-54.963 22.877Zm-.82-244.833q-32.224 0-55.254-23.288-23.03-23.289-23.03-55.623 0-32.333 23.271-55.364 23.272-23.03 55.495-23.03 32.224 0 55.193 23.288 22.969 23.289 22.969 55.622 0 32.334-23.21 55.364-23.21 23.031-55.434 23.031Z"/></svg> + </label> + <div class="toc-content"> + {{ macros_toc::toc(page=page_or_section, header=false, language_strings=language_strings) }} + </div> + </div> + {% endif %} + + {# Button to go to the comment/webmentions section #} + {% if comment_system or config.extra.webmentions.enable %} + {%- if comment_system -%} + {#- Comments are shown above webmentions -#} + {%- set comments_id = "comments" -%} + {%- else -%} + {%- set comments_id = "webmentions" -%} + {%- endif -%} + + <a href="#{{- comments_id -}}" id="comments-button" class="no-hover-padding" title="{{ macros_translate::translate(key="go_to_comments", default="Go to comments section", language_strings=language_strings) }}"> + <svg viewBox="0 0 20 20" fill="currentColor"><path d="M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z" clip-rule="evenodd" fill-rule="evenodd"/></svg> + </a> + {% endif %} + + {# Button to go to the top of the page #} + <a href="#" id="top-button" class="no-hover-padding" title="{{ macros_translate::translate(key="go_to_top", default="Go to the top of the page", language_strings=language_strings) }}"> + <svg viewBox="0 0 20 20" fill="currentColor"><path d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z"/></svg> + </a> + </div> +{% endif %} + +{# Add KaTeX functionality #} +{%- if macros_settings::evaluate_setting_priority(setting="katex", page=page_s, section=section_s, default_global_value=false) == "true" -%} + <link rel="stylesheet" href="{{ get_url(path='katex.min.css', trailing_slash=false) | safe }}"> + <script defer src="{{ get_url(path='js/katex.min.js', trailing_slash=false) | safe }}"></script> +{%- endif -%} + +{# Load mermaid.js #} +{%- if macros_settings::evaluate_setting_priority(setting="mermaid", page=page_s, section=section_s, default_global_value=false) == "true" -%} + {%- if config.extra.serve_local_mermaid | default(value=true) -%} + <script defer src="{{ get_url(path='js/mermaid.min.js', trailing_slash=false) | safe }}"></script> + {%- else -%} + <script defer src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script> + {%- endif -%} +{%- endif -%} + +{# Add copy button to code blocks #} +{%- if macros_settings::evaluate_setting_priority(setting="copy_button", page=page_s, section=section_s, default_global_value=true) == "true" -%} + {#- Add hidden HTML elements with the translated strings for the button's interactions -#} + <span id="copy-success" class="hidden"> + {{ macros_translate::translate(key="copied", default="Copied!", language_strings=language_strings) }} + </span> + <span id="copy-init" class="hidden"> + {{ macros_translate::translate(key="copy_code_to_clipboard", default="Copy code to clipboard", language_strings=language_strings) }} + </span> + <script defer src="{{ get_url(path='js/copyCodeToClipboard.min.js', trailing_slash=false) | safe }}"></script> +{%- endif -%} + +{# JavaScript to make code block names clickable when they are URLs: https://welpo.github.io/tabi/blog/shortcodes/#show-source-or-path #} +{# Note: "add_src_to_code_block" is deprecated in favor of "code_block_name_links". It will be removed in a future release. #} +{# See https://github.com/welpo/tabi/pull/489 #} +{%- if macros_settings::evaluate_setting_priority(setting="code_block_name_links", page=page_s, section=section_s, default_global_value=false) == "true" + or macros_settings::evaluate_setting_priority(setting="add_src_to_code_block", page=page_s, section=section_s, default_global_value=false) == "true" -%} + <script defer src="{{ get_url(path='js/codeBlockNameLinks.min.js', trailing_slash=false) | safe }}"></script> +{%- endif -%} + +{# Add backlinks to footnotes #} +{%- if macros_settings::evaluate_setting_priority(setting="footnote_backlinks", page=page_s, section=section_s, default_global_value=false) == "true" -%} + <script defer src="{{ get_url(path='js/footnoteBacklinks.min.js', trailing_slash=false | safe )}}"></script> +{%- endif -%} + +{# Add iine.js for the like button #} +{%- if macros_settings::evaluate_setting_priority(setting="iine", page=page_s, section=section_s, default_global_value=false) == "true" -%} + <script defer src="https://cdn.jsdelivr.net/gh/welpo/iine@main/iine.mini.js"></script> +{%- endif -%} diff --git a/themes/tabi-lean/templates/partials/filter_card_tags.html b/themes/tabi-lean/templates/partials/filter_card_tags.html new file mode 100644 index 0000000..d40ec2d --- /dev/null +++ b/themes/tabi-lean/templates/partials/filter_card_tags.html @@ -0,0 +1,35 @@ +{#- Collect all terms. -#} +{#- We don't use `get_taxonomy` so users aren't forced to use 'tags' -#} +{% set all_terms = [] %} +{% for page in show_pages %} + {% if page.taxonomies %} + {% for tax_name, terms in page.taxonomies %} + {% for term in terms %} + {% set_global all_terms = all_terms | concat(with=term) %} + {% endfor %} + {% endfor %} + {% endif %} +{% endfor %} + +{#- Display unique terms -#} +{% set unique_terms = all_terms | unique | sort %} +{%- if unique_terms | length >= 2 -%} + <ul class="filter-controls" role="group" aria-label="{{ macros_translate::translate(key='project_filters', default='Project filters', language_strings=language_strings) }}"> + <li class="taxonomy-item no-hover-padding"> + <a id="all-projects-filter" class="no-hover-padding active" + href="{{ get_url(path="projects", lang=lang) }}" + data-filter="all"> + {{- macros_translate::translate(key="all_projects", default="All projects", language_strings=language_strings) -}} + </a> + </li> + {% for term in unique_terms %} + <li class="taxonomy-item no-hover-padding"> + <a class="no-hover-padding" + href="{{ get_taxonomy_url(kind="tags", name=term, lang=lang) }}" + data-filter="{{ term | lower }}">{{ term }}</a> + </li> + {% endfor %} + </ul> + {#- Load the script -#} + <script src="{{ get_url(path='js/filterCards.min.js', trailing_slash=false, cachebust=true) | safe }}" defer></script> +{% endif %} diff --git a/themes/tabi-lean/templates/partials/footer.html b/themes/tabi-lean/templates/partials/footer.html new file mode 100644 index 0000000..db4bd85 --- /dev/null +++ b/themes/tabi-lean/templates/partials/footer.html @@ -0,0 +1,127 @@ +{%- set separator = config.extra.separator | default(value="•") -%} + +{%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%} + +{%- set blank_target = macros_target_attribute::target_attribute(new_tab=config.markdown.external_links_target_blank) -%} + +{#- Feed icon -#} +{%- set feed_url = feed_utils::get_feed_url() -%} +{%- set should_show_feed = feed_utils::should_show_footer_feed_icon() == "true" -%} + +{%- set should_show_footer_icons = should_show_feed or config.extra.socials or config.extra.email -%} + +<footer> + <section> + <nav class="socials nav-navs"> + {%- if should_show_footer_icons -%} + <ul> + {%- if should_show_feed -%} + <li> + <a class="nav-links no-hover-padding social" rel="{{ rel_attributes }}" {{ blank_target }} href="{{ get_url(path=feed_url, lang=lang, trailing_slash=false) | safe }}"> + <img loading="lazy" alt="feed" title="feed" src="{{ get_url(path='/social_icons/rss.svg') }}"> + </a> + </li> + {%- endif -%} + + {# Mail icon #} + {%- if config.extra.email -%} + {%- set email_already_encoded = (config.extra.email is not containing("@")) -%} + {%- set email_needs_decoding = email_already_encoded or config.extra.encode_plaintext_email -%} + + {%- if email_already_encoded -%} + {%- set encoded_email = config.extra.email -%} + {# Verify the pre-encoded e-mail is valid (i.e. contains an '@') #} + {%- set decoded_email = encoded_email | base64_decode -%} + {%- if '@' not in decoded_email -%} + {{ throw(message="ERROR: The provided e-mail appears to be base64-encoded, but does not decode to a valid e-mail address.")}} + {%- endif -%} + {%- elif config.extra.encode_plaintext_email -%} + {%- set encoded_email = config.extra.email | base64_encode -%} + {%- endif -%} + + <li class="{% if email_needs_decoding %}js{% endif %}"> + {%- if email_needs_decoding -%} + <a class="nav-links no-hover-padding social" href="#" data-encoded-email="{{ encoded_email | safe }}"> + {%- else -%} + <a class="nav-links no-hover-padding social" href="mailto:{{ config.extra.email | safe }}"> + {%- endif -%} + <img loading="lazy" alt="email" title="email" src="{{ get_url(path='social_icons/email.svg') }}"> + </a> + </li> + {%- endif -%} + + {%- if config.extra.socials %} + {% for social in config.extra.socials %} + <li> + <a class="nav-links no-hover-padding social" rel="{{ rel_attributes }} me" {{ blank_target }} href="{{ social.url | safe }}"> + <img loading="lazy" alt="{{ social.name }}" title="{{ social.name }}" src="{{ get_url(path='social_icons/' ~ social.icon ~ '.svg') }}"> + </a> + </li> + {% endfor %} + {% endif %} + </ul> + {% endif %} + </nav> + + {# Footer menu #} + <nav class="nav-navs"> + {%- if config.extra.footer_menu %} + <small> + <ul> + {% for menu in config.extra.footer_menu %} + <li> + {%- set trailing_slash = menu.trailing_slash | default(value=true) -%} + + {%- if menu.url == "sitemap.xml" -%} + {%- set url = get_url(path=menu.url, trailing_slash=trailing_slash) -%} + {%- elif menu.url is starting_with("http") -%} + {%- if menu.trailing_slash -%} + {%- set url = menu.url ~ "/" -%} + {%- else -%} + {%- set url = menu.url -%} + {%- endif -%} + {%- else -%} + {%- set url = get_url(path=menu.url, lang=lang, trailing_slash=trailing_slash) -%} + {%- endif -%} + + <a class="nav-links no-hover-padding" href="{{ url }}"> + {{ macros_translate::translate(key=menu.name, default=menu.name, language_strings=language_strings) }} + </a> + </li> + {% endfor %} + </ul> + </small> + {% endif %} + </nav> + + <div class="credits"> + <small> + {% include "partials/copyright.html" %} + + {# Shows "Powered by Zola & tabi" notice #} + {{ macros_translate::translate(key="powered_by", default="Powered by", language_strings=language_strings) }} + <a rel="{{ rel_attributes }}" {{ blank_target }} href="https://www.getzola.org">Zola</a> + {{ macros_translate::translate(key="and", default="&", language_strings=language_strings) }} + <a rel="{{ rel_attributes }}" {{ blank_target }} href="https://github.com/welpo/tabi">tabi</a> + + {# Shows link to remote repository #} + {%- if config.extra.remote_repository_url and config.extra.show_remote_source | default(value=true) -%} + {{ separator }} + <a rel="{{ rel_attributes }}" {{ blank_target }} href="{{ config.extra.remote_repository_url }}"> + {{ macros_translate::translate(key="site_source", default="Site source", language_strings=language_strings) }} + </a> + {%- endif -%} + </small> + </div> + </section> + + {# Load the decoding script if email is encoded #} + {%- if email_needs_decoding -%} + <script src="{{ get_url(path='js/decodeMail.min.js') }}" async></script> + {%- endif -%} + + {# Modal structure for search #} + {%- if config.build_search_index -%} + {% include "partials/search_modal.html" %} + {%- endif -%} +</footer> diff --git a/themes/tabi-lean/templates/partials/hcard.html b/themes/tabi-lean/templates/partials/hcard.html new file mode 100644 index 0000000..6479da6 --- /dev/null +++ b/themes/tabi-lean/templates/partials/hcard.html @@ -0,0 +1,75 @@ +{%- set hcard = config.extra.hcard -%} + +{% set full_name = config.author %} +{% if hcard.full_name %} + {% set full_name = hcard.full_name %} +{% endif %} + +{%- set homepage = config.base_url -%} +{% if hcard.homepage %} + {%- set homepage = hcard.homepage -%} +{% endif %} + +{% if hcard.enable %} +<div class="h-card hidden"> + <div> + {%- if hcard.avatar -%} + <img + class="u-photo" + src="{{ get_url(path=hcard.avatar, cachebust=true) }}" + width="200" + height="200" + alt="{{ full_name }}" + /> + {%- endif -%} + + <span class="p-name" rel="me">{{ full_name }}</span> + + {% if hcard.p_nickname %} + ( <span class="p-nickname">{{ hcard.p_nickname }}</span> ) + {% endif %} + </div> + + {% if hcard.biography %} + <p class="p-note">{{ hcard.biography }}</p> + {% endif %} + + {# links #} + <div> + {%- if hcard.with_mail and config.extra.email and not config.extra.encode_plaintext_email -%} + <span> + <a class="u-email" href="mailto:{{ config.extra.email | safe }}">email</a> + </span> - + {%- endif -%} + + <span> + <a class="u-url u-id" href="{{ homepage }}">homepage</a> + </span> - + + {%- if hcard.with_social_links and config.extra.socials %} + {% for social in config.extra.socials %} + <span> + <a class="p-url" rel="me" href="{{ social.url | safe }}">{{ social.name }}</a> + </span> - + {% endfor %} + {% endif %} + </div> + + {# additional properties #} + {% set dl_started = false %} + {% for key, value in hcard %} + {% if key not in ['enable', 'with_mail', 'with_social_links', 'homepage', 'full_name', 'avatar', 'biography', 'p_nickname'] %} + {% if not dl_started %} + <dl> + {% set_global dl_started = true %} + {% endif %} + <dt>{{ key | replace(from="p_", to="") | replace(from="u_", to="") | replace(from="dt_", to="") | replace(from="_", to=" ") | capitalize }}</dt> + <dd class="{{ key | replace(from="_", to="-") }}">{{ value }}</dd> + {% endif %} + {% endfor %} + {% if dl_started %} + </dl> + {% endif %} + + </div> +{% endif %} diff --git a/themes/tabi-lean/templates/partials/hcard_small.html b/themes/tabi-lean/templates/partials/hcard_small.html new file mode 100644 index 0000000..f30add5 --- /dev/null +++ b/themes/tabi-lean/templates/partials/hcard_small.html @@ -0,0 +1,26 @@ +{%- set hcard = config.extra.hcard -%} + +{%- set full_name = config.author -%} +{%- if hcard.full_name -%} + {%- set full_name = hcard.full_name -%} +{%- endif -%} + +{%- set homepage = config.base_url -%} +{%- if hcard.homepage -%} + {%- set homepage = hcard.homepage -%} +{%- endif -%} + +{%- set icon_attr = "" -%} +{%- if hcard.avatar -%} + {%- set icon_attr = "author-icon" -%} +{%- endif -%} + +<span class="hidden p-author h-card"> +<a rel="author" href="{{ homepage }}" class="u-url {{ icon_attr }}" title="{{ full_name }}"> + {%- if hcard.avatar -%} + <img class="u-photo" src="{{ get_url(path=hcard.avatar, cachebust=true) }}" alt="{{ full_name }}" /> + {%- else -%} + {{ full_name }} + {%- endif -%} +</a> +</span> diff --git a/themes/tabi-lean/templates/partials/header.html b/themes/tabi-lean/templates/partials/header.html new file mode 100644 index 0000000..ada1f23 --- /dev/null +++ b/themes/tabi-lean/templates/partials/header.html @@ -0,0 +1,182 @@ +<head> + <meta charset="UTF-8"> + + {%- if macros_settings::evaluate_setting_priority(setting="enable_csp", page=page | default(value=""), section=section | default(value=""), default_global_value="true") == "true" -%} + {%- include "partials/content_security_policy.html" -%} + {%- endif -%} + + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="base" content="{{ config.base_url | safe }}"> + + {# Site title #} + <title>{%- include "partials/title.html" -%}</title> + + {# Favicon #} + {% if config.extra.favicon %} + <link rel="icon" type="image/png" href="{{ get_url(path=config.extra.favicon) }}"/> + {% endif %} + {% if config.extra.favicon_emoji %} + <link rel=icon href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50%" x="50%" dominant-baseline="central" text-anchor="middle" font-size="88">{{ config.extra.favicon_emoji }}</text></svg>'> + {% endif %} + + {# Feeds #} + {% if config.generate_feeds | default(value=config.generate_feed) %} + {% if config.feed_filenames %} + {# Zola 0.19 and newer #} + {% for feed in config.feed_filenames %} + {% if feed == "atom.xml" %} + <link rel="alternate" type="application/atom+xml" title="{{ config.title | safe }} - Atom Feed" href="{{ get_url(path=feed, trailing_slash=false) | safe }}"> + {% elif feed == "rss.xml" %} + <link rel="alternate" type="application/rss+xml" title="{{ config.title | safe }} - RSS Feed" href="{{ get_url(path=feed, trailing_slash=false) | safe }}"> + {% else %} + <link rel="alternate" href="{{ get_url(path=feed, trailing_slash=false) | safe }}"> + {% endif %} + {% endfor %} + {% else %} + {# Older Zola versions #} + {% set feed_url = config.feed_filename | default(value="atom.xml") %} + <link rel="alternate" type="application/atom+xml" title="{{ config.title | safe }}" href="{{ get_url(path=feed_url, trailing_slash=false) | safe }}"> + {% endif %} + {% endif %} + + {# CSS #} + {# Load subset of glyphs for header. Avoids flashing issue in Firefox #} + {% if config.extra.enable_subset %} + {% if config.extra.custom_subset == true %} + <link rel="stylesheet" href="{{ get_url(path="custom_subset.css" , cachebust=true) }}"> + {% elif lang == 'en' %} + <link rel="stylesheet" href="{{ get_url(path="inter_subset_en.css", cachebust=true ) }}"> + {% elif lang == 'es' %} + <link rel="stylesheet" href="{{ get_url(path="inter_subset_es.css", cachebust=true ) }}"> + {% endif %} + {% endif %} + + {# Define array of CSS files to load. main.css is always loaded. #} + {%- set stylesheets = [ "main.css" ] -%} + + {# Load extra CSS files from config.toml #} + {%- if config.extra.stylesheets -%} + {%- set stylesheets = stylesheets | concat(with=config.extra.stylesheets) -%} + {%- endif -%} + + {# Load extra CSS files from page metadata #} + {%- if page.extra.stylesheets -%} + {%- set stylesheets = stylesheets | concat(with=page.extra.stylesheets) -%} + {%- endif -%} + + {# Load extra CSS for custom skin #} + {%- if config.extra.skin -%} + {%- set stylesheets = stylesheets | concat(with='skins/' ~ config.extra.skin ~ '.css') -%} + {%- endif -%} + + {# Load all stylesheets #} + {%- for stylesheet in stylesheets %} + <link rel="stylesheet" href="{{ get_url(path=stylesheet, cachebust=true) | safe }}" /> + {%- endfor %} + + <meta name="color-scheme" content="{%- if config.extra.theme_switcher -%}light dark{%- elif config.extra.default_theme -%}{{config.extra.default_theme}}{%- else -%}light{%- endif -%}" /> + + {%- if config.extra.browser_theme_color and config.extra.browser_theme_color is iterable -%} + {# Handle array values: theme_color[0] for light mode, theme_color[1] for dark mode #} + <meta name="theme-color" media="(prefers-color-scheme: light)" content="{{ config.extra.browser_theme_color[0] }}" /> + <meta name="theme-color" media="(prefers-color-scheme: dark)" content="{{ config.extra.browser_theme_color[1] }}" /> + {%- elif config.extra.browser_theme_color -%} + {# Handle single value #} + <meta name="theme-color" content="{{ config.extra.browser_theme_color }}" /> + {%- endif -%} + + {%- if page.description %} + <meta name="description" content="{{ page.description }}" /> + <meta property="og:description" content="{{ page.description }}" /> + {%- elif section.description %} + <meta name="description" content="{{ section.description }}" /> + <meta property="og:description" content="{{ section.description }}" /> + {%- elif page.summary %} + <meta name="description" content="{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}…" /> + <meta property="og:description" content="{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}…" /> + {%- else %} + <meta name="description" content="{{ config.description }}" /> + <meta property="og:description" content="{{ config.description }}" /> + {%- endif %} + + {% if is_404 %} + <meta name="robots" content="noindex, follow" /> + {% endif %} + + <meta property="og:title" content="{{ page.title | default(value=config.title) | safe }}" /> + <meta property="og:type" content="article" /> + + {# Image for social media sharing #} + {%- include "partials/social_media_images.html" -%} + + {# Add og:locale and hreflang tags for multilingual sites #} + {%- if config.languages | length > 0 and current_url %} + {%- include "partials/multilingual_tags.html" -%} + {%- else -%} + <meta property="og:locale" content="{{ macros_translate::translate(key="date_locale", default="en_GB", language_strings=language_strings) }}" /> + {%- endif %} + + {# Set canonical URL #} + {%- if current_url -%} + {%- if page.extra.canonical_url or section.extra.canonical_url -%} + {%- set canonical_url = page.extra.canonical_url | default(value=section.extra.canonical_url) -%} + {%- elif config.extra.base_canonical_url -%} + {%- set canonical_url = current_url | replace(from=config.base_url, to=config.extra.base_canonical_url) -%} + {%- endif -%} + {%- endif -%} + + {# Add canonical URL, if set #} + {%- if canonical_url -%} + <link rel="canonical" href="{{ canonical_url }}" /> + <meta property="og:url" content="{{ canonical_url }}" /> + {%- elif current_url -%} + <meta property="og:url" content="{{ current_url }}" /> + {%- endif -%} + + <meta property="og:site_name" content="{{ config.title }}"> + + {%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%} + {# If JavaScript is disabled, hide the button. #} + <noscript><link rel="stylesheet" href="{{ get_url(path='no_js.css') | safe }}"/></noscript> + <script type="text/javascript" src="{{ get_url(path='js/initializeTheme.min.js') | safe }}"></script> + <script defer src="{{ get_url(path='js/themeSwitcher.min.js', trailing_slash=false) | safe }}"></script> + {%- endif -%} + + {%- if config.extra.analytics.service -%} + {%- include "partials/analytics.html" -%} + {%- endif -%} + + {# Socials #} + {%- if config.extra.fediverse_creator -%} + <meta name="fediverse:creator" content="@{{ config.extra.fediverse_creator["handle"] }}@{{ config.extra.fediverse_creator["domain"]}}" /> + {%- endif -%} + + {# Search #} + {%- if config.build_search_index -%} + {%- if config.search.index_format -%} + {%- set search_index_format = config.search.index_format -%} + {%- elif config.extra.index_format -%} + {# Necessary to support Zola 0.17.X, as it doesn't have access to config.search.index_format #} + {# See: https://github.com/getzola/zola/issues/2165 #} + {%- set search_index_format = config.extra.index_format -%} + {%- else -%} + {%- set search_index_format = "elasticlunr_json" -%} + {%- endif -%} + + {%- if search_index_format == "elasticlunr_javascript" -%} + <script defer src="{{ get_url(path='search_index.' ~ lang ~ '.js', cachebust=true) | safe }}"></script> + {%- endif -%} + + {# Main search script #} + <script defer src="{{ get_url(path='js/searchElasticlunr.min.js', cachebust=true) | safe }}"></script> + + {# Support correct stemming and stop word filtering in non-English search #} + {%- if lang != "en" -%} + <script defer src="{{ get_url(path='js/lunr/lunrStemmerSupport.min.js') | safe }}"></script> + <script defer src="{{ get_url(path='js/lunr/lunr.' ~ lang ~ '.min.js') | safe }}"></script> + {%- endif -%} + {%- endif -%} + + {# Users can optionally provide this template to add content to the head element. #} + {% include "tabi/extend_head.html" ignore missing %} +</head> diff --git a/themes/tabi-lean/templates/partials/history_url.html b/themes/tabi-lean/templates/partials/history_url.html new file mode 100644 index 0000000..8327ca3 --- /dev/null +++ b/themes/tabi-lean/templates/partials/history_url.html @@ -0,0 +1,26 @@ +{%- set relative_path = page.relative_path -%} +{%- set repository_url = config.extra.remote_repository_url | trim_end_matches(pat='/') -%} +{%- set branch = config.extra.remote_repository_branch | default(value="main") -%} +{%- set git_platform = config.extra.remote_repository_git_platform | default(value="auto") -%} + +{# Auto-detect the git platform based on the URL#} +{%- if git_platform == "auto" %} + {%- if repository_url is containing("github.") -%} + {%- set git_platform = "github" -%} + {%- elif repository_url is containing("gitlab.") -%} + {%- set git_platform = "gitlab" -%} + {%- elif repository_url is matching("(gitea\.|codeberg\.)") -%} + {%- set git_platform = "gitea" -%} + {%- endif -%} +{%- endif -%} + +{# Generate the commit history URL based on the git platform #} +{%- if git_platform == "github" -%} + {{ repository_url ~ '/commits/' ~ branch ~ '/content/' }}{{ relative_path | urlencode }} +{%- elif git_platform == "gitlab" -%} + {{ repository_url ~ '/-/commits/' ~ branch ~ '/content/' }}{{ relative_path | urlencode }} +{%- elif git_platform in ["gitea", "codeberg"] -%} + {{ repository_url ~ '/commits/branch/' ~ branch ~ '/content/' }}{{ relative_path | urlencode }} +{%- else -%} + {{ throw(message="ERROR: Unknown, unsupported, or unspecified git platform. If you're using a custom domain, please specify the 'git_platform' in the config. If you think this is a bug, please report it: https://github.com/welpo/tabi/issues/new?assignees=&labels=bug&template=bug_report.md&title=Unsupported%20Git%20Platform%20Detected") }} +{%- endif -%} diff --git a/themes/tabi-lean/templates/partials/home_banner.html b/themes/tabi-lean/templates/partials/home_banner.html new file mode 100644 index 0000000..353757b --- /dev/null +++ b/themes/tabi-lean/templates/partials/home_banner.html @@ -0,0 +1,20 @@ +{%- set header = section.extra.header-%} +<div id="banner-container-home"> + <div id="home-banner-text"> + <h1 id="home-banner-header">{{ header.title }}</h1> + <section id="banner-home-subtitle"> + {{ section.content | safe }} + </section> + </div> + {%- if header.img -%} + {%- if header.img is containing("$BASE_URL") -%} + {# Conversion no longer supported in favour of proper path. #} + {{ throw(message="ERROR: The image path for the header should not contain '$BASE_URL'. Please remove it and use the proper image path.") }} + {%- else -%} + {%- set image_path = get_url(path=header.img, trailing_slash=false) | safe -%} + {%- endif -%} + <div id="image-container-home"> + <img alt="{{ header.img_alt | default(value="the owner") }}" id="banner-home-img" src="{{ image_path }}" /> + </div> + {%- endif -%} +</div> diff --git a/themes/tabi-lean/templates/partials/iine_button.html b/themes/tabi-lean/templates/partials/iine_button.html new file mode 100644 index 0000000..508fd3a --- /dev/null +++ b/themes/tabi-lean/templates/partials/iine_button.html @@ -0,0 +1,33 @@ +{% import "macros/settings.html" as macros_settings %} +{%- set button_icon = button_icon | default(value=macros_settings::evaluate_setting_priority(setting="iine_icon", page=page | default(value=""), section=section | default(value=""), default_global_value="heart")) -%} +{%- if config.extra.iine_unified_languages and lang != config.default_language -%} + {%- set unified_slug = page.path | replace(from='/' ~ lang ~ '/', to='/') -%} + {%- set slug = slug | default(value=unified_slug) -%} +{%- else -%} + {%- set slug = slug | default(value=page.path) -%} +{%- endif -%} +{%- if label -%} + {%- set final_label = label -%} +{%- elif language_strings -%} + {%- set final_label = macros_translate::translate(key="like_this_post", default="Like this post", language_strings=language_strings) -%} +{%- else -%} + {%- set final_label = "Like this post" -%} +{%- endif -%} + +{%- if button_icon == "heart" -%} + {%- set icon_display = "♥️" -%} +{%- elif button_icon == "thumbs_up" -%} + {%- set icon_display = "👍" -%} +{%- elif button_icon == "upvote" -%} + {%- set icon_display = "⬆️" -%} +{%- else -%} + {%- set icon_display = button_icon -%} +{%- endif -%} + +<form method="post" action="https://vhiweeypifbwacashxjz.supabase.co/rest/v1/rpc/increment_hits?apikey=sb_publishable_EoB7MFJhCmb6PiAk-GPJ4w_PGhQ44Ru" class="iine-form"> + <input type="hidden" name="page_slug" value="{%- if slug -%}{{ slug }}{%- else -%}{{ current_url | default(value=page.path) }}{%- endif -%}"> + <button class="iine-button" type="submit" + {%- if slug %} data-slug="{{ slug }}"{% endif %} + {%- if button_icon %} data-icon="{{ button_icon }}"{% endif %} + aria-label="{{ final_label }}" title="{{ final_label }}">{{ icon_display }}</button> +</form> diff --git a/themes/tabi-lean/templates/partials/language_switcher.html b/themes/tabi-lean/templates/partials/language_switcher.html new file mode 100644 index 0000000..83cf61f --- /dev/null +++ b/themes/tabi-lean/templates/partials/language_switcher.html @@ -0,0 +1,38 @@ +<li class="language-switcher"> + <details class="dropdown"> + <summary role="button" aria-haspopup="true" title="{{ macros_translate::translate(key="language_selection", default="Language selection", language_strings=language_strings) }}" aria-label="{{ macros_translate::translate(key="language_selection", default="Language selection", language_strings=language_strings) }}"> + <div class="language-switcher-icon"></div> + </summary> + <div class="dropdown-content" role="menu"> + {#- Display the current language first in the dropdown -#} + {{ macros_translate::translate(key="language_name", default=lang, language_strings=language_strings) }} + {#- Loop through all the available languages in the config -#} + {%- for lcode, ldetails in config.languages -%} + {#- Skip the current language to avoid linking to the current page -#} + {%- if lang == lcode -%} + {%- continue -%} + {%- endif -%} + {#- Dynamically load the language strings for each language -#} + {%- set other_language_strings = load_data(path="i18n/" ~ lcode ~ ".toml", required=false) -%} + {%- if not other_language_strings -%} + {%- set other_language_strings = load_data(path="themes/tabi/i18n/" ~ lcode ~ ".toml", required=false) -%} + {%- endif -%} + {#- Use the loaded language strings to get the language name -#} + {% set language_name = macros_translate::translate(key="language_name", default=lcode, + language_strings=other_language_strings) %} + {#- Check if the language code matches the default language -#} + {%- if lcode == config.default_language -%} + {#- If it does, link to the root path (no language code in URL) -#} + <a role="menuitem" lang="{{ lcode }}" aria-label="{{ language_name }}" href="{{ current_url | replace(from='/' ~ lang ~ '/', to = '/') }}">{{ language_name }}</a> + {#- Check if the current language is the default language -#} + {#- If it is, append the language code to the base URL -#} + {%- elif lang == config.default_language -%} + <a role="menuitem" lang="{{ lcode }}" aria-label="{{ language_name }}" href="{{ config.base_url }}/{{ lcode }}{{ current_path | default(value="/") | safe }}">{{ language_name }}</a> + {%- else -%} + {#- If it's not, replace the current language code in the URL with the new one -#} + <a role="menuitem" lang="{{ lcode }}" aria-label="{{ language_name }}" href="{{ current_url | replace(from='/' ~ lang ~ '/', to='/' ~ lcode ~ '/') }}">{{ language_name }}</a> + {%- endif -%} + {%- endfor -%} + </div> + </details> +</li> diff --git a/themes/tabi-lean/templates/partials/main_page_posts_list.html b/themes/tabi-lean/templates/partials/main_page_posts_list.html new file mode 100644 index 0000000..067e178 --- /dev/null +++ b/themes/tabi-lean/templates/partials/main_page_posts_list.html @@ -0,0 +1,61 @@ +{%- if paginator or extra_section -%} + <div id="posts-list"> + <div> + {{ macros_page_header::page_header(title=section.title) }} + </div> + + {# Check if both paginate_by and section_path are set #} + {%- set both_settings_set = paginator and extra_section -%} + {%- set paginator_has_no_pages = paginator and paginator.pages | length == 0 -%} + {%- set extra_section_has_pages = extra_section and extra_section.pages | length > 0 -%} + + {# Display warning if both settings are set #} + {%- if both_settings_set and paginator_has_no_pages and extra_section_has_pages -%} + <div class="admonition warning"> + <div class="admonition-icon admonition-icon-warning"></div> + <div class="admonition-content"> + <strong class="admonition-title">WARNING: Conflicting Configuration</strong> + <p> + No posts are displayed due to conflicting settings in your <code>_index.md</code>: + </p> + <ul> + <li><code>paginate_by</code> is set, but there are no posts to paginate in the current section.</li> + <li><code>section_path</code> is set, and posts are available in that section.</li> + </ul> + <p> + <strong>Solution:</strong> Remove <code>paginate_by</code> from your <code>_index.md</code>. + To limit the number of displayed posts, use <code>max_posts</code> in the <code>[extra]</code> section instead. + </p> + </div> + </div> + {%- endif -%} + + {# Get all posts for pinning if we're in root section with pagination #} + {%- if paginator and is_root_section -%} + {%- set root_section = get_section(path="_index.md") -%} + {%- set all_posts = root_section.pages -%} + {%- set pages = paginator.pages -%} + {%- elif paginator -%} + {%- set all_posts = paginator.pages -%} + {%- set pages = paginator.pages -%} + {%- else -%} + {%- set all_posts = extra_section.pages -%} + {%- set pages = extra_section.pages -%} + {%- endif -%} + + {% set max_posts = section.extra.max_posts | default(value=999999) %} + {{ macros_list_posts::list_posts( + posts=pages, + all_posts=all_posts, + max=max_posts, + language_strings=language_strings, + section_path=extra_section.path | default(value="blog"), + pinned_first=is_root_section, + current_page=paginator.current_index | default(value=1) + ) }} + </div> + + {% if paginator and paginator.pages | length > 0 %} + {%- include "partials/paginate.html" -%} + {% endif %} +{%- endif -%} diff --git a/themes/tabi-lean/templates/partials/main_page_projects_list.html b/themes/tabi-lean/templates/partials/main_page_projects_list.html new file mode 100644 index 0000000..82f0637 --- /dev/null +++ b/themes/tabi-lean/templates/partials/main_page_projects_list.html @@ -0,0 +1,16 @@ +{% if section.extra.projects_path %} + {%- set projects_section = get_section(path=section.extra.projects_path) -%} + {%- if projects_section -%} + <div id="featured-projects" class="list"> + {{ macros_page_header::page_header(title=macros_translate::translate(key="featured_projects", default="Featured projects", language_strings=language_strings)) }} + </div> + {%- set show_pages = projects_section.pages -%} + {%- set max_projects = section.extra.max_projects | default(value=3) -%} + {%- include "partials/cards_pages.html" -%} + {%- endif -%} + {%- if show_pages | length > max_projects -%} + <div class="all-posts" id="all-projects"> + <a href="{{ get_url(path=projects_section.path, lang=lang) }}/">{{ macros_translate::translate(key="all_projects", default="All projects", language_strings=language_strings) }} <span class="arrow">⟶</span></a> + </div> + {%- endif -%} +{% endif %} diff --git a/themes/tabi-lean/templates/partials/multilingual_tags.html b/themes/tabi-lean/templates/partials/multilingual_tags.html new file mode 100644 index 0000000..fe81e6e --- /dev/null +++ b/themes/tabi-lean/templates/partials/multilingual_tags.html @@ -0,0 +1,29 @@ +{%- if section.translations -%} + {%- set current_translations = section.translations -%} +{%- elif page.translations -%} + {%- set current_translations = page.translations -%} +{%- endif -%} + +{%- if current_translations -%} + + {%- for translation in current_translations -%} + {%- set lcode = translation.lang | default(value = config.default_language) -%} + + {#- Dynamically load the language strings for each language -#} + {%- set other_language_strings = load_data(path="i18n/" ~ lcode ~ ".toml", required=false) -%} + {%- if not other_language_strings -%} + {%- set other_language_strings = load_data(path="themes/tabi/i18n/" ~ lcode ~ ".toml", required=false) -%} + {%- endif -%} + <meta property="og:locale:alternate" content="{{ macros_translate::translate(key="date_locale", default="en_GB", language_strings=other_language_strings) }}" /> + + {# Construct href for hreflang #} + {%- set href = translation.permalink -%} + {%- if lcode == config.default_language -%} + {%- set href = href | replace(from='/' ~ lang ~ '/', to = '/') -%} + {%- else -%} + {%- set href = href | replace(from='/' ~ lang ~ '/', to='/' ~ lcode ~ '/') -%} + {%- endif -%} + <link rel="alternate" hreflang="{{ lcode }}" href="{{ href | safe }}" /> + {%- endfor -%} + +{%- endif -%} diff --git a/themes/tabi-lean/templates/partials/nav.html b/themes/tabi-lean/templates/partials/nav.html new file mode 100644 index 0000000..de55151 --- /dev/null +++ b/themes/tabi-lean/templates/partials/nav.html @@ -0,0 +1,60 @@ +<header> + <nav class="navbar"> + <div class="nav-title"> + <a class="home-title" href="{{ get_url(path='/', lang=lang, trailing_slash=(lang == config.default_language)) }}">{{ config.title }}</a> + </div> + + {%- if config.extra.menu %} + <div class="nav-navs"> + <ul> + {%- if config.extra.menu %} + {% for menu in config.extra.menu %} + <li> + {% set trailing_slash = menu.trailing_slash | default(value=true) %} + {%- if menu.url is starting_with("http") -%} + {%- if trailing_slash -%} + <a class="nav-links no-hover-padding" href="{{ menu.url }}/"> + {%- else -%} + <a class="nav-links no-hover-padding" href="{{ menu.url }}"> + {%- endif -%} + {%- else -%} + <a class="nav-links no-hover-padding" href="{{ get_url(path=menu.url, lang=lang, trailing_slash=trailing_slash) }}"> + {%- endif -%} + {{ macros_translate::translate(key=menu.name, default=menu.name, language_strings=language_strings) }} + </a> + </li> + {% endfor %} + {%- endif -%} + + {#- Wrap the icons to keep them all together -#} + <li class="menu-icons-container"> + <ul class="menu-icons-group"> + {# Search #} + {%- if config.build_search_index %} + {%- set search_icon_title = macros_translate::translate(key='search_icon_title', default='Press $SHORTCUT to open search', language_strings=language_strings) -%} + <li class="js menu-icon"> + <div role="button" tabindex="0" id="search-button" class="search-icon interactive-icon" title="{{ search_icon_title }}" aria-label="{{ search_icon_title }}"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"> + <path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/> + </svg> + </div> + </li> + {%- endif %} + + {# Language switcher #} + {# Displayed only if more than one language is available #} + {%- if config.languages | length > 0 %} + {% include "partials/language_switcher.html" %} + {%- endif %} + + {# Theme switcher #} + {%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%} + {%- include "partials/theme_switcher.html" -%} + {%- endif -%} + </ul> + </li> + </ul> + </div> + {% endif %} + </nav> +</header> diff --git a/themes/tabi-lean/templates/partials/paginate.html b/themes/tabi-lean/templates/partials/paginate.html new file mode 100644 index 0000000..6502af7 --- /dev/null +++ b/themes/tabi-lean/templates/partials/paginate.html @@ -0,0 +1,27 @@ +{% if paginator and paginator.number_pagers > 1 %} + <ul class="pagination"> + {% if paginator.previous %} + <li class="page-item page-prev"> + <a href="{{ paginator.previous }}" class="page-link" aria-label="{{ macros_translate::translate(key="prev", default="Prev", language_strings=language_strings) }}"><span class="arrow">←</span> {{ macros_translate::translate(key="prev", default="Prev", language_strings=language_strings) }}</a> + </li> + {% else %} + <li class="page-item page-prev"> + <span class="page-link disabled" aria-disabled="true" aria-label="{{ macros_translate::translate(key="prev", default="Prev", language_strings=language_strings) }} (disabled)"><span class="arrow">←</span> {{ macros_translate::translate(key="prev", default="Prev", language_strings=language_strings) }}</span> + </li> + {% endif %} + + <li class="page-item page-numbers"> + {{ paginator.current_index }} {{ macros_translate::translate(key="of", default="of", language_strings=language_strings) }} {{ paginator.number_pagers }} + </li> + + {% if paginator.next %} + <li class="page-item page-next"> + <a href="{{ paginator.next }}" class="page-link" aria-label="{{ macros_translate::translate(key="next", default="Next", language_strings=language_strings) }}">{{ macros_translate::translate(key="next", default="Next", language_strings=language_strings) }} <span class="arrow">→</span></a> + </li> + {% else %} + <li class="page-item page-next"> + <span class="page-link disabled" aria-disabled="true" aria-label="{{ macros_translate::translate(key="next", default="Next", language_strings=language_strings) }} (disabled)">{{ macros_translate::translate(key="next", default="Next", language_strings=language_strings) }} <span class="arrow">→</span></span> + </li> + {% endif %} + </ul> +{% endif %} diff --git a/themes/tabi-lean/templates/partials/search_modal.html b/themes/tabi-lean/templates/partials/search_modal.html new file mode 100644 index 0000000..a3702d2 --- /dev/null +++ b/themes/tabi-lean/templates/partials/search_modal.html @@ -0,0 +1,31 @@ +<div id="searchModal" class="search-modal js" role="dialog" aria-labelledby="modalTitle"> + <h1 id="modalTitle" class="visually-hidden">{{ macros_translate::translate(key='search', default='Search', language_strings=language_strings) }}</h1> + <div id="modal-content"> + <div id="searchBar"> + <div class="search-icon" aria-hidden="true"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"> + <path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/> + </svg> + </div> + <input id="searchInput" role="combobox" autocomplete="off" spellcheck="false" aria-expanded="false" aria-controls="results-container" placeholder="{{ macros_translate::translate(key='search', default='Search', language_strings=language_strings) }}…"/> + <div id="clear-search" class="close-icon interactive-icon" tabindex="0" role="button" title="{{ macros_translate::translate(key='clear_search', default='Clear search', language_strings=language_strings) }}"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"> + <path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/> + </svg> + </div> + </div> + <div id="results-container"> + <div id="results-info"> + {#- Add the strings here so JavaScript can grab them -#} + {#- These are used in all languages -#} + <span id="zero_results"> {{ macros_translate::translate(key='results', number=0, default='No results', language_strings=language_strings, replace=false) }}</span> + <span id="one_results"> {{ macros_translate::translate(key='results', number=1, default='1 result', language_strings=language_strings, replace=false) }}</span> + <span id="many_results"> {{ macros_translate::translate(key='results', number=11, default='$NUMBER results', language_strings=language_strings, replace=false) }}</span> + {#- Strings for specific languages -#} + <span id="two_results"> {{ macros_translate::translate(key='results', number=2, default='$NUMBER results', language_strings=language_strings, replace=false) }}</span> + <span id="few_results"> {{ macros_translate::translate(key='results', number=2, default='$NUMBER results', language_strings=language_strings, replace=false) }}</span> + </div> + <div id="results" role="listbox"></div> + </div> + </div> +</div> diff --git a/themes/tabi-lean/templates/partials/social_media_images.html b/themes/tabi-lean/templates/partials/social_media_images.html new file mode 100644 index 0000000..d6bbcc7 --- /dev/null +++ b/themes/tabi-lean/templates/partials/social_media_images.html @@ -0,0 +1,50 @@ +{%- set social_media_card = macros_settings::evaluate_setting_priority(setting="social_media_card", page=page | default(value=""), section=section | default(value=""), default_global_value="") -%} +{% if social_media_card %} + {# Get base path from page/section #} + {% set base_path = "" %} + {% if section and section.path %} + {% set base_path = section.path | trim_end_matches(pat="/_index.md") %} + {% if base_path and not social_media_card is starting_with("/") %} + {% set base_path = base_path ~ "/" %} + {% endif %} + {% else %} + {% set base_path = page.colocated_path | default(value="") %} + {% endif %} + + {% set current_path = base_path ~ social_media_card | trim_start_matches(pat="/") %} + + {# Try parent path by removing the last directory component #} + {% set parent_path = base_path | split(pat="/") | slice(end=-2) | join(sep="/") %} + {% if parent_path and not social_media_card is starting_with("/") %} + {% set parent_path = parent_path ~ "/" %} + {% endif %} + {% set parent_relative_path = parent_path ~ social_media_card | trim_start_matches(pat="/") %} + + {# Check all possible locations #} + {%- set current_meta = get_image_metadata(path=current_path, allow_missing=true) -%} + {%- set parent_meta = get_image_metadata(path=parent_relative_path, allow_missing=true) -%} + {%- set absolute_meta = get_image_metadata(path=social_media_card, allow_missing=true) -%} + + {% if current_meta %} + {% set final_path = current_path %} + {% set meta = current_meta %} + {% elif parent_meta %} + {% set final_path = parent_relative_path %} + {% set meta = parent_meta %} + {% elif absolute_meta %} + {% set final_path = social_media_card %} + {% set meta = absolute_meta %} + {% else %} + {{ throw(message="Could not find social media card image. Tried: + 1. Current page path: '" ~ current_path ~ "' + 2. Parent page path: '" ~ parent_relative_path ~ "' + 3. Absolute path: '" ~ social_media_card ~ "' + Please ensure the file exists at one of these locations.") }} + {% endif %} + + <meta property="og:image" content="{{ get_url(path=final_path, cachebust=true) }}" /> + <meta property="og:image:width" content="{{ meta.width }}" /> + <meta property="og:image:height" content="{{ meta.height }}" /> + <meta name="twitter:image" content="{{ get_url(path=final_path, cachebust=true) }}" /> + <meta name="twitter:card" content="summary_large_image" /> +{% endif %} diff --git a/themes/tabi-lean/templates/partials/theme_switcher.html b/themes/tabi-lean/templates/partials/theme_switcher.html new file mode 100644 index 0000000..2e30f90 --- /dev/null +++ b/themes/tabi-lean/templates/partials/theme_switcher.html @@ -0,0 +1,31 @@ +<li class="theme-switcher-wrapper js"> + {#- Create the localised strings for the title and aria-label attributes -#} + {%- set toggle_str = macros_translate::translate(key='toggle_mode', default='Toggle $MODE mode', language_strings=language_strings) -%} + {%- set dark_str = macros_translate::translate(key='dark', default='dark', language_strings=language_strings) -%} + {%- set light_str = macros_translate::translate(key='light', default='light', language_strings=language_strings) -%} + + {%- set combined_mode_str = dark_str ~ "/" ~ light_str -%} + {%- set title_label = toggle_str | replace(from="$MODE", to=combined_mode_str) -%} + {%- set aria_label = toggle_str | replace(from="$MODE", to=dark_str) -%} + + <div + title="{{ title_label }}" + class="theme-switcher" + tabindex="0" + role="button" + aria-label="{{ aria_label }}" + aria-pressed="false"> + </div> + + {%- set reset_str = macros_translate::translate(key='reset_mode', default='Reset mode to default', language_strings=language_strings) -%} + + <div + title="{{ reset_str }}" + class="theme-resetter arrow" + tabindex="0" + role="button" + aria-hidden="true" + aria-label="{{ reset_str }}"> + </div> + +</li> diff --git a/themes/tabi-lean/templates/partials/title.html b/themes/tabi-lean/templates/partials/title.html new file mode 100644 index 0000000..de77d73 --- /dev/null +++ b/themes/tabi-lean/templates/partials/title.html @@ -0,0 +1,40 @@ +{#- Setup -#} +{% if not config.title %} +{{ throw(message="ERROR: No `title` set in `config.toml`. tabi requires a title to function.") }} +{% endif %} +{%- set prefix = config.title | safe -%} +{%- set custom_separator = config.extra.separator | default(value="•") -%} +{%- set separator = " " ~ custom_separator ~ " " -%} + +{#- Get the base path for the current language -#} +{%- if lang != config.default_language %} + {%- set base_path = "/" ~ lang ~ "/" %} +{%- else -%} + {%- set base_path = "/" %} +{%- endif %} + +{%- if current_path and current_path == base_path -%} + {%- set suffix = "" -%} + {%- set separator = "" -%} +{% elif title %} + {%- set suffix = title -%} +{% elif section.title -%} + {%- set suffix = section.title -%} +{% elif page.title %} + {%- set suffix = page.title -%} +{% elif term.name %} + {#- Individual tags -#} + {%- set suffix = term.name -%} +{% elif taxonomy.name %} + {#- List of tags -#} + {%- set suffix = macros_translate::translate(key=taxonomy.name, language_strings=language_strings) | capitalize -%} +{% else %} + {%- set suffix = "404" %} +{%- endif -%} + +{#- Return the final concatenated string -#} +{%- if config.extra.invert_title_order -%} + {{- suffix ~ separator ~ prefix -}} +{%- else -%} + {{- prefix ~ separator ~ suffix -}} +{%- endif -%} diff --git a/themes/tabi-lean/templates/partials/webmentions.html b/themes/tabi-lean/templates/partials/webmentions.html new file mode 100644 index 0000000..e579a04 --- /dev/null +++ b/themes/tabi-lean/templates/partials/webmentions.html @@ -0,0 +1,51 @@ +{# Incorporate webmention.io links and script into the page head. +1. Provide the link to the webmention data in the at webmention.io. +2. Link to the stylesheet for styling webmentions on a page. +3. Add and configure the javascript to fetch and display the webmentions collected at webmention.io. #} + +<link rel="webmention" href="https://webmention.io/{{ config.extra.webmentions.domain }}/webmention" /> + +{# Calculate the configured data for the script, if any #} + +{% set script_data = "" %} + +{% if config.extra.webmentions.id %} +{% set script_data = script_data ~ "data-id=" ~ config.extra.webmentions.id %} +{% endif %} + +{% if config.extra.webmentions.page_url %} +{% set script_data = script_data ~ " data-page-url=" ~ config.extra.webmentions.page_url %} +{% endif %} + +{% if config.extra.webmentions.add_urls %} +{% set script_data = script_data ~ "data-add-urls=" ~ config.extra.webmentions.add_urls %} +{% endif %} + +{% if config.extra.webmentions.wordcount %} +{% set script_data = script_data ~ " data-wordcount=" ~ config.extra.webmentions.wordcount %} +{% endif %} + +{% if config.extra.webmentions.max_webmentions %} +{% set script_data = script_data ~ "data-max-webmentions=" ~ config.extra.webmentions.max_webmentions %} +{% endif %} + +{% if config.extra.webmentions.prevent_spoofing %} +{% set script_data = script_data ~ "data-prevent-spoofing=" ~ config.extra.webmentions.prevent_spoofing %} +{% endif %} + +{% if config.extra.webmentions.sort_by %} +{% set script_data = script_data ~ "data-sort-by=" ~ config.extra.webmentions.sort_by %} +{% endif %} + +{% if config.extra.webmentions.sort_dir %} +{% set script_data = script_data ~ "data-sort-dir=" ~ config.extra.webmentions.sort_dir %} +{% endif %} + +{% if config.extra.webmentions.comments_are_reactions %} +{% set script_data = script_data ~ " data-comments-are-reactions=" ~ config.extra.webmentions.comments_are_reactions %} +{% endif %} + +<script async src="{{ get_url(path='js/webmention.min.js', trailing_slash=false, cachebust=true) | safe }}" {{ script_data }}> +</script> + +<div class="webmentions-container" id="webmentions"></div> diff --git a/themes/tabi-lean/templates/section.html b/themes/tabi-lean/templates/section.html new file mode 100644 index 0000000..3f2af39 --- /dev/null +++ b/themes/tabi-lean/templates/section.html @@ -0,0 +1,57 @@ +{% extends "base.html" %} + +{% block main_content %} + +{# We'll only pin posts in the root section. #} +{# Right now both the main page and blog/ use the same `section.html` template. #} +{# To avoid using different templates, we do this. #} +{%- if lang == config.default_language -%} + {%- set expected_root = "/" -%} +{%- else -%} + {%- set expected_root = "/" ~ lang ~ "/" -%} +{%- endif -%} +{%- set is_root_section = current_path == expected_root -%} + +{%- set show_projects_first = section.extra.show_projects_first | default(value=false) -%} +{%- if show_projects_first -%} + {%- set first_section = "projects" -%} +{%- else -%} + {%- set first_section = "posts" -%} +{%- endif -%} + +{%- if section.extra.section_path or paginator and projects_path -%} + {%- set more_than_one_section_shown = true -%} +{%- endif -%} + +<main {% if more_than_one_section_shown %}class="{{ first_section }}-first"{% endif %}> +{%- if config.extra.hcard %} + {%- include "partials/hcard.html" -%} +{% endif -%} +{%- if section.extra.header %} + {%- include "partials/home_banner.html" -%} +{%- elif section.content -%} +<section> + {{ section.content | safe }} +</section> +{% endif -%} + +{% if section.extra.section_path -%} + {% set extra_section = get_section(path=section.extra.section_path) %} +{% endif -%} + +{% if section.extra.section_path -%} + {% set path = section.extra.section_path | replace(from="/_index.md", to = "") %} +{% else -%} + {% set path = section.path %} +{% endif -%} + +{%- if show_projects_first -%} + {%- include "partials/main_page_projects_list.html" -%} + {%- include "partials/main_page_posts_list.html" -%} +{%- else -%} + {%- include "partials/main_page_posts_list.html" -%} + {%- include "partials/main_page_projects_list.html" -%} +{%- endif -%} +</main> + +{% endblock main_content %} diff --git a/themes/tabi-lean/templates/series.html b/themes/tabi-lean/templates/series.html new file mode 100644 index 0000000..5a4cc0c --- /dev/null +++ b/themes/tabi-lean/templates/series.html @@ -0,0 +1,62 @@ +{% extends "base.html" %} + +{% block main_content %} + +{# Throw an error if the section is not flagged as a series. #} +{# This page would be displayed properly but it would become impossible for the series' child pages to reference their series. #} +{%- if "series" not in section.extra or not section.extra.series -%} + {{ throw(message="Section is not flagged as a series. Set `section.extra.series` to `true` if you want to use `series.html` template.") }} +{%- endif -%} + +<main> +{%- if section.extra.header %} + {%- include "partials/home_banner.html" -%} +{% endif -%} + + {%- set show_jump = false -%} + {%- set show_jump_hierarchy = macros_settings::evaluate_setting_priority(setting="show_jump_to_posts", page=section) -%} + {%- if show_jump_hierarchy == "true" -%} + {%- set show_jump = true -%} + {%- elif show_jump_hierarchy != "false" -%} + {#- Default to true if the content is long and var is unset #} + {%- if section.content | length > 2000 -%} + {%- set show_jump = true -%} + {%- endif -%} + {%- endif -%} + + {%- if show_jump -%} + <div class="title-with-jump bottom-divider"> + <h1 class="title-container section-title">{{ section.title }}</h1> + <a href="#posts-list" class="jump-link">{{ macros_translate::translate(key="jump_to_posts", default="Jump to posts", language_strings=language_strings) }} ↓</a> + </div> + {%- else -%} + {{ macros_page_header::page_header(title=section.title) }} + {%- endif -%} + + <section class="body"> + {{ section.content | safe }} + </section> + + <div id="posts-list"> + <h2 class="bottom-divider"> + {{ macros_translate::translate(key="all_posts", default="All posts", language_strings=language_strings) }} + </h2> + {%- if paginator %} + {%- set pages = paginator.pages -%} + {% else %} + {%- set pages = section.pages -%} + {% endif -%} + + {% set max_posts = section.extra.max_posts | default(value=999999) %} + {{ macros_list_posts::list_posts(posts=pages, max=max_posts, metadata="indexes", language_strings=language_strings, section_path=section.path, paginator=paginator | default(value="")) }} + </div> + + {% if paginator %} + {%- include "partials/paginate.html" -%} + {% endif %} + +</main> + +{%- include "partials/extra_features.html" -%} + +{% endblock main_content %} diff --git a/themes/tabi-lean/templates/shortcodes/add_src_to_code_block.html b/themes/tabi-lean/templates/shortcodes/add_src_to_code_block.html new file mode 100644 index 0000000..907e092 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/add_src_to_code_block.html @@ -0,0 +1 @@ +<span class="code-source hidden" data-source="{{ src | safe }}"></span> diff --git a/themes/tabi-lean/templates/shortcodes/admonition.html b/themes/tabi-lean/templates/shortcodes/admonition.html new file mode 100644 index 0000000..3519527 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/admonition.html @@ -0,0 +1,12 @@ +{%- set type = type | default(value="info") -%} +{%- set title = title | default(value=type | upper) -%} +{%- set icon = icon | default(value=type) -%} +{%- set text = text | default(value=body) -%} + +<div class="admonition {{ type }}"> + <div class="admonition-icon admonition-icon-{{ icon }}"></div> + <div class="admonition-content"> + <strong class="admonition-title">{{ title | safe }}</strong> + {{ text | markdown | safe }} + </div> +</div> diff --git a/themes/tabi-lean/templates/shortcodes/aside.html b/themes/tabi-lean/templates/shortcodes/aside.html new file mode 100644 index 0000000..ca337f9 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/aside.html @@ -0,0 +1,5 @@ +{%- set text = text | default(value=body) -%} + +<aside {% if position %}data-position="{{ position }}"{% endif %}> + {{ text | markdown | safe }} +</aside> diff --git a/themes/tabi-lean/templates/shortcodes/dimmable_image.html b/themes/tabi-lean/templates/shortcodes/dimmable_image.html new file mode 100644 index 0000000..a72720c --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/dimmable_image.html @@ -0,0 +1,31 @@ +{#- Determine image path based on whether the src is remote or local -#} +{%- if src is starting_with("http") or raw_path -%} + {%- set image_url = src -%} +{%- else -%} + {%- set colocated_path = page.colocated_path | default(value="") -%} + {%- set relative_path = colocated_path ~ src -%} + {%- set meta = get_image_metadata(path=relative_path, allow_missing=true) -%} + + {#- Fallback to absolute path if relative path doesn't work -#} + {%- if not meta -%} + {%- set meta = get_image_metadata(path=src, allow_missing=true) -%} + {%- set image_url = get_url(path=src, cachebust=true) -%} + {%- else -%} + {%- set image_url = get_url(path=relative_path, cachebust=true) -%} + {%- endif -%} +{%- endif -%} + +{%- set lazy_loading = lazy_loading | default(value=true) -%} + +{%- set class_list = "dimmable-image" -%} +{%- if inline -%} + {%- set class_list = class_list ~ " inline" -%} +{%- endif -%} + +{%- if full_width -%} + <div class="full-width"> +{%- endif -%} +<img class="{{ class_list }}" src="{{ image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}{% if meta.width %} width="{{ meta.width }}"{% endif %}{% if meta.height %} height="{{ meta.height }}" {% endif %}/> +{%- if full_width -%} + </div> +{%- endif -%} diff --git a/themes/tabi-lean/templates/shortcodes/dual_theme_image.html b/themes/tabi-lean/templates/shortcodes/dual_theme_image.html new file mode 100644 index 0000000..5eadc09 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/dual_theme_image.html @@ -0,0 +1,45 @@ +{%- set colocated_path = page.colocated_path | default(value="") -%} +{%- set lazy_loading = lazy_loading | default(value=true) -%} +{%- set inline = inline | default(value=false) -%} + +{%- set light_class_list = "img-light" -%} +{%- set dark_class_list = "img-dark" -%} +{%- if inline -%} + {%- set light_class_list = light_class_list ~ " inline" -%} + {%- set dark_class_list = dark_class_list ~ " inline" -%} +{%- endif -%} + +{# Handling for light mode image #} +{%- if light_src is starting_with("http") or raw_path -%} + {%- set light_image_url = light_src -%} +{%- else -%} + {%- set relative_light_path = colocated_path ~ light_src -%} + {%- set light_meta = get_image_metadata(path=relative_light_path, allow_missing=true) -%} + {%- if not light_meta -%} + {%- set light_image_url = get_url(path=light_src, cachebust=true) -%} + {%- else -%} + {%- set light_image_url = get_url(path=relative_light_path, cachebust=true) -%} + {%- endif -%} +{%- endif -%} + +{# Handling for dark mode image #} +{%- if dark_src is starting_with("http") or raw_path -%} + {%- set dark_image_url = dark_src -%} +{%- else -%} + {%- set relative_dark_path = colocated_path ~ dark_src -%} + {%- set dark_meta = get_image_metadata(path=relative_dark_path, allow_missing=true) -%} + {%- if not dark_meta -%} + {%- set dark_image_url = get_url(path=dark_src, cachebust=true) -%} + {%- else -%} + {%- set dark_image_url = get_url(path=relative_dark_path, cachebust=true) -%} + {%- endif -%} +{%- endif -%} + +{%- if full_width -%} + <div class="full-width"> +{%- endif -%} +<img class="{{ light_class_list }}" src="{{ light_image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}{% if light_meta.width %} width="{{ light_meta.width }}"{% endif %}{% if light_meta.height %} height="{{ light_meta.height }}" {% endif %}> +<img class="{{ dark_class_list }}" src="{{ dark_image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}{% if dark_meta.width %} width="{{ dark_meta.width }}"{% endif %}{% if dark_meta.height %} height="{{ dark_meta.height }}" {% endif %}> +{%- if full_width -%} + </div> +{%- endif -%} diff --git a/themes/tabi-lean/templates/shortcodes/force_text_direction.html b/themes/tabi-lean/templates/shortcodes/force_text_direction.html new file mode 100644 index 0000000..79d9697 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/force_text_direction.html @@ -0,0 +1,5 @@ +{%- set direction = direction | default(value="ltr") -%} + +<div data-force-text-direction="{{ direction }}"> + {{ body | markdown | safe }} +</div> diff --git a/themes/tabi-lean/templates/shortcodes/full_width_image.html b/themes/tabi-lean/templates/shortcodes/full_width_image.html new file mode 100644 index 0000000..a50bf10 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/full_width_image.html @@ -0,0 +1,22 @@ +{#- Set paths based on whether the src is remote or local -#} +{%- if src is starting_with("http") or raw_path -%} + {%- set image_url = src -%} +{%- else -%} + {%- set colocated_path = page.colocated_path | default(value="") -%} + {%- set relative_path = colocated_path ~ src -%} + {%- set meta = get_image_metadata(path=relative_path, allow_missing=true) -%} + + {#- Fallback to absolute path if relative path doesn't work -#} + {%- if not meta -%} + {%- set meta = get_image_metadata(path=src, allow_missing=true) -%} + {%- set image_url = get_url(path=src, cachebust=true) -%} + {%- else %} + {%- set image_url = get_url(path=relative_path, cachebust=true) -%} + {%- endif -%} +{%- endif -%} + +{%- set lazy_loading = lazy_loading | default(value=true) -%} + +<div class="full-width"> + <img src="{{ image_url }}"{% if alt %} alt="{{ alt }}"{% endif %}{% if meta.width %} width="{{ meta.width }}"{% endif %}{% if meta.height %} height="{{ meta.height }}"{% endif %}{% if lazy_loading %} loading="lazy"{% endif %}/> +</div> diff --git a/themes/tabi-lean/templates/shortcodes/iine.html b/themes/tabi-lean/templates/shortcodes/iine.html new file mode 100644 index 0000000..d37211d --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/iine.html @@ -0,0 +1,5 @@ +{% set button_icon = icon | default(value="heart") %} +{% set label = label | default(value="Like this post") %} +{% set slug = slug | default(value=page.path) %} + +{% include "partials/iine_button.html" %} diff --git a/themes/tabi-lean/templates/shortcodes/image_hover.html b/themes/tabi-lean/templates/shortcodes/image_hover.html new file mode 100644 index 0000000..443329b --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/image_hover.html @@ -0,0 +1,50 @@ +{%- set colocated_path = page.colocated_path | default(value="") -%} +{%- set lazy_loading = lazy_loading | default(value=true) -%} +{%- set inline = inline | default(value=false) -%} + +{#- Determine the tag for container elements -#} +{#- Necessary for inline images -#} +{%- set tag = "div" -%} +{%- if inline -%} + {%- set tag = "span" -%} +{%- endif -%} + +{%- set img_class_list = "" -%} +{%- if inline -%} + {%- set img_class_list = img_class_list ~ " inline" -%} +{%- endif -%} + +{#- Direct or relative URL handling for default image -#} +{%- if default_src is starting_with("http") or raw_path -%} + {%- set default_image_url = default_src -%} +{%- else -%} + {%- set relative_default_path = colocated_path ~ default_src -%} + {%- set default_meta = get_image_metadata(path=relative_default_path, allow_missing=true) -%} + {%- if not default_meta -%} + {%- set default_image_url = get_url(path=default_src, cachebust=true) -%} + {%- else -%} + {%- set default_image_url = get_url(path=relative_default_path, cachebust=true) -%} + {%- endif -%} +{%- endif -%} + +{#- Direct or relative URL handling for hovered image -#} +{%- if hovered_src is starting_with("http") or raw_path -%} + {%- set hovered_image_url = hovered_src -%} +{%- else -%} + {%- set relative_hovered_path = colocated_path ~ hovered_src -%} + {%- set hovered_meta = get_image_metadata(path=relative_hovered_path, allow_missing=true) -%} + {%- if not hovered_meta -%} + {%- set hovered_image_url = get_url(path=hovered_src, cachebust=true) -%} + {%- else -%} + {%- set hovered_image_url = get_url(path=relative_hovered_path, cachebust=true) -%} + {%- endif -%} +{%- endif -%} + +<{{ tag }} class="image-hover-container{% if full_width %} full-width{% endif %}"> + <{{ tag }} class="image-default"> + <img class="{{ img_class_list }}" src="{{ default_image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if default_alt %} alt="{{ default_alt }}"{% endif %}{% if default_meta.width %} width="{{ default_meta.width }}"{% endif %}{% if default_meta.height %} height="{{ default_meta.height }}"{% endif %}> + </{{ tag }}> + <{{ tag }} class="image-hovered"> + <img class="{{ img_class_list }}" src="{{ hovered_image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if hovered_alt %} alt="{{ hovered_alt }}"{% endif %}{% if hovered_meta.width %} width="{{ hovered_meta.width }}"{% endif %}{% if hovered_meta.height %} height="{{ hovered_meta.height }}"{% endif %}> + </{{ tag }}> +</{{ tag }}> diff --git a/themes/tabi-lean/templates/shortcodes/image_toggler.html b/themes/tabi-lean/templates/shortcodes/image_toggler.html new file mode 100644 index 0000000..991d5f5 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/image_toggler.html @@ -0,0 +1,57 @@ +{# The `random_id` ensures that each instance of the shortcode has a "unique" id #} +{# allowing individual interactive elements (like toggles) to function correctly. #} +{# This avoids conflicts when multiple instances of the shortcode are used. #} +{%- set random_id = get_random(end=100000) -%} +{%- set colocated_path = page.colocated_path | default(value="") -%} +{%- set lazy_loading = lazy_loading | default(value=true) -%} +{%- set inline = inline | default(value=false) -%} + +{#- Determine the class for the images -#} +{#- Necessary for inline images -#} +{%- set tag = "div" -%} +{%- if inline -%} + {%- set tag = "span" -%} +{%- endif -%} + +{%- set img_class_list = "" -%} +{%- if inline -%} + {%- set img_class_list = img_class_list ~ " inline" -%} +{%- endif -%} + +{# Direct or relative URL handling for default image #} +{%- if default_src is starting_with("http") or raw_path -%} + {%- set default_image_url = default_src -%} +{%- else -%} + {%- set relative_default_path = colocated_path ~ default_src -%} + {%- set default_meta = get_image_metadata(path=relative_default_path, allow_missing=true) -%} + {%- if not default_meta -%} + {%- set default_image_url = get_url(path=default_src, cachebust=true) -%} + {%- else -%} + {%- set default_image_url = get_url(path=relative_default_path, cachebust=true) -%} + {%- endif -%} +{%- endif -%} + +{# Direct or relative URL handling for toggled image #} +{%- if toggled_src is starting_with("http") or raw_path -%} + {%- set toggled_image_url = toggled_src -%} +{%- else -%} + {%- set relative_toggled_path = colocated_path ~ toggled_src -%} + {%- set toggled_meta = get_image_metadata(path=relative_toggled_path, allow_missing=true) -%} + {%- if not toggled_meta -%} + {%- set toggled_image_url = get_url(path=toggled_src, cachebust=true) -%} + {%- else -%} + {%- set toggled_image_url = get_url(path=relative_toggled_path, cachebust=true) -%} + {%- endif -%} +{%- endif -%} + +<{{ tag }} class="image-toggler-container {% if full_width %}full-width{% endif %}"> + <input type="checkbox" id="toggle-img-{{ random_id }}" class="image-toggler-toggle"> + <label for="toggle-img-{{ random_id }}" class="image-label"> + <{{ tag }} class="image-default"> + <img class="{{ img_class_list }}" src="{{ default_image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if default_alt %} alt="{{ default_alt }}"{% endif %}{% if default_meta.width %} width="{{ default_meta.width }}"{% endif %}{% if default_meta.height %} height="{{ default_meta.height }}"{% endif %}> + </{{ tag }}> + <{{ tag }} class="image-toggled"> + <img class="{{ img_class_list }}" src="{{ toggled_image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if toggled_alt %} alt="{{ toggled_alt }}"{% endif %}{% if toggled_meta.width %} width="{{ toggled_meta.width }}"{% endif %}{% if toggled_meta.height %} height="{{ toggled_meta.height }}"{% endif %}> + </{{ tag }}> + </label> +</{{ tag }}> diff --git a/themes/tabi-lean/templates/shortcodes/invertible_image.html b/themes/tabi-lean/templates/shortcodes/invertible_image.html new file mode 100644 index 0000000..0e3c920 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/invertible_image.html @@ -0,0 +1,32 @@ +{#- Determine if src is a remote URL or a local path -#} +{%- if src is starting_with("http") or raw_path -%} + {%- set image_url = src -%} +{%- else -%} + {%- set colocated_path = page.colocated_path | default(value="") -%} + {%- set relative_path = colocated_path ~ src -%} + {%- set meta = get_image_metadata(path=relative_path, allow_missing=true) -%} + + {#- Fallback to absolute path if relative path doesn't work -#} + {%- if not meta -%} + {%- set meta = get_image_metadata(path=src, allow_missing=true) -%} + {%- set image_url = get_url(path=src, cachebust=true) -%} + {%- else %} + {%- set image_url = get_url(path=relative_path, cachebust=true) -%} + {%- endif -%} +{%- endif -%} + +{%- set lazy_loading = lazy_loading | default(value=true) -%} +{%- set inline = inline | default(value=false) -%} + +{%- set class_list = "invertible-image" -%} +{%- if inline -%} + {%- set class_list = class_list ~ " inline" -%} +{%- endif -%} + +{%- if full_width -%} + <div class="full-width"> +{%- endif -%} +<img class="{{ class_list }}" src="{{ image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}{% if meta.width %} width="{{ meta.width }}"{% endif %}{% if meta.height %} height="{{ meta.height }}" {% endif %}/> +{%- if full_width -%} + </div> +{%- endif -%} diff --git a/themes/tabi-lean/templates/shortcodes/mermaid.html b/themes/tabi-lean/templates/shortcodes/mermaid.html new file mode 100644 index 0000000..88bbdc4 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/mermaid.html @@ -0,0 +1,8 @@ +{% set invertible = invertible | default(value=true) %} +{% set full_width = full_width | default(value=false) %} +<noscript> + <strong>⚠️ JavaScript is required to render the diagram.</strong> +</noscript> +<pre class="mermaid{% if invertible %} invertible-image{% endif %}{% if full_width %} full-width{% endif %}"> + {{ body | safe }} +</pre> diff --git a/themes/tabi-lean/templates/shortcodes/multilingual_quote.html b/themes/tabi-lean/templates/shortcodes/multilingual_quote.html new file mode 100644 index 0000000..7ea9849 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/multilingual_quote.html @@ -0,0 +1,37 @@ +{%- import "macros/translate.html" as macros_translate -%} +{# Load internationalisation data #} +{%- set language_strings = load_data(path="i18n/" ~ lang ~ '.toml', required=false) -%} +{%- if not language_strings -%} + {%- set language_strings = load_data(path="themes/tabi/i18n/" ~ lang ~ ".toml", required=false) -%} +{%- endif -%} + +{%- set open_quote = macros_translate::translate(key="open_quotation_mark", default="“", language_strings=language_strings) -%} +{%- set close_quote = macros_translate::translate(key="close_quotation_mark", default="”", language_strings=language_strings) -%} + +{#- The `random_id` ensures that each instance of the shortcode has a "unique" id -#} +{#- allowing individual interactive elements (like toggles) to function correctly. -#} +{#- This avoids conflicts when multiple instances of the shortcode are used. -#} +{#- More context: https://github.com/welpo/tabi/issues/82 -#} +{%- set random_id = get_random(end=100000) -%} + +<div class="quote-container"> + <input type="checkbox" id="toggle-{{ random_id }}" class="quote-toggle"> + <div class="quote"> + <div class="translated"> + <blockquote> + <p>{{ open_quote ~ translated ~ close_quote }}</p> + <p>{% if author %}— {{ author | safe }}{% endif %} <label for="toggle-{{ random_id }}" class="quote-label quote-label-original"> + ({{- macros_translate::translate(key="show_original_quote", default="Show original quote", language_strings=language_strings) -}}) + </label></p> + </blockquote> + </div> + <div class="original"> + <blockquote> + <p>{{ open_quote ~ original ~ close_quote }}</p> + <p>{% if author %}— {{ author | safe }}{% endif %} <label for="toggle-{{ random_id }}" class="quote-label quote-label-translate"> + ({{- macros_translate::translate(key="show_translation", default="Show translation", language_strings=language_strings) -}}) + </label></p> + </blockquote> + </div> + </div> +</div> diff --git a/themes/tabi-lean/templates/shortcodes/references.html b/themes/tabi-lean/templates/shortcodes/references.html new file mode 100644 index 0000000..1894479 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/references.html @@ -0,0 +1,3 @@ +<div class="references"> + {{ body | markdown | safe }} +</div> diff --git a/themes/tabi-lean/templates/shortcodes/remote_text.html b/themes/tabi-lean/templates/shortcodes/remote_text.html new file mode 100644 index 0000000..70fd33a --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/remote_text.html @@ -0,0 +1,30 @@ +{%- set start = start | default(value=1) -%} +{%- set end = end | default(value=0) -%} + +{#- load_data uses different arguments based on whether it's a remote or local file -#} +{%- if src is starting_with("http") -%} + {%- set response = load_data(url=src, format="plain") -%} +{%- else -%} + {#- Try to load the file from a relative path -#} + {%- set colocated_path = page.colocated_path | default(value="") -%} + {%- set relative_path = colocated_path ~ src -%} + {%- set response = load_data(path=relative_path, format="plain", required=false) -%} + {#- If relative path fails, try absolute path -#} + {%- if not response -%} + {%- set response = load_data(path=src, format="plain") -%} + {%- endif -%} +{%- endif -%} + +{%- set lines = response | trim_end | split(pat="\n") -%} + +{%- if start > 0 -%} + {%- set start = start - 1 -%} +{%- endif -%} + +{%- if end == 0 or end > lines | length -%} + {%- set end = lines | length -%} +{%- endif -%} + +{%- set lines = lines | slice(start=start, end=end) -%} + +{{- lines | join(sep="\n") | safe -}} diff --git a/themes/tabi-lean/templates/shortcodes/spoiler.html b/themes/tabi-lean/templates/shortcodes/spoiler.html new file mode 100644 index 0000000..ff9e695 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/spoiler.html @@ -0,0 +1,13 @@ +{# The `random_id` ensures that each instance of the shortcode has a "unique" id #} +{# allowing individual interactive elements (like toggles) to function correctly. #} +{# This avoids conflicts when multiple instances of the shortcode are used. #} +{# More context: https://github.com/welpo/tabi/issues/82 #} +{%- set random_id = get_random(end=100000) -%} +{%- set fixed_blur = fixed_blur | default(value=false) -%} + +<label class="spoiler-container{% if fixed_blur %} fixed-blur{% endif %}"> + <input type="checkbox" id="spoiler-{{random_id}}" class="spoiler-toggle" role="button" aria-pressed="false" /> + <span class="spoiler-content" title="reveal spoiler" tabindex="0"> + <span class="spoiler-hidden">{{ text | markdown | trim_start_matches(pat="<p>") | trim_start_matches(pat="</p>") | safe }}</span> + </span> +</label> diff --git a/themes/tabi-lean/templates/shortcodes/toc.html b/themes/tabi-lean/templates/shortcodes/toc.html new file mode 100644 index 0000000..8756586 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/toc.html @@ -0,0 +1,2 @@ +{# Inserts special string to add the Table of Contents anywhere on a post #} +<!-- toc --> diff --git a/themes/tabi-lean/templates/shortcodes/wide_container.html b/themes/tabi-lean/templates/shortcodes/wide_container.html new file mode 100644 index 0000000..6268e63 --- /dev/null +++ b/themes/tabi-lean/templates/shortcodes/wide_container.html @@ -0,0 +1,3 @@ +<div class="full-width"> + {{ body | markdown | safe }} +</div> diff --git a/themes/tabi-lean/templates/sitemap.xml b/themes/tabi-lean/templates/sitemap.xml new file mode 100644 index 0000000..480759f --- /dev/null +++ b/themes/tabi-lean/templates/sitemap.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="{{ get_url(path='/sitemap_style.xsl', trailing_slash=false) | safe }}" type="text/xsl"?> +<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> + {%- for sitemap_entry in entries %} + <url> + <loc>{{ sitemap_entry.permalink | escape_xml | safe }}</loc> + {%- if sitemap_entry.updated %} + <lastmod>{{ sitemap_entry.updated }}</lastmod> + {%- endif %} + </url> + {%- endfor %} +</urlset> diff --git a/themes/tabi-lean/templates/tags/list.html b/themes/tabi-lean/templates/tags/list.html new file mode 100644 index 0000000..7b5e468 --- /dev/null +++ b/themes/tabi-lean/templates/tags/list.html @@ -0,0 +1,40 @@ +{% extends "index.html" %} + +{% block main_content %} + +{%- set title = macros_translate::translate(key="all_tags", default="All tags", language_strings=language_strings) -%} + +{{ macros_page_header::page_header(title=title)}} + +{% set tag_count = terms | length %} +{% if config.extra.tag_sorting == "frequency" %} + {% set terms = terms | sort(attribute="pages") | reverse %} +{% elif config.extra.tag_sorting != "name" %} + {{ throw (message="Invalid tag_sorting option: " ~ config.extra.tag_sorting ~ ". Valid options are 'name' and 'frequency'.") }} +{% endif %} +<div id="tag-cloud" class="{% if tag_count > 16 %}three-columns{% elif tag_count > 8 %}two-columns{% endif %}"> + <ul class="tags"> + {%- for term in terms -%} + <li class="tags-item"> + {%- set number_of_posts = term.pages | length -%} + {% if config.extra.compact_tags %} + {# Shows the number of posts per tag as a superscript #} + <a href="{{ term.permalink | safe }}" + aria-label="{{ term.name }} – + {{ term.pages | length }} + {{- macros_translate::translate(key="posts", number=number_of_posts, default="$NUMBER posts", language_strings=language_strings) -}} + "> + {{ term.name }} + </a> <sup>{{ number_of_posts }}</sup> + {% else %} + <a href="{{ term.permalink | safe }}"> + {{ term.name }} </a> + <span> – </span> + {{- macros_translate::translate(key="posts", number=number_of_posts, default="$NUMBER posts", language_strings=language_strings) -}} + {% endif %} + </li> + {%- endfor -%} + </ul> +</div> + +{% endblock main_content %} diff --git a/themes/tabi-lean/templates/tags/single.html b/themes/tabi-lean/templates/tags/single.html new file mode 100644 index 0000000..2f25fd2 --- /dev/null +++ b/themes/tabi-lean/templates/tags/single.html @@ -0,0 +1,22 @@ +{% extends "index.html" %} + +{% block main_content %} + +{#- Feed icon -#} +{%- set generate_feed = feed_utils::get_generate_feed() == "true" -%} +{%- set feed_url = feed_utils::get_feed_url() -%} +{%- set feed_pre_conditions = generate_feed and feed_url and taxonomy.feed -%} +{%- set show_feed_icon = feed_pre_conditions and term.pages | filter(attribute="date") -%} + +{{ macros_page_header::page_header(title=term.name, show_feed_icon=show_feed_icon) }} + +{% set max = section.extra.max_posts | default(value=999999) %} +{{ macros_list_posts::list_posts(posts=term.pages, max=max, language_strings=language_strings) }} + +<ul class="pagination"> + <li class="page-item"> + <a class="all-tags" href="{{ get_url(path="tags", lang=lang) }}/"><span class="arrow">←</span> {{- macros_translate::translate(key="all_tags", default="All tags", language_strings=language_strings) -}}</a> + </li> +</ul> + +{% endblock main_content %} diff --git a/themes/tabi-lean/templates/taxonomy_list.html b/themes/tabi-lean/templates/taxonomy_list.html new file mode 100644 index 0000000..b13e1b9 --- /dev/null +++ b/themes/tabi-lean/templates/taxonomy_list.html @@ -0,0 +1,40 @@ +{% extends "index.html" %} + +{% block main_content %} + +{%- set title = macros_translate::translate(key=taxonomy.name, default=taxonomy.name, language_strings=language_strings) -%} + +{{ macros_page_header::page_header(title=title)}} + +{% set tag_count = terms | length %} +{% if config.extra.tag_sorting == "frequency" %} + {% set terms = terms | sort(attribute="pages") | reverse %} +{% elif config.extra.tag_sorting != "name" %} + {{ throw (message="Invalid tag_sorting option: " ~ config.extra.tag_sorting ~ ". Valid options are 'name' and 'frequency'.") }} +{% endif %} +<div id="tag-cloud" class="{% if tag_count > 16 %}three-columns{% elif tag_count > 8 %}two-columns{% endif %}"> + <ul class="tags"> + {%- for term in terms -%} + <li class="tags-item"> + {%- set number_of_posts = term.pages | length -%} + {% if config.extra.compact_tags %} + {# Shows the number of posts per tag as a superscript #} + <a href="{{ term.permalink | safe }}" + aria-label="{{ term.name }} – + {{ term.pages | length }} + {{- macros_translate::translate(key="posts", number=number_of_posts, default="$NUMBER posts", language_strings=language_strings) -}} + "> + {{ term.name }} + </a> <sup>{{ number_of_posts }}</sup> + {% else %} + <a href="{{ term.permalink | safe }}"> + {{ term.name }} </a> + <span> – </span> + {{- macros_translate::translate(key="posts", number=number_of_posts, default="$NUMBER posts", language_strings=language_strings) -}} + {% endif %} + </li> + {%- endfor -%} + </ul> +</div> + +{% endblock main_content %} diff --git a/themes/tabi-lean/templates/taxonomy_single.html b/themes/tabi-lean/templates/taxonomy_single.html new file mode 100644 index 0000000..ff09a3b --- /dev/null +++ b/themes/tabi-lean/templates/taxonomy_single.html @@ -0,0 +1,22 @@ +{% extends "index.html" %} + +{% block main_content %} + +{#- Feed icon -#} +{%- set generate_feed = feed_utils::get_generate_feed() == "true" -%} +{%- set feed_url = feed_utils::get_feed_url() -%} +{%- set feed_pre_conditions = generate_feed and feed_url and taxonomy.feed -%} +{%- set show_feed_icon = feed_pre_conditions and term.pages | filter(attribute="date") | length > 0 -%} + +{{ macros_page_header::page_header(title=term.name, show_feed_icon=show_feed_icon) }} + +{% set max = section.extra.max_posts | default(value=999999) %} +{{ macros_list_posts::list_posts(posts=term.pages, max=max, language_strings=language_strings) }} + +<ul class="pagination"> + <li class="page-item"> + <a class="all-tags" href="{{ get_url(path="tags", lang=lang) }}/"><span class="arrow">←</span> {{- macros_translate::translate(key=taxonomy.name, default=taxonomy.name, language_strings=language_strings) -}}</a> + </li> +</ul> + +{% endblock main_content %} diff --git a/themes/tabi-lean/theme.toml b/themes/tabi-lean/theme.toml new file mode 100644 index 0000000..fa5c4b7 --- /dev/null +++ b/themes/tabi-lean/theme.toml @@ -0,0 +1,465 @@ +name = "tabi" +description = "tabi is an accessible Zola theme with search, multi-language support, optional JavaScript, a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs." +license = "MIT" +homepage = "https://github.com/welpo/tabi" + +# The minimum version of Zola required +min_version = "0.17.0" + +# An optional live demo URL +demo = "https://welpo.github.io/tabi" + +# The theme author info: you! +[author] +name = "Óscar Fernández" +homepage = "https://osc.garden" + +# Any variable there can be overridden in the end user `config.toml` +# You don't need to prefix variables by the theme name but as this will +# be merged with user data, some kind of prefix or nesting is preferable +# Use snake_casing to be consistent with the rest of Zola +[extra] +# Check out the documentation (or the comments below) to learn how to customise tabi: +# https://welpo.github.io/tabi/blog/mastering-tabi-settings/ + +# Search index format. +# For Zola 0.17.X users only. +# This MUST MATCH the setting in [search].index_format. +# Example: If [search].index_format is "elasticlunr_javascript", set: +# index_format = "elasticlunr_javascript" here. +# index_format = "" + +# Use sans-serif font everywhere. +# By default, the serif font is only used in articles. +override_serif_with_sans = false + +# Enable JavaScript theme toggler to allow users to switch between dark/light mode. +# If disabled, your site will use the theme specified in the `default_theme` variable. +theme_switcher = true + +# This setting determines the default theme on load ("light" or "dark"). +# To follow the user's OS theme, leave it empty or unset. +default_theme = "" + +# Choose the colourscheme (skin) for the theme. Default is "teal". +# Skin available: blue, lavender, mint, red, sakura, teal, monochrome, lowcontrast_orange, lowcontrast_peach, lowcontrast_pink, indigo_ingot, evangelion +# See them live and learn how to create your own: https://welpo.github.io/tabi/blog/customise-tabi/#skins +# WARNING! "lowcontrast" skins, while aesthetically pleasing, may not provide optimal +# contrast (in light theme) for readability and might not be suitable for all users. +# Furthermore, low contrasting elements will affect your Google Lighthouse rating. +# All other skins have optimal contrast. +skin = "" + +# Set browser theme colour. Can be a single colour or [light, dark]. +# Note: Bright colors may be ignored in dark mode. +# More details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color +# browser_theme_color = "#087e96" # Example of single value. +# browser_theme_color = ["#ffffff", "#000000"] # Example of light/dark colours. + +# List additional stylesheets to load site-wide. +# These stylesheets should be located in your site's `static` directory. +# Example: stylesheets = ["extra1.css", "path/extra2.css"] +# You can load a stylesheet for a single post by adding it to the [extra] section of the post's front matter, following this same format. +stylesheets = [] + +# Sets the default canonical URL for all pages. +# Individual pages can override this in the [extra] section using canonical_url. +# Example: "$base_url/blog/post1" will get the canonical URL "https://example.com/blog/post1". +# Note: To ensure accuracy in terms of matching content, consider setting 'canonical_url' individually per page. +# base_canonical_url = "https://example.com" + +# Remote repository for your Zola site. +# Used for `show_remote_changes` and `show_remote_source` (see below). +# Supports GitHub, GitLab, Gitea, and Codeberg. +# remote_repository_url = "https://github.com/welpo/tabi" +# Set this to "auto" to try and auto-detect the platform based on the repository URL. +# Accepted values are "github", "gitlab", "gitea", and "codeberg". +remote_repository_git_platform = "auto" # Defaults to "auto". +# Branch in the repo hosting the Zola site. +remote_repository_branch = "main" # Defaults to "main". +# Show a link to the commit history of updated posts, right next to the last updated date. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_remote_changes = true # Defaults to true. +# Show a link to the repository of the site, right next to the "Powered by Zola & tabi" text. +show_remote_source = true # Defaults to true. + +# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +copy_button = true + +# Make code block names clickable if they are URLs (loads ~400 bytes of JavaScript). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +code_block_name_links = false + +# Force left-to-right (LTR) direction for code blocks. +# Set to false to allow code to follow the document's natural direction. +# Can be set at page or section levels. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +force_codeblock_ltr = true + +# Show the author(s) of a page. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_author = false + +# Show the reading time of a page. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_reading_time = true + +# Show the date of a page below its title. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_date = true + +# Determines how dates are displayed in the post listing (e.g. front page or /blog). Options: +# "date" - Show only the original date of the post (default if unset). +# "updated" - Show only the last updated date of the post. If there is no last updated date, it shows the original date. +# "both" - Show both the original date and the last updated date. +post_listing_date = "date" + +# Enable iine like buttons on all posts: https://iine.to/ +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +iine = false +iine_icon = "heart" # See https://iine.to/#customise +# Unify like counts across all language versions of the same page. +# When enabled, likes on /es/blog/hello/ will count towards /blog/hello/ (default language). +iine_unified_languages = true + +# Show "Jump to posts" link next to series' title. +# By default, the link appears automatically when a series description exceeds 2000 characters. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# show_jump_to_posts = true + +# Determines if indexes should be increasing (false) or decreasing (true) in series' posts list. +# It has only effect if the section uses indexes metadata (which is only the case for series as of now). +# Can be set at section levels, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +post_listing_index_reversed = false # Defaults to false. + +# DEPRECATED! +# Use Zola's built-in `bottom_footnotes = true` in the [markdown] section instead. (Available since v0.19.0) +# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +footnote_backlinks = false + +# Enable KaTeX for all posts. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +katex = false + +# Enable Mermaid diagrams for all posts. +# Loads ~2.5MB of JavaScript. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +mermaid = false + +# Serve Mermaid JavaScript locally. Version bundled with tabi. +# If set to false, it will load the latest version from JSDelivr. +# Only relevant when `mermaid = true`. +serve_local_mermaid = true + +# Show links to previous and next articles at the bottom of posts. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_previous_next_article_links = false + +# Invert order of the links to previous and next articles at the bottom of posts. +# By default, next articles are on the left side of the page and previous articles are on the right side. +# To reverse the order (next articles on the right and previous articles on the left), set it to true. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +invert_previous_next_article_links = false + +# Whether the navigation for previous/next article should match the full width of the site (same as the navigation bar at the top) or the article width. +# To match the navigation bar at the top, set it to true. +previous_next_article_links_full_width = true + +# Quick navigation buttons. +# Adds "go up" and "go to comments" buttons on the bottom right (hidden for mobile). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +quick_navigation_buttons = false + +# Add a Table of Contents to all posts, right below the title and metadata. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# toc = false + +# Date format used when listing posts (main page, /blog section, tag posts list…) +# Default is "6th July 2049" in English and "%d %B %Y" in other languages. +# long_date_format = "%d %B %Y" + +# Date format used for blog posts. +# Default is "6th July 2049" in English and "%-d %B %Y" in other languages. +short_date_format = "" + +# Date format used for the archive page. +# Default is "06 July" in English and "%d %b" in other languages. +# archive_date_format = "" + +# Per-language date format overrides. +# Examples: Spanish uses "3 de febrero de 2024", German uses "3. Februar 2024" +# date_formats = [ +# { lang = "es", long = "%d de %B de %Y", short = "%d %b %Y" }, +# { lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y" }, +# ] + +# Custom separator used in title tag and posts metadata (between date, time to read, and tags). +separator = "•" + +# Use a shorter layout for All tags listing. +# Default: tag_name – n post[s] +# Compact: tag_name^n (superscript number) +compact_tags = false + +# How tags are sorted in a Tags listing based on templates/tags/list.html. +# "name" for alphabetical, "frequency" for descending count of posts. +# Default: "name". +tag_sorting = "name" + +# Show clickable tags above cards.html template (e.g. projects/) to filter the displayed items. +# Loads JS to filter. If JS is disabled, the buttons are links to the tag's page. +# Can be set at the section or config.toml level, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# Default: true +enable_cards_tag_filtering = true + +# Invert the order of the site title and page title in the browser tab. +# Example: true => "Blog • ~/tabi", false => "~/tabi • Blog" +invert_title_order = false + +# Full path after the base URL required. So if you were to place it in "static" it would be "/favicon.ico" +# favicon = "" + +# Add an emoji here to use it as favicon. +# Compatibility: https://caniuse.com/link-icon-svg +# favicon_emoji = "🌱" + +# Path to the fallback image for social media cards (the preview image shown when sharing a link on WhatsApp, LinkedIn…). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# Learn how to create these images in batch and automatically: +# https://osc.garden/blog/automating-social-media-cards-zola/ +# social_media_card = "img/social_cards/index.jpg" + +menu = [ + { name = "blog", url = "blog", trailing_slash = true }, + { name = "archive", url = "archive", trailing_slash = true }, + { name = "tags", url = "tags", trailing_slash = true }, + { name = "projects", url = "projects", trailing_slash = true }, +] + +# The RSS icon will be shown if (1) it's enabled and (2) the following variable is set to true. +# Note for Zola 0.19.X users: when `feed_filenames` has two filenames, only the first one will be linked in the footer. +feed_icon = true + +# Show the full post content in the Atom feed. +# If it's set to false, only the description or summary will be shown. +full_content_in_feed = false + +# Email address for footer's social section. +# Protect against spambots: +# 1. Use base64 for email (convert at https://www.base64encode.org/ or `printf 'your@email.com' | base64`). +# 2. Or, set 'encode_plaintext_email' to true for auto-encoding (only protects on site, not in public repos). +# email = "bWFpbEBleGFtcGxlLmNvbQ==" # base64 encoded version of "mail@example.com" +# Decoding requires ~400 bytes of JavaScript. If JS is disabled, the email won't be displayed. +encode_plaintext_email = true # Setting is ignored if email is already encoded. + +# Social media links for the footer. +# Built-in icons: https://github.com/welpo/tabi/tree/main/static/social_icons +# To use a custom icon, add it to your site's `static/social_icons` directory. +# socials = [ +# { name = "github", url = "https://github.com/welpo/", icon = "github" }, +# { name = "soundcloud", url = "https://soundcloud.com/oskerwyld", icon = "soundcloud" }, +# { name = "instagram", url = "https://instagram.com/oskerwyld", icon = "instagram" }, +# { name = "youtube", url = "https://youtube.com/@oskerwyld", icon = "youtube" }, +# { name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" }, +# ] + +# Fediverse profile. +# Adds metadata to feature the author's profile in Mastodon link previews. +# Example: for @username@example.com, use: +# fediverse_creator = { handle = "username", domain = "example.com" } + +# Extra menu to show on the footer, below socials section. +# footer_menu = [ +# {url = "about", name = "about", trailing_slash = true}, +# {url = "privacy", name = "privacy", trailing_slash = true}, +# {url = "sitemap.xml", name = "sitemap", trailing_slash = false}, +# {url = "https://example.com", name = "external link", trailing_slash = true}, +# ] + +# Enable a copyright notice for the footer, shown between socials and the "Powered by" text. +# $TITLE will be replaced by the website's title. +# $CURRENT_YEAR will be replaced by the current year. +# $AUTHOR will be replaced by the `author` variable. +# $SEPARATOR will be replaced by the `separator` variable. +# Markdown is supported (links, emphasis, etc). +# copyright = "$TITLE © $CURRENT_YEAR $AUTHOR $SEPARATOR Unless otherwise noted, the content in this website is available under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) license." + +# For multi-language sites, you can set a different copyright for each language. +# The old way of setting `translated_copyright = true` and using i18n files is deprecated. +# If a translation is missing for language, the `copyright` value will be used. +# copyright_translations.es = "$TITLE © $CURRENT_YEAR $AUTHOR $SEPARATOR A menos que se indique lo contrario, el contenido de esta web está disponible bajo la licencia [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)." + +# Custom security headers. What urls should your website be able to connect to? +# You need to specify the CSP and the URLs associated with the directive. +# Useful if you want to load remote content safely (embed YouTube videos, which needs frame-src, for example). +# Default directive is self. +# Default config, allows for https remote images and embedding YouTube and Vimeo content. +# This configuration (along with the right webserver settings) gets an A+ in Mozilla's Observatory: https://observatory.mozilla.org +# Note: to use a Zola built-in syntax highlighting theme, allow unsafe-inline for style-src. +allowed_domains = [ + { directive = "font-src", domains = ["'self'", "data:"] }, + { directive = "img-src", domains = ["'self'", "https://*", "data:"] }, + { directive = "media-src", domains = ["'self'"] }, + { directive = "script-src", domains = ["'self'"] }, + { directive = "style-src", domains = ["'self'"] }, + { directive = "frame-src", domains = ["player.vimeo.com", "https://www.youtube-nocookie.com"] }, +] + +# Enable the CSP directives configured (or default). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +enable_csp = true + +# Font subsetting configuration. +# This feature helps prevent text flashing in Firefox when using custom fonts. +# See: https://welpo.github.io/tabi/blog/custom-font-subset/ +# Enable or disable font subsetting completely, both built-in and custom subsets. +enable_subset = true +# Use a custom subset of characters for the header. +# If true, tabi will load the `static/custom_subset.css` file. +# If false, tabi will use the default language-specific subset (English or Spanish). +custom_subset = true + +[extra.analytics] +# Specify which analytics service you want to use. +# Supported options: ["goatcounter", "umami", "plausible"] +# service = "umami" + +# Unique identifier for tracking. +# For GoatCounter, this is the code you choose during signup. +# For Umami, this is the website ID. +# For Plausible, this is the domain name (e.g. "example.com"). +# Note: Leave this field empty if you're self-hosting GoatCounter. +# id = "yourID" + +# Optional: Specify the URL for self-hosted analytics instances. +# For GoatCounter: Base URL like "https://stats.example.com" +# For Umami: Base URL like "https://umami.example.com" +# For Plausible: Base URL like "https://plausible.example.com" +# Leave this field empty if you're using the service's default hosting. +# self_hosted_url = "" + +# Optional: For Umami, enable this option to respect users' Do Not Track (DNT) settings. The default is true. +do_not_track = true + +# giscus support for comments. https://giscus.app +# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup +[extra.giscus] +# enabled_for_all_posts = false # Enables giscus on all posts. It can be enabled on individual posts by setting `giscus = true` in the [extra] section of a post's front matter. +# automatic_loading = true # If set to false, a "Load comments" button will be shown. +# repo = "welpo/tabi-comments" +# repo_id = "R_kgDOJ59Urw" # Find this value in https://giscus.app/ +# category = "Announcements" +# category_id = "DIC_kwDOJ59Ur84CX0QG" # Find this value in https://giscus.app/ +# mapping = "slug" # Available: pathname; url; title; slug. "slug" will use the post's filename (slug); this is the only way to share comments between languages. +# strict_title_matching = 1 # 1 to enable, 0 to disable. https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md#data-strict +# enable_reactions = 1 # 1 to enable, 0 to disable. +# comment_box_above_comments = false +# light_theme = "noborder_light" +# dark_theme = "noborder_dark" +# lang = "" # Leave blank to match the page's language. +# lazy_loading = true + +# utterances support for comments. https://utteranc.es +# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup +[extra.utterances] +# enabled_for_all_posts = false # Enables utterances on all posts. It can be enabled on individual posts by setting `utterances = true` in the [extra] section of a post's front matter. +# automatic_loading = true # If set to false, a "Load comments" button will be shown. +# repo = "yourGithubUsername/yourRepo" # https://utteranc.es/#heading-repository +# issue_term = "slug" # Available: pathname; url; title; slug. "slug" will use the post's filename (slug); this is the only way to share comments between languages. https://utteranc.es/#heading-mapping +# label = "💬" # https://utteranc.es/#heading-issue-label +# light_theme = "github-light" # https://utteranc.es/#heading-theme +# dark_theme = "photon-dark" # https://utteranc.es/#heading-theme +# lazy_loading = true + +# Hyvor Talk support for comments. https://talk.hyvor.com +[extra.hyvortalk] +# enabled_for_all_posts = false # Enables hyvortalk on all posts. It can be enabled on individual posts by setting `hyvortalk = true` in the [extra] section of a post's front matter. +# automatic_loading = true # If set to false, a "Load comments" button will be shown. +# website_id = "1234" +# page_id_is_slug = true # If true, it will use the post's filename (slug) as id; this is the only way to share comments between languages. If false, it will use the entire url as id. +# lang = "" # Leave blank to match the page's language. +# page_author = "" # Email (or base64 encoded email) of the author. +# lazy_loading = true + +# Isso support for comments. https://isso-comments.de/ +# You need to self-host the backend first: https://blog.phusion.nl/2018/08/16/isso-simple-self-hosted-commenting-system/ +# More info on some settings: https://isso-comments.de/docs/reference/client-config/ +[extra.isso] +# enabled_for_all_posts = false # Enables Isso on all posts. It can be enabled on individual posts by setting `isso = true` in the [extra] section of a post's front matter. +# automatic_loading = true # If set to false, a "Load comments" button will be shown. +# endpoint_url = "" # Accepts relative paths like "/comments/" or "/isso/", as well as full urls like "https://example.com/comments/". Include the trailing slash. +# page_id_is_slug = true # If true, it will use the relative path for the default language as id; this is the only way to share comments between languages. If false, it will use the entire url as id. +# lang = "" # Leave blank to match the page's language. +# max_comments_top = "inf" # Number of top level comments to show by default. If some comments are not shown, an “X Hidden” link is shown. +# max_comments_nested = "5" # Number of nested comments to show by default. If some comments are not shown, an “X Hidden” link is shown. +# avatar = true +# voting = true +# page_author_hashes = "" # hash (or list of hashes) of the author. +# lazy_loading = true # Loads when the comments are in the viewport (using the Intersection Observer API). + +[extra.webmentions] +# To disable for a specific section or page, set webmentions = false in that page/section's front matter's [extra] section. +enable = false +# Specify the domain registered with webmention.io. +# domain = "" + +# The HTML ID for the object to fill in with the webmention data. +# Defaults to "webmentions" +# id = "webmentions" + +# data configuration for the webmention.min.js script +# The base URL to use for this page. Defaults to window.location +# page_url = + +# Additional URLs to check, separated by |s +# add_urls + +# The maximum number of words to render in reply mentions. +# wordcount = 20 + +# The maximum number of mentions to retrieve. Defaults to 30. +# max_webmentions = 30 + +# By default, Webmentions render using the mf2 'url' element, which plays +# nicely with webmention bridges (such as brid.gy and telegraph) +# but allows certain spoofing attacks. If you would like to prevent +# spoofing, set this to a non-empty string (e.g. "true"). +# prevent_spoofing + +# What to order the responses by; defaults to 'published'. See +# https://github.com/aaronpk/webmention.io#api +# sort_by + +# The order to sort the responses by; defaults to 'up' (i.e. oldest +# first). See https://github.com/aaronpk/webmention.io#api +# sort_dir + +# If set to a non-empty string (e.g. "true"), will display comment-type responses +# (replies/mentions/etc.) as being part of the reactions +# (favorites/bookmarks/etc.) instead of in a separate comment list. +# comments_are_reactions = "true" + +# h-card configuration +# Will identify you on the indieweb (see https://microformats.org/wiki/h-card) +[extra.hcard] +# Enable home page h-card. +enable = true +# Add your email to the card if extra.email is set and not encoded. +# with_mail = true +# Add your social links ('socials' config) to the card. +with_social_links = true +# Homepage url. Defaults to the value of 'base_url'. +# homepage = "https://myhomepage.net" +# avatar = "img/profile.webp" +# Display name, default to the value of 'author'. +# full_name = "John Doe" +# Small bio, as shown on social media profiles. +# biography = "Fond of the indieweb" +# +# You can add any property from https://microformats.org/wiki/h-card#Properties +# Make sure to replace all '-' characters by '_' +# Examples: +# p_nickname = "nickname" +# p_locality = "Bordeaux" +# p_country_name = "France" |
